Slug Market is a full-stack e-commerce platform designed around a microservice architecture. The application provides separate interfaces and functionality for shoppers, sellers, administrators, and corporate users, with independent backend services handling authentication, product listings, payments, images, carts, orders, notifications, and other platform functionality.
This repository is a public fork of the original Slug Market project, which is hosted in a private GitLab repository.
- Role-based interfaces for shoppers, sellers, administrators, and corporate users
- User authentication and authorization
- Product listing and inventory management
- Shopping cart functionality
- Order management
- Payment processing
- Image upload and storage handling
- Seller management tools
- Administrative controls
- Corporate management functionality
- Notification service
- RESTful backend APIs
- Containerized deployment with Docker
- PostgreSQL database
Frontend
- TypeScript
- React
- Vite
- Material UI
Backend
- TypeScript
- Node.js
- Express
- REST APIs
Database
- PostgreSQL
Infrastructure
- Docker
- Docker Compose
- GitLab CI/CD
Testing
- Vitest
- Supertest
- Mock Service Worker (MSW)
Slug Market separates application interfaces from reusable backend services.
Slug-Market/
├── App/
│ ├── Admin/
│ ├── corporate/
│ │ └── backend/
│ ├── seller/
│ │ ├── frontend/
│ │ └── backend/
│ └── shopper/
│ ├── frontend/
│ └── backend/
│
├── Service/
│ ├── AuthService/
│ ├── CartService/
│ ├── CorporateService/
│ ├── ImageSerivce/
│ ├── ListingService/
│ ├── NotificationService/
│ ├── OrderService/
│ └── PaymentService/
│
├── postgres/
├── scripts/
├── Dockerfile
├── docker-compose.yml
└── package.json
| Application | Purpose |
|---|---|
| Shopper | Browse products, manage carts, and place orders |
| Seller | Create and manage product listings |
| Admin | Manage and oversee platform activity |
| Corporate | Corporate-level platform functionality |
| Service | Responsibility |
|---|---|
| AuthService | Authentication and authorization |
| ListingService | Product listings |
| CartService | Shopping cart operations |
| OrderService | Order creation and management |
| PaymentService | Payment processing |
| ImageService | Image upload and storage handling |
| NotificationService | User and system notifications |
| CorporateService | Corporate functionality |
Make sure the following are installed:
- Node.js
- npm
- Docker
- Docker Compose
git clone https://github.com/DatLe7/Slug-Market.git
cd Slug-MarketCreate a .env file in the project root containing the required application and PostgreSQL environment variables.
At minimum, the Docker configuration expects PostgreSQL values such as:
POSTGRES_PORT=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=Additional environment variables may be required by individual services such as authentication, payments, image storage, and external APIs.
Install dependencies for the root project and all application services:
npm run installsThis installs dependencies for the individual frontend, backend, and microservice projects.
Build all applications and services:
npm run buildStart all application components:
npm startThe root project uses concurrently to launch the individual services and applications.
Some of the primary local ports include:
| Component | Port |
|---|---|
| Admin Frontend | 3000 |
| Seller Frontend | 5173 |
| Shopper Frontend | 5174 |
| Seller Backend | 3013 |
| Shopper Backend | 3012 |
| Payment Service | 3016 |
| Image Service | 3018 |
| Order Service | 4000 |
| Corporate Backend | 3040 |
| Corporate Service | 3015 |
The application can also be run using Docker.
npm run containerisedor:
npm run composeThe Docker Compose configuration starts:
app— Slug Market applications and servicesdatabase— PostgreSQL database
npm run packageThis builds the application and PostgreSQL Docker images for linux/amd64 and packages them into a compressed archive.
The project uses automated testing and build scripts across its applications and services.
Run CI dependency installation and builds with:
npm run cisThe project includes testing tools such as:
- Vitest for unit testing
- Supertest for API and integration testing
- MSW for API mocking
The repository also contains a .gitlab-ci.yml configuration used for continuous integration and automated quality checks.
Slug Market was developed as a full-stack software engineering project focused on building a scalable e-commerce platform using service-oriented architecture.
The project emphasizes:
- separation of application responsibilities
- reusable backend services
- RESTful API design
- automated testing
- containerized deployment
- CI/CD workflows
- collaborative software development
GitHub: https://github.com/DatLe7/Slug-Market