A powerful MERN stack backend for Excel file analytics with 2D/3D chart generation capabilities.
- User Authentication: JWT-based authentication system
- Role-Based Access: Project-specific admin and member roles
- Excel Processing: Upload and parse .xlsx/.xls files using SheetJS
- Chart Generation: Backend processing for 2D/3D chart data
- Project Management: Single usage vs Organization projects
- Email Invitations: Nodemailer integration for project invitations
- File Management: Secure file upload with Multer
- Database: MongoDB with Prisma ORM
- TypeScript: Full TypeScript support for better development experience
- Runtime: Node.js
- Framework: Express.js
- Language: TypeScript
- Database: MongoDB
- ORM: Prisma
- Authentication: JWT
- File Processing: SheetJS (xlsx)
- File Upload: Multer
- Email: Nodemailer
- Validation: Joi
- Clone the repository:
git clone https://github.com/gourab8389/excel-analytics-server.git
cd excel-analytics-server- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envEdit .env with your configuration:
PORT=5000
NODE_ENV=development
DATABASE_URL="mongodb://localhost:27017/excel_analytics"
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRES_IN=7d
# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
FROM_EMAIL=noreply@excelanalytics.com
FROM_NAME=Excel Analytics Platform
# Frontend URL
FRONTEND_URL=http://localhost:3000- Set up the database:
# Generate Prisma client
npm run db:generate
# Push schema to database
npm run db:push- Start the development server:
npm run devThe server will start on http://localhost:5000
npm run build
npm startPOST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile
POST /api/projects- Create projectGET /api/projects- Get user projectsGET /api/projects/:projectId- Get project detailsPOST /api/projects/:projectId/invite- Invite user to projectPOST /api/projects/accept-invitation- Accept project invitationPUT /api/projects/:projectId- Update project detailsDELETE /api/projects/:projectId- Delete projectPOST /api/projects/:projectId/update-member- Update member roleDELETE /api/projects/:projectId/remove-member- Remove a member from project
POST /api/uploads/:projectId- Upload Excel fileGET /api/uploads/:projectId- Get project uploadsGET /api/uploads/file/:uploadId- Get upload detailsDELETE /api/uploads/file/:uploadId- Delete upload
POST /api/charts/upload/:uploadId- Create chartGET /api/charts/upload/:uploadId- Get upload chartsGET /api/charts/:chartId- Get chart detailsPUT /api/charts/:chartId- Update chartDELETE /api/charts/:chartId- Delete chart
GET /api/users/dashboard- Get user dashboard data