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-apinpm installCreate a .env file in the root directory and add:
PORT=5000
MONGODB_URI=<your-mongodb-uri>
JWT_SECRET=<your-secret-key>
npm run devThe API will be available at http://localhost:5000.
POST /api/auth/loginRequest Body:
{
"email": "user@example.com",
"password": "password123"
}Response:
{
"token": "your-jwt-token"
}POST /api/professors/availabilityRequest Body:
{
"professorId": "12345",
"availableSlots": ["2025-02-12T10:00:00Z", "2025-02-12T14:00:00Z"]
}GET /api/professors/12345/availabilityResponse:
{
"availableSlots": ["2025-02-12T10:00:00Z", "2025-02-12T14:00:00Z"]
}POST /api/appointments/bookRequest 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.