This repository contains the backend API for a Bus Booking System, built using Express.js and MongoDB. The API supports authentication, authorization, bus and route management, and user bookings.
Use the following credentials to authenticate as an admin:
{
"username": "AnthillNetworks",
"email": "anthillnetworks@example.com",
"password": "password123"
},
{
"username": "Rithiga",
"email": "Rithiga@example.com",
"password": "password123"
}✔ Manage users (View, Update, Delete)
✔ Add and update bus details
✔ Add and update routes
✔ View all bookings
✔ Search for buses
✔ Book and cancel bus tickets
✔ Add and delete reviews
✔ JWT-based authentication for security
✔ API documentation via Swagger
✔ Postman Collection available for easy testing
- View and test API endpoints using Swagger:
🔗 Swagger Docs
- To test APIs using Postman, import the collection file:
Anthill-Networks-Bus.postman_collection.json
git clone https://github.com/rithigavijayendran/Anthill-Backend.git
cd Anthill-Backend npm install Create a .env file and configure:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretnode index.js The server will start running on http://localhost:5000