The College Appointment System API allows students to book appointments with professors. Professors can specify their availability, and students can authenticate, view available slots, and book appointments.
College Appointment System API
- ✅ User authentication (Students & Professors)
- ✅ Professors can specify available time slots
- ✅ Students can view available slots and book appointments
- ✅ Secure data handling using MongoDB
- ✅ Deployed on Render
- Backend: Node.js, Express.js
- Database: MongoDB (Free version)
- Deployment: Render
- Authentication: JSON Web Tokens (JWT)
Ensure you have the following installed:
- Node.js
- npm or yarn
- MongoDB (if running locally)
git clone <repository-url>
cd college-appointment-system-api
npm install
Create a .env
file in the root directory and add:
PORT=5000
MONGODB_URI=<your-mongodb-uri>
JWT_SECRET=<your-secret-key>
npm run dev
The API will be available at http://localhost:5000
.
POST /api/auth/login
Request Body:
{
"email": "user@example.com",
"password": "password123"
}
Response:
{
"token": "your-jwt-token"
}
POST /api/professors/availability
Request Body:
{
"professorId": "12345",
"availableSlots": ["2025-02-12T10:00:00Z", "2025-02-12T14:00:00Z"]
}
GET /api/professors/12345/availability
Response:
{
"availableSlots": ["2025-02-12T10:00:00Z", "2025-02-12T14:00:00Z"]
}
POST /api/appointments/book
Request Body:
{
"studentId": "67890",
"professorId": "12345",
"time": "2025-02-12T10:00:00Z"
}
- Push the code to GitHub.
- Sign in to Render and create a new Web Service.
- Connect your GitHub repository.
- Set environment variables in Render's Environment section.
- Deploy the application.
- Add email notifications for bookings.
- Implement calendar integration.
- Add real-time updates using WebSockets.