SweetSpot is a full-stack e-commerce application built to manage products, orders, and shipping seamlessly. This project leverages React for the frontend, Node.js for the backend, and Docker for containerization to streamline the development and deployment processes.
- User-friendly UI to browse and manage products
- Real-time product addition and cart functionality
- RESTful APIs for product, order, and shipping management
- Securely handles user requests and database operations
- Simplified development and deployment using Docker
- Pre-built Docker images available on Docker Hub
- Frontend: React, Vite
- Backend: Node.js, Express
- Database: MongoDB
- Containerization: Docker, Docker Compose
Before you begin, ensure you have the following installed:
The easiest way to get started is by using our pre-built Docker images:
# Pull the images
docker pull aditya7649/sweetspot-frontend:latest
docker pull aditya7649/sweetspot-backend:latest
# Create a docker-compose.yml file
version: "3.8"
services:
backend:
build:
context: ./Sweetspot-Backend
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
volumes:
- ./Sweetspot-Backend:/app
frontend:
build:
context: ./Sweetspot-Frontend
ports:
- "5173:80"
volumes:
- ./Sweetspot-Frontend:/app
# Run the application
docker-compose up
Start by cloning the repository to your local machine:
git clone [email protected]:AdityaP7649/SweetSpot.git
cd SweetSpot
docker-compose up --build
To stop the containers after running:
docker-compose down
Once the containers are running, you can access the application via the following URLs:
- Frontend: http://localhost:5137
- Backend API: http://localhost:3000
.
├── docker-compose.yml
├── frontend/
│ ├── Dockerfile
│ ├── package.json
│ └── src/
│ └── ...
├── backend/
│ ├── Dockerfile
│ ├── package.json
│ ├── server.js
│ └── routes/
│ └── ...
└── README.md
Our Docker images are available on Docker Hub:
-
Frontend Image:
aditya7649/sweetspot-frontend
- Tags:
latest
: Most recent stable versionv1.0.0
: Initial release
- Tags:
-
Backend Image:
aditya7649/sweetspot-backend
- Tags:
latest
: Most recent stable versionv1.0.0
: Initial release
- Tags:
- Error:
ENOENT: no such file or directory, open '/app/package.json'
: Ensure thebackend
directory contains a validpackage.json
file. If it's missing, recreate it and rebuild the containers. - Missing Dependencies: If required dependencies are missing, update your
Dockerfile
to include them, rebuild the image, and restart the container:
docker-compose build
docker-compose up
- Use
docker-compose logs
to inspect logs for any container errors - Ensure the ports specified in
docker-compose.yml
are available on your machine - If using Docker Hub images, ensure you have the latest versions:
-https://roadmap.sh/projects/scalable-ecommerce-platform
docker pull aditya7649/sweetspot-frontend:latest docker pull aditya7649/sweetspot-backend:latest