Skip to content

abjerry97/fashion-store

Repository files navigation

Fashion Store API

Welcome to the Fashion Store API! This is a backend service built using NestJS to power a modern fashion store. The API handles product management, user authentication, order processing, and more.

Features

  • User Management: Secure user authentication and registration.
  • Product Catalog: Add, update, delete, and view products.
  • Order Processing: Place, view, and track orders.
  • Admin Panel: Manage inventory, view sales analytics, and process orders.
  • Search & Filters: Advanced product search and filtering options for customers.
  • Secure Payments: Integration with payment gateways (e.g., Stripe or PayPal).

Tech Stack

  • Backend Framework: NestJS
  • Database: PostgreSQL (via Prisma)
  • Authentication: JSON Web Tokens (JWT)
  • Caching: Redis
  • API Documentation: Swagger

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/fashion-store-api.git  
    cd fashion-store-api  
  2. Install dependencies:

    npm install  
  3. Set up the .env file:
    Create a .env file in the root directory and configure the following environment variables:

    DATABASE_URL=postgresql://username:password@localhost:5432/fashion_store  
    JWT_SECRET=your_jwt_secret  
    REDIS_URL=redis://localhost:6379  
  4. Run database migrations:

    npx prisma migrate dev  
  5. Start the application:

    npm run start:dev  

Running in Production

To build and run the application in production mode:

npm run build  
npm run start:prod  

API Documentation

The API is documented using Swagger. Once the app is running, you can access the documentation at:

http://localhost:8000/api

Testing

Run tests using Jest:

npm run test  

Folder Structure

src/  
├── auth/             # Authentication module  
├── products/         # Product catalog module  
├── orders/           # Order processing module  
├── users/            # User management module  
├── common/           # Shared utilities and guards  
├── config/           # Application configuration  
└── main.ts           # Application entry point  

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or features you'd like to add.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Happy coding! If you have any questions, feel free to reach out.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published