E-Commerce-API is a robust and scalable RESTful API designed to power modern e-commerce platforms. Built with cutting-edge technologies, this backend solution provides comprehensive functionalities for managing products, users, orders, and payments.
- Create, read, update, and delete products
- AI-powered product description validation using Google Gemini
- Structured product specifications
- Product image URL management
- Secure user registration and authentication
- JWT-based user authentication
- User profile retrieval by ID or username
- Full CRUD operations for orders
- Advanced order status tracking
- Complex relationships between users, orders, and products
- NestJS: Powerful Node.js framework for scalable server-side applications
- TypeScript: Typed superset of JavaScript
- TypeORM: Object-Relational Mapping library
- PostgreSQL: Reliable relational database
- Docker: Containerization platform
- Google Gemini AI: Advanced AI for product description validation
- Swagger: Interactive API documentation
- Authentication: Secure JWT-based route protection
- Validation: Comprehensive data validation with class-validator
- Error Handling: Standardized error response mechanism
- Pagination: Efficient data retrieval with pagination support
- Documentation: Swagger-integrated interactive API docs
- Node.js (v20+)
- npm or yarn
- Docker & Docker Compose (recommended)
git clone https://github.com/Gharib84/E-Commerce-API.git
cd ecommerce-api
npm install
# or
yarn install
# Copy environment template
cp .env.example.local .env.local
# Fill in your credentials in .env.local
# Update:
# - PostgreSQL credentials
# - Gemini API key
# - JWT secret
# Start all services
docker-compose up -d
# Services:
# - API: http://localhost:3000/api
# - pgAdmin: http://localhost:8081
Once the application is running, access the Swagger documentation at:
http://localhost:3000/api
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/Gharib84/E-Commerce-API
Tip: Make sure to replace placeholders in .env.local
with your actual credentials before running the application.