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.
- 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).
- Backend Framework: NestJS
- Database: PostgreSQL (via Prisma)
- Authentication: JSON Web Tokens (JWT)
- Caching: Redis
- API Documentation: Swagger
Ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/yourusername/fashion-store-api.git cd fashion-store-api
-
Install dependencies:
npm install
-
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
-
Run database migrations:
npx prisma migrate dev
-
Start the application:
npm run start:dev
To build and run the application in production mode:
npm run build
npm run start:prod
The API is documented using Swagger. Once the app is running, you can access the documentation at:
http://localhost:8000/api
Run tests using Jest:
npm run test
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
Contributions are welcome! Please open an issue or submit a pull request for any improvements or features you'd like to add.
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.