Development: http://localhost:5000
Production: [Your production URL]
The platform includes a Botpress-powered multilingual chatbot that provides:
- 24/7 instant assistance to users
- Support for multiple languages (English, Hindi, and other Indian languages)
- Interactive menu options for common queries
- Context-aware intelligent responses
- Guided navigation and help
- FAQ integration and quick answers
The chatbot is embedded directly in the frontend and requires no API calls from the backend.
Most endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your_jwt_token>
POST /api/auth/student-loginRequest Body:
{
"studentId": "202400000001",
"password": "Password123!"
}Success Response (200):
{
"success": true,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"student": {
"id": "507f1f77bcf86cd799439011",
"studentId": "202400000001",
"studentName": "Aarav Mehta",
"email": "aarav.mehta@example.com",
"collegeName": "Vidyasetu College of Engineering",
"deptName": "Computer Science",
"deptId": "CSE01",
"yearOfAdmission": "2024",
"currentYear": "1"
}
}Error Response (401):
{
"success": false,
"message": "Invalid student ID or password"
}POST /api/auth/faculty-loginRequest Body:
{
"facultyId": "FAC001",
"password": "SecurePass123"
}Success Response (200):
{
"success": true,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"faculty": {
"id": "507f1f77bcf86cd799439012",
"facultyId": "FAC001",
"name": {
"full": "Dr. Arvind Sharma",
"first": "Arvind",
"last": "Sharma"
},
"email": "arvind.sharma@university.edu",
"designation": "Professor",
"department": "Computer Science"
}
}POST /api/auth/admin-loginRequest Body:
{
"email": "admin@vidyasetu.com",
"password": "AdminPass123"
}Success Response (200):
{
"success": true,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"admin": {
"id": "507f1f77bcf86cd799439013",
"name": "Administrator",
"email": "admin@vidyasetu.com",
"role": "superadmin"
}
}GET /api/auth/student-profile
Authorization: Bearer <token>Success Response (200):
{
"success": true,
"student": {
"studentId": "202400000001",
"studentName": "Aarav Mehta",
"email": "aarav.mehta@example.com",
"collegeName": "Vidyasetu College of Engineering",
"deptName": "Computer Science",
"deptId": "CSE01",
"academicYear": "2024-2025",
"semester": "5",
"phoneNumber": "9876543210",
"status": "active",
"lastLogin": "2025-10-31T10:30:00.000Z"
}
}GET /api/auth/faculty-profile
Authorization: Bearer <token>Success Response (200):
{
"success": true,
"faculty": {
"facultyId": "FAC001",
"name": {
"full": "Dr. Arvind Sharma",
"first": "Arvind",
"last": "Sharma"
},
"email": "arvind.sharma@university.edu",
"designation": "Professor",
"department": "Computer Science",
"roles": ["HOD", "Research Supervisor"],
"expertise": ["Machine Learning", "Distributed Systems"],
"status": "active"
}
}GET /api/auth/admin-profile
Authorization: Bearer <token>GET /api/auth/search?query=<search_term>
Authorization: Bearer <token>Query Parameters:
query(required): Search term
Success Response (200):
{
"success": true,
"results": [
{
"type": "student",
"id": "202400000001",
"name": "Aarav Mehta",
"department": "Computer Science",
"email": "aarav.mehta@example.com"
}
]
}PUT /api/auth/update-details
Authorization: Bearer <token>Request Body:
{
"email": "new.email@example.com",
"phoneNumber": "9876543210",
"address": "New Address"
}GET /api/auth/verify-token
Authorization: Bearer <token>Success Response (200):
{
"success": true,
"valid": true,
"user": {
"id": "507f1f77bcf86cd799439011",
"role": "student"
}
}GET /api/healthSuccess Response (200):
{
"success": true,
"message": "Server is running",
"timestamp": "2025-10-31T10:30:00.000Z",
"uptime": 12345.67,
"memory": {
"rss": 123456789,
"heapTotal": 98765432,
"heapUsed": 87654321,
"external": 1234567
},
"mongoStatus": "Connected"
}GET /api/testSuccess Response (200):
{
"success": true,
"message": "Test route working",
"environment": "development",
"timestamp": "2025-10-31T10:30:00.000Z"
}400 Bad Request:
{
"success": false,
"message": "Invalid request parameters"
}401 Unauthorized:
{
"success": false,
"message": "Access token required"
}403 Forbidden:
{
"success": false,
"message": "Access denied"
}404 Not Found:
{
"success": false,
"message": "Route not found",
"requestedPath": "/api/unknown",
"method": "GET"
}500 Internal Server Error:
{
"success": false,
"message": "Internal server error"
}All requests should include:
Content-Type: application/json
JWT tokens expire after 24 hours. Client applications should handle token refresh or re-authentication.
(To be implemented) - Consider implementing rate limiting for production:
- Login endpoints: 5 requests per minute
- General API: 100 requests per minute
Allowed origins are configured in the backend .env file:
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3001
For endpoints returning lists, pagination will follow this format:
GET /api/endpoint?page=1&limit=20Response:
{
"success": true,
"data": [],
"pagination": {
"currentPage": 1,
"totalPages": 5,
"totalItems": 100,
"itemsPerPage": 20
}
}- Postman Collection: [Link to be added]
- OpenAPI Spec: [Link to be added]
- Interactive API Docs: [Link to be added]
Last Updated: October 31, 2025