Welcome to ZipCityAPI, a powerful and modern RESTful API built with NestJS to manage user authentication and fetch city data based on postal codes. This project leverages the CQRS pattern, TypeORM, and Zippopotamus API to provide a scalable and maintainable solution for user management and city data retrieval. Whether you're a developer looking to integrate city data into your app or just exploring a well-structured backend, this project has got you covered! π
-
User Authentication π:
- Sign up with a unique username and secure password.
- JWT-based authentication for protected routes.
- Retrieve user profile data securely.
-
City Data Retrieval ποΈ:
- Fetch city information (e.g., place name, state, abbreviation) using postal codes via the Zippopotamus API.
- Log all city requests for each user with detailed response data.
-
Request History π:
- View a paginated list of your city data requests with details like
postCode
,country
, andplaces
.
- View a paginated list of your city data requests with details like
-
Robust Error Handling π¨:
- Centralized error handling with custom Exception Filters.
- Proper HTTP status codes and meaningful error messages.
-
Scalable Architecture ποΈ:
- Built with the CQRS pattern for separation of concerns.
- Modular structure with separate layers for API, persistence, and infrastructure.
- Framework π₯οΈ: NestJS (Node.js)
- Database ποΈ: TypeORM (works with any SQL database, e.g., PostgreSQL)
- Architecture π: CQRS (Command Query Responsibility Segregation)
- Authentication π: JWT (JSON Web Tokens)
- External API π: Zippopotamus (for city data)
- Validation β : Class-validator
- HTTP Client π‘: Axios (for external API calls)
- Error Handling π¨: Custom Exception Filters