AgentFlow is a powerful full-stack web application built with the MERN stack (MongoDB, Express.js, React.js, Node.js) designed for administrators to manage a team of agents and efficiently distribute tasks. The application features secure admin authentication, agent management capabilities, and a seamless process for uploading customer lists (via CSV/XLSX) which are automatically and evenly distributed among available agents.
| Resource | Link |
|---|---|
| π Live Application | View Deployed App |
- JWT-based admin authentication
- Password hashing with bcrypt
- Protected routes and middleware
- Create and manage team agents
- View comprehensive agent listings
- Assign and track agent workloads
- Support for
.csv,.xlsx, and.xlsformats - Robust file type validation
- Error handling for malformed files
- Core Feature: Intelligent parsing and distribution
- Equal distribution among up to 5 agents
- Smart remainder handling (sequential assignment)
- Real-time task allocation
- Clean, organized layout
- Real-time agent and task overview
- Interactive data visualization
- Modern, responsive design with Tailwind CSS
- Stunning 3D animated background (Three.js + React Three Fiber)
- Real-time notifications with Sonner
- Mobile-first responsive design
| Category | Technologies |
|---|---|
| Frontend | |
| 3D Graphics | React Three Fiber, Drei |
| Backend | |
| Database | |
| Authentication | JWT, bcrypt.js |
| File Processing | Multer, csv-parser, xlsx |
| Deployment |
mern-agent-app/
βββ ποΈ backend/
β βββ π config/ # Database & app configuration
β βββ π controllers/ # Request handlers & business logic
β βββ π models/ # MongoDB schemas & models
β βββ π routes/ # API endpoint definitions
β βββ π middleware/ # Authentication & validation
β βββ π .env # Environment variables
β βββ π server.js # Express server entry point
βββ ποΈ frontend/
βββ π src/
β βββ π components/ # Reusable React components
β βββ π pages/ # Application pages/views
β βββ π hooks/ # Custom React hooks
β βββ π services/ # API communication layer
β βββ βοΈ App.jsx # Root component
β βββ π― main.jsx # Application entry point
βββ π .env.local # Frontend environment variables
βββ β‘ vercel.json # Vercel deployment configuration
Before you begin, ensure you have the following installed:
- Node.js (v18 or later) - Download
- npm or yarn package manager
- MongoDB - Local instance or MongoDB Atlas (free tier available)
git clone https://github.com/Chaithanyaina/Agent_Manager.git
cd mern-agent-appcd backend
npm installCreate a .env file in the backend directory:
# Database Configuration
MONGO_URI=your_mongodb_connection_string
# Security
JWT_SECRET=your_super_secret_key_for_jwt_tokens
# Server Configuration
PORT=5000
# Default Admin Credentials (created on first server start)
ADMIN_EMAIL=**************@gmail.com
ADMIN_PASSWORD=**************cd ../frontend
npm installCreate a .env.local file in the frontend directory:
# Backend API Configuration
VITE_API_URL=http://localhost:5000/apicd backend
npm run serverπ Backend runs on: http://localhost:5000
cd frontend
npm run devπ Frontend runs on: http://localhost:5173
- Open your browser to
http://localhost:5173 - Login with your admin credentials from the
.envfile - Start creating agents and distributing tasks!
This application uses a split deployment strategy for optimal performance:
- Push to GitHub: Ensure your code is in a GitHub repository
- Create Render Service:
- Go to Render and create a new "Web Service"
- Connect your GitHub repository
- Configure Settings:
Root Directory: backend Build Command: npm install Start Command: npm start - Environment Variables: Add all variables from your local
backend/.envplus:FRONTEND_URL=https://your-frontend-app.vercel.app
- Create Vercel Project: Connect the same GitHub repository
- Automatic Detection: Vercel will auto-detect Vite configuration
- Environment Variables: Add:
VITE_API_URL=https://your-backend.onrender.com/api
- SPA Routing: The included
vercel.jsonhandles page refresh routing
| Variable | Description | Example |
|---|---|---|
MONGO_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/db |
JWT_SECRET |
Secret key for JWT tokens | your-256-bit-secret |
PORT |
Server port | 5000 |
ADMIN_EMAIL |
Default admin email | ad**************le.com |
ADMIN_PASSWORD |
Default admin password | sec**********d |
| Variable | Description | Example |
|---|---|---|
VITE_API_URL |
Backend API endpoint | http://localhost:5000/api |
- π§ Email: chaithanyainaganti@gmail.com