https://github.com/deepak748030/savana
Scalable and modular ecommerce backend built with Node.js, Express, MongoDB, Swagger, Docker, and Kubernetes β designed for performance, security, and maintainability.
https://github.com/deepak748030/savana
api-documentation backend docker ecommerce express grafana jwt-authentication kubernetes microservices mongodb multer nginx nodejs prometheus rest-api swagger
Last synced: 3 months ago
JSON representation
Scalable and modular ecommerce backend built with Node.js, Express, MongoDB, Swagger, Docker, and Kubernetes β designed for performance, security, and maintainability.
- Host: GitHub
- URL: https://github.com/deepak748030/savana
- Owner: deepak748030
- Created: 2025-06-17T20:37:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-22T05:45:33.000Z (7 months ago)
- Last Synced: 2026-04-05T22:35:25.501Z (3 months ago)
- Topics: api-documentation, backend, docker, ecommerce, express, grafana, jwt-authentication, kubernetes, microservices, mongodb, multer, nginx, nodejs, prometheus, rest-api, swagger
- Language: JavaScript
- Homepage: https://savana-server.vercel.app
- Size: 2.46 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Savana Ecommerce Backend
π Full Production-Ready Backend with Kubernetes Support and Swagger
Live Swagger API: http://your-domain.com/api-docs
---
## π Table of Contents
- [π Features](#-features)
- [π οΈ Technology Stack](#οΈ-technology-stack)
- [π Getting Started](#-getting-started)
- [βοΈ Kubernetes Setup](#%EF%B8%8F-kubernetes-setup)
- [π Project Structure](#-project-structure)
- [π Deployment](#-deployment)
- [π§ͺ API Testing](#-api-testing)
- [π License](#-license)
- [π¨βπ» Author](#-author)
---
## π Features
- βοΈ Modular Express Backend (routes, controllers, services)
- π§© Category & Product CRUD APIs
- π€ Image Upload via Multer
- π Product Search and Filter by Category
- π MongoDB Integration (external URI)
- π Swagger API Docs (`/api-docs`)
- π¦ Prometheus Metrics Ready (for Grafana)
- π§± Dockerized with Node 22 Alpine
- βΈοΈ Kubernetes with Ingress & NGINX
- π Public static file support via `/uploads`
---
## π οΈ Technology Stack
- **Node.js & Express.js** β Backend framework
- **MongoDB** β No internal DB pod, external URI-based
- **Multer** β File handling
- **Swagger** β Auto API documentation
- **Docker** β Containerization
- **Kubernetes** β Orchestration & scaling
- **NGINX + Ingress** β Domain + SSL route config
---
## π Getting Started
### π¦ Prerequisites
- Node.js >= 16
- Docker & Kubernetes (Minikube or cluster)
- MongoDB Atlas URI
### π§ Setup Locally
```bash
git clone https://github.com/deepak748030/savana.git
cd savana
npm install
cp .env.exports.js .env # Rename and fill your Mongo URI
npm run dev
````
Visit Swagger: [http://localhost:5000/api-docs](http://localhost:5000/api-docs)
---
## βοΈ Kubernetes Setup
### β
Files
* `k8s/deployment.yaml`
* `k8s/service.yaml`
* `k8s/ingress.yaml`
* `k8s/nginx-ingress.yaml`
### π§ Commands
```bash
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/nginx-ingress.yaml
kubectl apply -f k8s/ingress.yaml
```
> Ensure `Ingress` is enabled in Minikube:
```bash
minikube addons enable ingress
```
---
## π Project Structure
```
.
βββ src/
β βββ config/ # DB and env setup
β βββ controllers/ # Logic for API endpoints
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ uploads/ # Image uploads
β βββ utils/ # Helpers
β βββ swagger/ # Swagger config
β βββ app.js # Express app config
βββ server.js # Server entry point
βββ k8s/ # Kubernetes manifests
βββ Dockerfile # Docker container config
βββ .env.exports.js # Sample env file
βββ package.json
βββ README.md
```
---
## π Deployment
### π³ Docker Build & Push
```bash
docker build -t yourdockerhub/savana-backend .
docker push yourdockerhub/savana-backend
```
### βΈοΈ Deploy to Kubernetes
```bash
kubectl apply -f k8s/
```
Access via: `http:///api-docs` after setting ingress.
---
## π§ͺ API Testing
* **Docs:** `GET /api-docs`
* **File Uploads:** `POST /api/upload`
* **Protected Routes:** Use `Authorization: Bearer `
* **Metrics (for Prometheus):** `GET /metrics`
---
## π License
MIT License
```
Β© 2025 Deepak Kushwah
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
```
---
## π¨βπ» Author
**Deepak Kushwah**
Full Stack Developer (MERN + DevOps)
* π§ [deepak748930@gmail.com](mailto:deepak748930@gmail.com)
* π [LinkedIn](https://linkedin.com/in/deepak-kushwah)
* π» [GitHub](https://github.com/deepak748030)
> β Star this repo if you found it useful!
> π [https://github.com/deepak748030/savana](https://github.com/deepak748030/savana)