The Samurai Train Service Backend is a backend system developed to manage train schedules, ticket purchases, route planning, and wallet transactions for the Samurai Train service in Bangladesh. This project aims to enhance the efficiency and functionality of the train service to meet the increasing demands of commuters. Pdf link: Preliminary Round Problem Statement.pdf
- User Management: Allows users to register and manage their accounts, including wallet balances.
- Station Management: Enables the management of train stations, including location information and associated services.
- Train Management: Facilitates the management of trains, schedules, routes, and seating capacity.
- Ticketing System: Provides users with the ability to purchase tickets using their wallet balance.
- Route Planning: Offers users the option to plan optimal routes between stations based on cost or time.
- Programming Language: JavaScript (Node.js)
- Web Framework: Express.js
- Database: PostgreSQL
- Containerization: Docker
- Clone the repository to your local machine.
- Install Node.js and npm if not already installed.
- Install PostgreSQL database and configure the connection settings.
- Set up environment variables required for the application (e.g., database connection string, API keys).
- Run
npm install
to install dependencies. - Start the application using
nodemon index
. - The application should now be accessible at
http://localhost:8000
.
- Make sure
Docker Desktop
is installed on your machine. - Open a terminal or command prompt and navigate to the root directory of the project.
- Build the Docker image using the following command:
docker compose up -d --build
- After the image is built successfully, check the list of Docker images using:
docker images
- The application should now be accessible at
http://localhost:8000
. - To stop the running containers, use:
docker compose down
Make sure to follow these steps in sequence to successfully run the application using Docker.
The user object represents the person using the app. It includes:
user_id
: User's IDuser_name
: User's full namebalance
: User's wallet balance
The station object represents a metro station where trains can stop. It includes:
station_id
: Station's IDstation_name
: Station's namelongitude
: Longitude coordinatelatitude
: Latitude coordinate
The train object represents a metro train and contains a series of stations. It includes:
train_id
: Train's IDtrain_name
: Train's namecapacity
: Seating capacitystops
: List of stops including station ID, arrival time, departure time, and fare.
Team Name: CODE_CRUSADERS
Institution Name: Bangladesh University of Engineering and Technology (BUET)
Email:-
sdipit099@gmail.com (Dipit Saha)
altairahad001@gmail.com (Abrar Jahin)
hmdmehedi10107@gmail.com (Md. Mehedi Hasan)