This API provides a robust backend solution for managing digital services at a college. It is designed to handle events, notifications, and tender management efficiently.
To install and run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/college-api.git cd college-api
-
Install Dependencies: npm install
-
Set up environment variables: Create a .env file in the root directory and add the necessary environment variables. Refer to the Environment Variables section for required variables.
-
Run the development server: npm run dev
- Event Management: Add, update, delete, and retrieve event details.
- Notification System: Manage and send notifications to users.
- Tender Management: Handle tender-related operations with ease.
- Authentication: Secure API endpoints using JSON Web Tokens (JWT).
- File Upload: Use Multer and GridFS for handling file uploads.
This API is designed for use by the college’s website to manage various digital services. It provides a RESTful interface for handling operations related to events, notifications, and tenders.
Here’s a brief overview of the main API endpoints:
-
Events
- GET /admin/events/getAllEvents: Retrieve all events.
- POST /admin/deleteEvent/: Create a new event.
- PUT /admin/events/updateEvent/:id: Update an existing event.
- DELETE /admin/deleteEvent/:id: Delete an event.
-
Notifications
- GET /admin/notifications/getAllNotifications?page=1&perPage=100: Retrieve all notifications.
- POST /admin/notifications/createNotification: Create a new notification.
-
Tenders
- GET /admin/tenders/getAllTenders: Retrieve all tenders.
- POST /admin/tenders/addTender: Create a new tender.
The following environment variables need to be set in the .env file:
- PORT: The port number to run the server on.
- MONGO_URI: MongoDB connection string.
- JWT_SECRET: Secret key for JWT authentication.
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
Summary: The GPLv3 license allows you to freely use, modify, and distribute this software, provided that any derivative works are also licensed under the GPLv3. This ensures that the software and its derivatives remain free and open-source.