Skip to content

A modern RESTful API built with NestJS for user authentication, city data retrieval using postal codes, and paginated request history. πŸš€

Notifications You must be signed in to change notification settings

abolfazljazak/ZipCityAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ZipCityAPI 🌍

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! πŸš€


✨ Features

  • 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, and places.
  • 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.

πŸ› οΈ Tech Stack

  • 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

About

A modern RESTful API built with NestJS for user authentication, city data retrieval using postal codes, and paginated request history. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published