A progressive Node.js framework for building efficient and scalable server-side applications.
VaultMart is a scalable e-commerce backend built with NestJS, designed to handle high-performance operations efficiently. It integrates MySQL, Redis, and AWS services for a robust infrastructure, ensuring secure authentication, seamless file uploads, and efficient data management.
- Scalable and modular architecture
- Authentication & Authorization using JWT
- Database integration with MySQL & TypeORM
- Redis caching for improved performance
- File uploading with AWS S3 and Multer
- Request validation using Joi & Zod
- Backend: NestJS (TypeScript, Node.js)
- Database: MySQL with TypeORM
- Cache: Redis
- File Storage: AWS S3, Multer
- Validation: Joi, Zod
- Deployment: AWS EC2
Ensure you have the following installed:
- Node.js (>= 16.x)
- MySQL
- Redis
- AWS S3 bucket (for file uploads)
- Docker (optional for containerized deployment)
# Clone the repository
git clone git@github.com:AtharvDalal/VaultMart.git
cd valuetmart
# Install dependencies
npm install
# Create a .env file and configure your database, Redis, and AWS credentials
# Run migrations (if using TypeORM migrations)
npm run migration:run
# Start the server
npm run start
# Build and start the container
docker-compose up --build
-
Register:
POST http://localhost:3000/auth/register
{ "username": "testuser", "email": "test@example.com", "password": "password123" }
{ "message": "User registered successfully", "user": { "id": 1, "username": "testuser", "email": "test@example.com" }, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
-
Login:
POST http://localhost:3000/auth/login
{ "email": "test@example.com", "password": "password123" }
{ "message": "Login successful", "user": { "id": 1, "username": "testuser", "email": "test@example.com" }, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
-
Create Product:
POST http://localhost:3000/product/create
{ { "name": "Laptop", "price": 999.99, "description": "A high-end gaming laptop", "category": "Electronics", "brand": "XYZ Gaming", "image_url": "https://my-awesome-bucket.s3.amazonaws.com/products/laptop-image.jpg" "color": "Black", "quantity": 50, "rating": 4.5, "weight": "2.5 kg", "release_date": "2025-02-01", "warranty": "2 years", "discount": "10%" } }
{ "message": "Product created successfully", "product": { { "name": "Laptop", "price": 999.99, "description": "A high-end gaming laptop", "category": "Electronics", "brand": "XYZ Gaming", "image_url": "https://my-awesome-bucket.s3.amazonaws.com/products/laptop-image.jpg" "color": "Black", "quantity": 50, "rating": 4.5, "weight": "2.5 kg", "release_date": "2025-02-01", "warranty": "2 years", "discount": "10%" }
-
Delete Product:
DELETE http://localhost:3000/product/delete
-
Update Product:
PUT http://localhost:3000/product/update
-
Get All Products:
GET http://localhost:3000/product/getall
This project is licensed under the MIT License.
💡 Feel free to contribute and raise issues in the repository!