RESTful API backend for the Mesto photo-sharing application — handles authentication, user profiles, and photo cards.
- JWT authentication with bcrypt password hashing
- CRUD operations for users and photo cards
- Request validation with Celebrate/Joi
- Centralized error handling middleware
- Mongoose schemas with reference relationships
- Logging of requests and errors
npm install
npm run devThe API will run on http://localhost:3000.
npm run build
npm run startMain endpoints:
POST /signup— register a new userPOST /signin— authenticate and receive JWTGET /users/me— get current user profileGET /cards— list all photo cardsPOST /cards— create a new cardPUT /cards/:id/likes— like a card
This is a learning project from the Web Development Master's program at NUST MISIS in partnership with Yandex Practicum, focused on building a production-ready REST API with authentication, validation, and proper error handling.