A full-stack web application for uploading Excel files, parsing data, and creating interactive 2D and 3D charts with AI-powered insights.
- User Authentication: JWT-based registration and login
- Excel File Upload: Upload and parse .xls/.xlsx files
- Interactive Charting: Create bar, line, pie, scatter, and 3D bar charts
- Chart Export: Download charts as PNG or PDF
- AI Insights: Get AI-powered analysis of your data (requires OpenAI API key)
- Admin Dashboard: Manage users and view usage statistics
- Upload History: View and analyze previously uploaded files
- Node.js + Express.js
- MongoDB with Mongoose
- JWT authentication
- Multer for file uploads
- SheetJS (xlsx) for Excel parsing
- bcrypt for password hashing
- React.js with Vite
- Redux Toolkit for state management
- React Router for navigation
- Chart.js for 2D charts
- Three.js for 3D charts
- Tailwind CSS for styling
- Axios for API calls
.
├── backend/
│ ├── models/ # MongoDB models (User, File, Analysis)
│ ├── routes/ # Express routes (auth, files, analysis, admin, ai)
│ ├── middleware/ # Auth and error handling middleware
│ ├── server.js # Express server entry point
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── store/ # Redux store and slices
│ │ ├── utils/ # API utilities
│ │ └── App.jsx
│ └── package.json
└── README.md
- Node.js (v16 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Create a
.envfile in the backend directory:
MONGODB_URI=mongodb://localhost:27017/excel-analytics
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
PORT=5000
OPENAI_API_KEY= # Optional: Add your OpenAI API key for AI insights- Start the backend server:
npm run devThe backend will run on http://localhost:5000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will run on http://localhost:3000
MONGODB_URI: MongoDB connection stringJWT_SECRET: Secret key for JWT token signing (use a strong random string)PORT: Server port (default: 5000)OPENAI_API_KEY: (Optional) OpenAI API key for AI insights feature
- Register/Login: Create an account or login with existing credentials
- Upload Excel File: Go to Dashboard and upload a .xls or .xlsx file
- Analyze Data: Select X/Y axes and chart type, then generate the chart
- Export Charts: Download charts as PNG or PDF
- Get AI Insights: Click "Get Insights" to receive AI-powered analysis (if API key is configured)
- Admin Access: Admin users can view user list and usage statistics
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
POST /api/files/upload- Upload Excel file (protected)GET /api/files/history- Get upload history (protected)GET /api/files/:fileId- Get file details (protected)
POST /api/analysis- Create analysis configuration (protected)GET /api/analysis/:fileId- Get analyses for file (protected)
GET /api/admin/users- Get all users (admin only)GET /api/admin/usage- Get usage statistics (admin only)
POST /api/ai/insights/:fileId- Get AI insights (protected)
- The backend stores file metadata and sample data (first 10 rows) in MongoDB. For production, consider storing full data in a separate collection or using a file storage service.
- The 3D chart uses Three.js and supports mouse drag for rotation.
- Chart export uses html2canvas and jsPDF libraries.
- AI insights require an OpenAI API key. Without it, mock insights are returned.
- Backend uses ES modules (
"type": "module"in package.json) - Frontend uses Vite for fast development
- Redux Toolkit is used for state management
- Tailwind CSS is used for styling
ISC