A full-stack MERN-based Contract & Invoice Management System that allows businesses to efficiently create, track, and manage contracts and invoices. It includes role-based access control, automated tax calculations, and a structured payment and deduction system.
- MongoDB
- Express.js
- React.js
- Node.js
- Clone the repository:
git clone <repository-url> cd CIMS
- Navigate to the backend folder and install dependencies:
cd backend npm install
- Navigate to the frontend folder and install dependencies:
cd ../frontend npm install
- Install additional libraries such as
lucide-react
if required (refer topackage.json
). - Configure environment variables (see below).
- Start the backend server:
npm run dev
- Start the frontend server:
npm start
Create a .env
file in the backend folder with the following content:
MONGODB_URI=mongodb+srv://<USERNAME>:<PASSWORD>@cluster0.mongodb.net/contract_management?retryWrites=true&w=majority
PORT=5000
JWT_SECRET=<YOUR_SECRET_KEY>
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
SENDGRID_API_KEY=<YOUR_SENDGRID_API_KEY>
SENDGRID_FROM_EMAIL=<YOUR_SENDGRID_FROM_EMAIL>
UPLOAD_PATH=uploads
MAX_FILE_SIZE=5242880 # 5MB
ALLOWED_FILE_TYPES=image/jpeg,image/jpg,image/png
- Creating Contracts & Invoices: Use the "Create Contract" button on the contract page and the "Create Invoice" button on the invoice page.
- Admin Setup: Before using the frontend, create an admin user using Postman:
- Use the API to create a user with the admin role.
- Log in using that admin account from the frontend.
Without this step, the system may not function as expected.
- Admin: Full access (manage users, contracts, and invoices).
- User: Can only create and view contracts/invoices. No edit or delete permissions.
- Users can refer to the backend route files for available API endpoints.
- A Postman collection can be generated by referring to the backend schema models.
- Implement a client portal where companies under contract can view their contracts, invoices, and make direct payments.
- Enhance existing features and introduce more automation in invoice tracking and payments.
This project was developed entirely by Mehul Patel from scratch. No external contributors.
This project does not include a license.