This project is a RESTful API built with Express.js, designed to manage users and clothing items. It provides endpoints for creating, reading, updating, and deleting (CRUD) both users and clothing items. The application includes features such as user authentication and error handling, ensuring robust and secure interactions with the API.
The main functionalities of the project include:
- User Management: Create, retrieve, update, and delete user information.
- Clothing Item Management: Create, retrieve, update, and delete clothing items.
- Authentication: Secure endpoints with user authentication.
- Error Handling: Comprehensive error handling for invalid routes and requests.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine, used for building the server-side application.
- Express.js: A fast, unopinionated, minimalist web framework for Node.js, used to create the RESTful API.
- MongoDB: A NoSQL database for storing user and clothing item data.
- Mongoose: An Object Data Modeling (ODM) library for MongoDB and Node.js, used for data validation and query building.
- JWT (JSON Web Tokens): Used for secure user authentication and authorization.
- RESTful API Design: The application follows REST principles, making it easy to use and extend.
- Middleware: Utilized for logging, authentication, and error handling, ensuring a modular and maintainable codebase.
- Validation and Sanitization: Input validation are performed to ensure data integrity and security.
- Error Handling: Comprehensive error handling to manage different types of errors, including 404 for unknown routes and validation errors.