RailSaathi is an AI-powered railway assistance system that simplifies ticket booking for the Indian Railways. It features user authentication, train search, real-time seat booking, and AI-driven suggestions. Built with Flask, SQLite, and JavaScript, this project aims to enhance user experience and streamline railway operations. Deployable on Render.
- User Authentication: Secure login and registration processes.
- Train Search Functionality: Search for trains between specified source and destination stations.
- Seat Booking: Real-time seat booking with immediate confirmation.
- AI-Powered Suggestions: Intelligent recommendations for seat selection.
- User Dashboard: Manage bookings and view travel history.
- Responsive Design: Mobile-friendly interface for all devices.
- Backend: Flask (Python)
- Database: SQLite with SQLAlchemy ORM
- Frontend: HTML, CSS, JavaScript
- AI Model: Machine learning algorithms for seat suggestions
- Deployment: Render
- Python 3.13.0 installed
- SQLite3 installed
- Git installed
-
Clone the repository:
git clone https://github.com/yourusername/RailSaathi.git
-
Change into the project directory:
cd RailSaathi
-
Create a virtual environment and activate it:
python3 -m venv venv
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the database:
- Import the provided SQL script to set up the database:
railsaathi.sql
- Update the
.env
file with your SQLite credentials:DB_URI=sqlite:///railsathi.db
- Import the provided SQL script to set up the database:
-
Run the application:
python app.py
-
Access the application: Open your browser and visit:
http://127.0.0.1:5000
- Add a
.env
file with your environment variables:DB_URI=sqlite:///railsathi.db DATABASE_URL=sqlite:///railsaathi.db SECRET_KEY=your_secret_key FLASK_APP=app.app
- Update the
render.yaml
with necessary deployment configurations. - Push the changes to your repository and link it with Render.
- Make sure
.env
is added to.gitignore
for security. - Required variables:
DB_URI
: SQLite database connection string.DATABASE_URL
: SQLite database connection string.SECRET_KEY
: Your secret key for Flask application.FLASK_APP
: Entry point of your Flask application.
app/
: Contains all Python scripts and core logic.ai_logic.py
: AI recommendation system logic.auth.py
: User authentication.bookings.py
: Booking management.forms.py
: Web forms.models.py
: Database models.trains.py
: Train search and management.
static/
: Static assets like CSS, JavaScript, and images.templates/
: HTML templates for rendering pages.migrations/
: Alembic migration files for database changes.
- Real-time train updates and notifications.
- Expand the AI model for personalized recommendations.
- Add multi-language support.
- Integrate third-party APIs for food ordering and other services.
- Ayush Goel - Backend, Database Integration, AI Logic, Deployment
- Meghna Singh - Frontend UI/UX, CSS Design, Template Structure
- Rajeev Mishra - Frontend JavaScript & Dynamic Features
- Azad Tiwari - User Dashboard, Interactive Components
Contributions are welcome! Please open an issue or submit a pull request for any suggestions or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.