A modern, full-stack sales analytics dashboard with stunning UI, dark mode, and comprehensive data visualization.
- 🎨 Modern UI: Glassmorphism design with gradient accents and smooth animations
- 🌙 Dark Mode: Toggle between light and dark themes
- 📊 Interactive Charts: Bar charts and pie charts with Chart.js
- 📱 Responsive Design: Works perfectly on all devices
- 🔍 Search & Filter: Search transactions and filter by month
- 📦 Image Proxy: Handles external CDN images seamlessly
- 💾 MongoDB Integration: Efficient data storage and retrieval
- 🚀 Fast Performance: Optimized build with lazy loading
Frontend:
- React 18.3.1
- Chart.js 4.4.4
- Axios 1.7.7
- CSS3 with glassmorphism effects
Backend:
- Node.js with Express 4.21.0
- MongoDB with Mongoose 8.7.0
- Axios for image proxying
- CORS enabled
- Node.js 18+
- MongoDB (local or Atlas)
- Git
- Clone the repository
git clone https://github.com/Aniket-404/MERN-Stack-Sales-Analytics-Dashboard.git
cd MERN-Stack-Sales-Analytics-Dashboard- Setup Backend
cd mern-coding-challenge-backend
npm install
cp .env.example .env
# Edit .env with your MongoDB URI
npm start- Setup Frontend
cd ../mern-coding-challenge-frontend
npm install
cp .env.example .env
# Edit .env with backend URL
npm start-
Seed Database Visit:
http://localhost:5000/api/seed -
Access Application Open:
http://localhost:3000
This project is configured for easy deployment to Render using Docker and Blueprint.
Quick Deploy:
- Push to GitHub
- Go to Render Dashboard
- Click "New +" → "Blueprint"
- Connect your repository
- Set environment variables:
- Backend:
MONGO_URI(your MongoDB connection string) - Frontend:
REACT_APP_BACKEND_URL(your backend URL)
- Backend:
- Click "Apply"
Detailed Instructions: See DEPLOYMENT.md
Backend (.env):
PORT=5000
MONGO_URI=mongodb://localhost:27017/mern_coding_challenge
NODE_ENV=development
FRONTEND_URL=http://localhost:3000Frontend (.env):
REACT_APP_BACKEND_URL=http://localhost:5000MERN-Stack-Sales-Analytics-Dashboard/
├── mern-coding-challenge-backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── Dockerfile
│ └── server.js
├── mern-coding-challenge-frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── App.js
│ │ └── App.css
│ ├── Dockerfile
│ └── nginx.conf
├── render.yaml
├── DEPLOYMENT.md
└── README.md
GET /api/transactions- Get paginated transactionsGET /api/statistics- Get sales statisticsGET /api/bar-chart- Get bar chart dataGET /api/pie-chart- Get category distributionGET /api/seed- Seed database with initial dataGET /api/image-proxy- Proxy external images
- Glassmorphism: Frosted glass effect with backdrop blur
- Gradients: Purple, pink, and blue gradient themes
- Animations: Smooth transitions and hover effects
- Dark Mode: System-aware theme switching
- Loading States: Skeleton loaders and spinners
- Responsive: Mobile-first design approach


