This project is an API for discovering, reviewing, and managing places such as cafés, restaurants, gyms, and more.
It allows users to create accounts, register and manage places, leave reviews, and explore recommendations.
- Sign up: Create an account with email/password (social login may be added later).
- Sign in: Authenticate and receive a JWT token.
- Edit profile: Update name, profile picture, and bio.
- Delete account: Remove user data permanently.
- Create a place: Register a place with name, category (café, restaurant, gym, etc.), description, and address.
- Edit a place: Update details (only by the creator/admin).
- List places: Browse places, with filters by category, name, or proximity (initially a general listing).
- Delete a place: Remove a place from the system.
- Create a review: Add a rating (1–5), comment, and user reference.
- Edit a review: Update details (only by the creator).
- Delete a review: Remove a review.
- List reviews: Display reviews for a specific place.
- Recent feed: Show latest reviews and newly added places.
- Top ranking (optional for MVP): Display the highest-rated places.
- User registration and authentication.
- CRUD operations for places.
- CRUD operations for reviews.
- Simple filtering when listing places (by category or name).
- Activity feed (latest reviews/places created).
- Basic security with JWT authentication.
- Password hashing with bcrypt.
- JWT-based authentication.
- Pagination for listing places and reviews.
- Modular NestJS architecture (Users, Places, Reviews).
- RESTful API with Swagger documentation.
- Layered design: Controller → Service → Repository.
- Relational database (Postgres or MySQL).
- Core tables:
Users,Places,Reviews.
- Basic logging and error monitoring.
The project includes unit and end-to-end (E2E) tests using the Vitest framework to ensure quality and robustness.
- Unit tests cover business rules and isolated functions.
- E2E tests validate complete API flows, simulating real requests.
- To run the tests, use:
npm run test # Run unit tests
npm run test:e2e # Run E2E testsTest files are located in the test/ folder.
The client.http file at the root of the project contains example HTTP requests to test and explore the API endpoints. You can use it with extensions like REST Client in VS Code to quickly send requests during development.
The API provides interactive documentation generated by Swagger. To access it:
- Start the server locally.
- Go to
http://localhost:3000/apiin your browser.
There you can view all endpoints, parameters, responses, and test requests directly from the interface.