A comprehensive MERN stack application for automating compliance management, tracking regulatory obligations, and maintaining audit readiness.
- Smart Compliance Tracking: Automatically identify applicable regulations based on business profile
- Task Management: Convert regulations into actionable tasks with deadlines
- AI Copilot: Get intelligent guidance on compliance questions and document analysis
- Evidence Management: Upload and track compliance evidence for audit readiness
- Email Reminders: Automated daily reminders for overdue and upcoming tasks
- Role-Based Access Control: Admin, Manager, Employee, and Viewer roles
- Activity Logging: Track all compliance-related activities
- Analytics Dashboard: Visual insights into compliance posture and risk levels
- Multi-User Support: Organization-based user management
- React (v19.2.0) - UI framework
- Vite - Build tool and dev server
- React Router - Client-side routing
- React Markdown - Markdown rendering for AI responses
- Axios - HTTP client
- Node.js - Runtime environment
- Express - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- Bcrypt - Password hashing
- Multer - File upload handling
- Node-cron - Scheduled tasks
- Nodemailer - Email service
- HuggingFace API - AI/ML capabilities
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- Gmail account (for email notifications)
- HuggingFace API key (for AI features)
git clone <repository-url>
cd Compliance_Systemcd backend
npm installCreate a .env file in the backend directory:
PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/compliance_db
JWT_SECRET=your_jwt_secret_key_here
MAIL_USER=your_email@gmail.com
MAIL_PASS=your_gmail_app_password
HUGGINGFACE_API_KEY=your_huggingface_api_key
FRONTEND_URL=http://localhost:5173Note: For Gmail, you need to generate an App Password.
cd ../frontend
npm installCreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:5000# If using local MongoDB
mongodcd backend
npm startBackend will run on http://localhost:5000
cd frontend
npm run devFrontend will run on http://localhost:5173
cd frontend
npm run buildThis creates an optimized production build in the dist folder.
- Create a new Web Service on Render
- Connect your GitHub repository
- Configure:
- Build Command:
cd backend && npm install - Start Command:
cd backend && npm start - Environment: Node
- Build Command:
- Add environment variables:
PORT(Render provides this automatically)MONGO_URI(MongoDB Atlas connection string)JWT_SECRETMAIL_USERMAIL_PASSHUGGINGFACE_API_KEYFRONTEND_URL(your Vercel URL)
- Install Vercel CLI:
npm i -g vercel - Navigate to frontend directory:
cd frontend - Run:
vercel - Follow the prompts
- Add environment variable:
VITE_API_URL= your Render backend URL
Or deploy via Vercel Dashboard:
- Import your GitHub repository
- Set root directory to
frontend - Add environment variable:
VITE_API_URL - Deploy
- Create a free cluster on MongoDB Atlas
- Create a database user
- Whitelist IP addresses (0.0.0.0/0 for all IPs)
- Get connection string and update
MONGO_URIin backend environment variables
| Variable | Description | Example |
|---|---|---|
PORT |
Server port | 5000 |
MONGO_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/db |
JWT_SECRET |
Secret key for JWT tokens | your_secret_key |
MAIL_USER |
Gmail address for sending emails | your_email@gmail.com |
MAIL_PASS |
Gmail app password | xxxx xxxx xxxx xxxx |
HUGGINGFACE_API_KEY |
HuggingFace API key | hf_xxxxx |
FRONTEND_URL |
Frontend URL for CORS | https://your-app.vercel.app |
| Variable | Description | Example |
|---|---|---|
VITE_API_URL |
Backend API URL | https://your-api.onrender.com |
Compliance_System/
βββ backend/
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ jobs/ # Cron jobs
β βββ middleware/ # Express middleware
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ uploads/ # File uploads
β βββ utils/ # Utility functions
β βββ .env # Environment variables
β βββ server.js # Entry point
β βββ package.json
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ assets/ # Static assets
β β βββ App.jsx # Main app component
β β βββ config.js # API configuration
β β βββ main.jsx # Entry point
β βββ .env # Environment variables
β βββ vite.config.js # Vite configuration
β βββ package.json
βββ .gitignore
βββ README.md
- Admin: Full access to all features including user management
- Manager: Can manage tasks and view analytics
- Employee: Can upload evidence and complete tasks
- Viewer: Read-only access to dashboard
The system sends automated email reminders at 5:35 PM IST daily for:
- Overdue tasks
- Tasks due within 7 days
Configure the schedule in backend/jobs/reminderJob.js
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.
- Ensure MongoDB is running locally or Atlas connection string is correct
- Check network access settings in MongoDB Atlas
- Verify Gmail App Password is correct
- Enable "Less secure app access" or use App Password
- Check MAIL_USER and MAIL_PASS environment variables
- Ensure FRONTEND_URL in backend .env matches your frontend URL
- Check that backend CORS configuration allows your frontend origin
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check Node.js version compatibility
- Ensure all environment variables are set
For issues and questions, please open an issue on GitHub.
Built with β€οΈ for compliance automation