Full-stack MERN business analytics dashboard that lets you upload CSV files, store parsed records in MongoDB, explore interactive KPI and chart views, and export the current dashboard summary as a PDF report.
- Frontend: React, Vite, Tailwind CSS, Chart.js
- Backend: Node.js, Express, Mongoose
- Database: MongoDB
- Extras: Multer, Papa Parse, PDFKit
client/
server/
controllers/
models/
routes/
- Copy
.env.exampletoserver/.envor create it manually with your MongoDB URI. - Install dependencies:
npm run install:all- Start MongoDB locally, or update
MONGODB_URIfor your target database. - Run the app in development:
npm run dev- Open
http://localhost:5173.
Create server/.env with:
PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/business_analytics
CLIENT_URL=http://localhost:5173POST /api/uploaduploads a CSV, parses it, infers schema, and stores records.GET /api/datasetslists uploaded datasets.GET /api/datasets/:id/analyticsreturns dashboard KPIs, filters, and chart data.GET /api/datasets/:id/reportstreams a PDF report for the active filter state.
- The app is designed to work with arbitrary CSVs. It infers likely numeric, date, category, and region columns to generate useful analytics automatically.
- If a CSV does not include a date, category, or region column, the dashboard gracefully falls back to available dimensions.