Skip to content

hx-gh/nestjs-pokemon-store

Repository files navigation

Pokemon Store

Built with ❤︎

💻 Technologies

This project was made using the follow technologies:

  • [Javascript]
  • [Nest.Js]
  • [Prisma]
  • [MySQL]
  • [Docker]
  • [OpenAPI:Swagger]
  • [Jest]

💬 Description

  • Welcome to PokemonStore, a comprehensive platform designed to facilitate seamless trading and purchasing of Pokémon cards. This project consists of two core applications: the 'Store' and 'Payments' services, each contributing essential functionalities to ensure a smooth and secure user experience.

🚀 Features

  • User Management: User creation with secure password encryption. User authentication and authorization using JWT. Storage of JWT securely in cookies for persistent sessions utilizing AES-256 encryption for securing the session tokens.
  • Reference Card Management: Listing of Pokémon cards from an external API. Dynamic population of the database with card data. Detailed card information display, including stats and rarity.
  • Sales Module: Creation of listings for Pokémon cards for sale. Display of individual cards available for sale. Viewing all cards available for sale by a specific user. Filtering and sorting options for ease of browsing.
  • Order Processing: Creation of orders for purchasing Pokémon cards. Real-time status updates for orders. Integration with Kafka for messaging and event-driven architecture. Order completion and confirmation.
  • Payments Integration: Seamless payment processing for orders. Messaging back to Kafka for payment status updates.
  • Documentation and Testing: Comprehensive documentation for developers and users utilizing OpenAPI.

👷 Installation

# Clone Repository
$ git clone https://github.com/hx-gh/nestjs-pokemon-store.git
$ cd nestjs-pokemon-store
$ npm install

Configure environment variables as per instructions in .env.example files. Start Kafka, Zookeeper, Confluent Control Panel, and MySQL using Docker:

$ docker compose up

Set-up Prisma for developement

$ cd apps/store
$ npx prisma generate
$ npx prisma migrate dev
$ cd ..
$ cd payments
$ npx prisma generate
$ npx prisma migrate dev

💻 Run Microservices

# Go to web folder
$ cd nestjs-pokemon-store
# Install Dependencies
$ npm install
# Run Store Aplication
$ npm run start:dev
# Run Payments Aplication
$ npm run start:dev payments

💻 Run Database

After setting up the Migrations and Setups for Prisma Make a fetch for localhost:3000/reference-card/update-pokemons

💻 Run Tests Suit

# Run Database
$ npm run test:e2e

📕 License

Released in 2024

Give a ⭐️ if this project helped you!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published