CIMS is a full-stack web application designed to streamline communication and information management within a college or university. It provides distinct portals for students and administrators, each with features tailored to their roles.
- Authentication: Secure registration and login for students.
- Course Enrollment: View and manage enrolled courses.
- Fee Payment: A dummy portal to simulate fee payment.
- Notice Board: View notices published by the admin.
- Authentication: Secure login for administrators.
- Student Approval: Admins can approve or reject new student registrations.
- Manage Students: View and manage student information.
- Manage Courses: Add, update, and delete courses.
- Publish Notices: Create and publish notices for students.
- Framework: Next.js
- UI Library: React
- Styling: Tailwind CSS with shadcn/ui for components.
- Icons: Lucide React
- Theming:
next-themesfor light/dark mode. - Linting: ESLint
- Language: TypeScript
- Framework: Express.js
- Database: MongoDB with Mongoose ODM.
- Authentication: JSON Web Tokens (JWT) for secure authentication.
- Password Hashing: bcrypt for hashing passwords.
- Middleware: CORS, cookie-parser.
- Development: Nodemon for automatic server restarts.
The project is organized into two main directories:
/
├── backend/ # Contains the Node.js/Express.js API
└── frontend/ # Contains the Next.js client application
Follow these instructions to get a copy of the project up and running on your local machine.
- Node.js (v18.x or later recommended)
- npm, yarn, or pnpm
- MongoDB (ensure it's running locally or provide a connection string in a
.envfile in thebackenddirectory).
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackenddirectory and add the following environment variables:MONGO_URI=<your_mongodb_connection_string> JWT_SECRET=<your_jwt_secret> - Run the server:
The API will be running at
npm start
http://localhost:5000.
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Run the development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000.
The backend provides the following API endpoints, all prefixed with /api.
-
POST /login: Login for administrators. -
GET /students: Get a list of all students. (Admin only) -
GET /students/:id: Get a single student by ID. (Admin only) -
PATCH /students/:id: Update a student's information. (Admin only) -
DELETE /students/:id: Delete a student. (Admin only) -
PATCH /students/:id/approve: Approve a student's registration. (Admin only) -
DELETE /students/:id/reject: Reject a student's registration. (Admin only) -
GET /me: Get the profile of the currently logged-in admin. (Admin only) -
GET /logout: Logout the currently logged-in admin. (Admin only)
-
GET /: Get a list of all courses. -
GET /:id: Get a single course by ID. (Admin only) -
POST /add: Add a new course. (Admin only) -
PUT /update/:id: Update a course by ID. (Admin only) -
DELETE /delete/:id: Delete a course by ID. (Admin only)
-
GET /: Get a list of all notices. -
POST /add: Add a new notice. (Admin only) -
PUT /update/:id: Update a notice by ID. (Admin only) -
DELETE /delete/:id: Delete a notice by ID. (Admin only)
-
POST /register: Register a new student. -
POST /login: Login for students. -
GET /me: Get the profile of the currently logged-in student. (Student or Admin) -
PATCH /fees: Update the fee status for the currently logged-in student. (Student only) -
GET /logout: Logout the currently logged-in user (student or admin).