In this assignment, you will be tasked with developing a Node.js backend application that demonstrates your proficiency in backend development, specifically with Node.js and SQL databases. The assignment will assess your ability to architect and implement APIs, handle database operations.
-
Fork this project repo to your profile and clone it to work on the project.
-
Design and implement a sales management platform backend that provides APIs for managing department store sales.
-
The application should have the following functionality:
- User Management: APIs to register new users, authenticate existing users, and manage user profiles.
- Product Management: APIs to create, update, delete, and retrieve product information.
- Order Management: APIs to create, update, delete, and retrieve order information. Each order should include the user who placed the order, the products purchased, and the total amount.
- Reporting: APIs to generate sales reports, such as total sales by day, week, or month, and top-selling products.
-
Use Node.js as the backend runtime and any preferred framework (e.g., Express.js, Nest.js, Fastify) for building the APIs.
-
Use a SQL database (e.g., MySQL, PostgreSQL) for data storage.
-
Implement efficient database operations and query strategies to ensure optimal performance.
-
Implement authentication and authorization mechanisms to secure the APIs.
-
Use Swagger to document your APIs. Provide clear and detailed documentation for each endpoint, including request/response examples and any required authentication/authorization details.
- Use Node.js and any preferred framework for building the backend APIs.
- Use a SQL database for data storage.
- ORMs like TypeORM or Prisma is preferred.
- Implement efficient database operations and query strategies.
- Implement authentication and authorization mechanisms.
- Write clean, maintainable, and well-documented code.
- Use Git for version control and commit your code regularly to the forked public Git repository in your profile.
- Implement input validation and error handling for the APIs.
- Document your APIs using Swagger.
- Implement pagination or filtering options for retrieving product or order data.
- Implement unit tests or integration tests to ensure the correctness of your code.
- Implement data seeding or migration scripts for setting up and populating the database.
- Fork this GitHub repository Assignment Repo to your own GitHub account.
- Commit your code regularly and push the changes to your forked repository.
- Do not create a pull request; just submit your forked repository.
- Provide a DOCS.md file with all the technologies used and how to run the program locally.
- Once you have completed the assignment, share the repository URL with us via the submission form.
- Submission Deadline: Thursday July 6, 2023, 4:00 PM
Note: The assignment is intentionally challenging, and you are not expected to complete all the bonus tasks. Focus on delivering high-quality code and meeting the core requirements first. Check out the discussion section of this repo to ask any related queries or doubts. Good luck with your assignment! If you have any questions, feel free to ask for clarification.