RAILSYNC is a web-based railway management system that offers efficient railway ticket booking solutions with integrated database management. The website has a minimalistic, dark-themed design and is built to be scalable and robust.
-
User Authentication: Users can sign up, log in, and manage their accounts securely.
-
Ticket Booking: Users can search for trains, view schedules, and book tickets.
-
Admin Panel: Administrators have access to manage trains, stations, schedules, and user data.
-
Database Integration: Utilizes a Microsoft SQL Server database to store and retrieve train, station, schedule, and user information.
-
Responsive Design: The website is designed to be accessible and usable across different devices and screen sizes.
-
Sessions: Sessions are implemented for user and admin authentication. You can check the session status by:
/sessionCheckUser
/sessionCheckAdmin
-
Database Status: Database status routes are also implemented to reconnect or check the connection with the database hosted on cloud.
/checkDatabaseConnection
/connectDatabase
-
Working Contact Form: The users can send their query and it will be recieved on your gmail after configuring nodemail object by simply entering
your-email
and16-digit AppPass
- Frontend: HTML, CSS, JavaScript, Bootstrap
- Backend: EXPRESS.JS AND NODE.JS
- Database: Microsoft SQL Server
- Authentication: JS
- Production: local host
- Deployment: AZURE
The code in this repository is licensed under the MIT License.
MIT License
Copyright (c) 2024 | maazkhan75
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- Clone the repository:
git clone https://github.com/maazkhan75/RailSync.git
-
First you should setup your database from the backup
RailSync_DB_backup.bak
file provided in the SQL directory of repo. -
Plug your credentials in the .env file.
-
Run the server and visit
localhost:4000
.
To test the website, follow these steps:
-
Ensure that you have all necessary dependencies installed.
-
Start the server and navigate to the website in your browser.
-
Use the following test credentials to log in:
-
User
- CNIC:
0000000000000
- Password:
pass123
- CNIC:
-
Admin
- CNIC:
0000000000000
- Pin:
1234
- CNIC:
-
-
Test the following functionalities:
- User signup, login, and session persistence.
- Admin login and management of trains, stations, routes, and user data.
- Train search and ticket booking.
- Check the session status using the following endpoints:
/sessionCheckUser
/sessionCheckAdmin
- If you are not sure about database connection you can check through:
/checkDatabaseConnection
- If due to any reason database connection is lost you can reconnect using:
/connectDatabase
-
Test Case
- SEARCH TRAIN FROM
LHR TO ISL
ON14 JUNE 2024
-Seamless Travel
(journey is continuous)LHR -> ISL
11:00 GMT - 18:00 GMT(BlueWays)
-Segmented Travel
(journey divided in two parts)LHR -> GRW
(VelocityExpress)
05:00 GMT - 08:25 GMT +GRW -> ISL
(EagleRide)
09:50 GMT - 14:30 GMTLHR -> GRW
(VelocityExpress)
05:00 GMT - 08:25 GMT +GRW -> ISL
(NeoSpark)
11:30 GMT - 15:50 GMT
- Important Note
-
You cannot change or update profile or password of Default User(maaz khan) even you cannot
delete or edit
default user and admin from admin panel. -
In deployed version
TIME
is showing inUTC (Universal Time Coordinated)
but if you setup the project locally it will show according to your location by adding appropriate hours as shown in ScreenShots -
The final attributes of the database tables may be
slightly different
from the attributes of entities inSCHEMA.pdf
So you should always see tables definition inSQL Server
-
(If you want to travel from station A to B)
- you should have stations
A & B
- you should have track between
A & B
- you should have a train
- you should have carriage/s in it
- you should have a route defined from
A -> B
on your trip Data
- you should have stations