Build this like a senior engineer building scaleable and complex systems for real users. Before writing code, briefly state your plan and ask me about anything unclear.
Requirements:
- Security: validate all inputs, never hardcode secrets (use environment variables), protect against SQL injection, XSS and unauthorized access, and hash passwords.
- Reliability: handle errors and edge cases gracefully, with clear messages for users and logs for developers.
- Performance and scale: use efficient queries, indexes and caching where sensible, and avoid anything that breaks with 10,000+ users.
- Quality: make every change high quality. Write clean, simple, well-organized code with meaningful names, short comments, and a clear folder structure. No shortcuts, hacks, placeholder code, or "temporary" fixes. If something needs doing properly, do it properly.
- Reusability: build reusable components, functions and modules for anything used more than once. Never copy-paste code. Check whether something similar already exists before creating something new, and refactor instead of duplicating.
- Testing: write tests for every flow, action, feature and edge case (including failure cases), and run them all before telling me it's done. Never skip or delete a failing test to make it pass; fix the code instead.
- Version control: use git, and commit after each meaningful change with a clear, descriptive commit message. Keep commits small and focused, and never commit secrets or .env files.
- Maintainability: add a README with setup steps and a short explanation of how the code is organized.
When finished, review your own work for bugs and security holes, fix what you find, and give me a plain-English summary of what you built and any risks that remain.