- Live Production URL: https://transit-matchmaker.onrender.com/
Transit Matchmaker is a full-stack web application designed for college campuses to resolve a pervasive commuter pain point: splitting transit fares. Students frequently travel from campus to major local transit hubs such as railway stations, airports, or central bus stands individually, resulting in high costs for auto rickshaws or private cabs.
This platform allows students to securely register, log in, post their upcoming travel plans (departure points, destinations, dates, and flexible departure time windows), and run a custom relational matching algorithm to find other students traveling along the exact same route within a synchronized timeframe. By providing immediate WhatsApp or email links, it bridges the gap between disconnected campus commuters, effectively reducing individual travel expenses and the student carbon footprint.
This project was built from scratch as a comprehensive capstone showcasing a solid understanding of backend MVC architecture, relational database design, secure session state management, production deployment pipelines, and fully custom responsive user interfaces.
- Smart Time-Window Matching : The backend algorithm calculates true overlaps between students' time windows. It isolates travel schedules matching the exact destination and date, ensures users cannot match with themselves, and only shows matches whose schedules intersect yours.
- WhatsApp Integration : Optionally provide your WhatsApp number on registration. If a matched buddy has provided theirs, a convenient "WhatsApp" button pre-fills a message directly in the app.
- Recurring Trips & Auto-Expiry : Mark your weekly commutes as "Repeat weekly" and the system automatically rolls the date forward. Past non-recurring trips are automatically filtered out to keep your dashboard clean.
- Live Match Badges : The dashboard dynamically updates with badges to show exactly how many overlapping travel buddies you have for each upcoming trip.
- Secure Authentication & Session Security: Complete implementation of user registration, login, and session tracking. Passwords are secure and never stored in plain text; they are protected using robust cryptographic PBKDF2 hashing algorithms via
werkzeug.security. - Form Interception & Server-Side Validation: Form inputs are heavily verified on the backend. The app protects database integrity by intercepting chronological logic errors such as preventing a user from setting a 'Latest Departure Time' that precedes their 'Earliest Departure Time'.
- Modern Theme-Aware UI (Custom CSS & LocalStorage): Fully optimized using a completely custom, gradient-driven CSS design system (dropping heavy UI frameworks). Features a seamless Dark Mode toggle that syncs with the browser's native
localStorageAPI to maintain state across page refreshes without any flashing. - Asynchronous User Feedback: Implements Flask Flash Alert routing utilizing customized JavaScript hooks to automatically fade out alerts and CSS animations for a clean, non-disruptive user experience.
- Python / Flask: Handles HTTP routing, request parsing, cookie based session management, validation, and core application business logic.
- Gunicorn: Actively handles production WSGI server processes for stable cloud deployment.
- SQLite3: A lightweight, dependable relational database used for transactional storage of user profiles and travel schedules.
- Jinja2 Template Engine: Used for server side layout inheritance, template segmentation, and dynamic data binding.
- Custom CSS: A completely bespoke, modern design system utilizing CSS variables, Flexbox, CSS Grid, and inline SVG iconography.
- JavaScript: Powers client side interactivity, theme persistence loops via
localStorage, and asynchronous UI animations.
The application utilizes a relational schema to cleanly handle multi-table dependencies with cascading deletions:
-- 1. Users Entity Table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
phone TEXT -- Optional WhatsApp number
);
-- 2. Trips Transactional Table
CREATE TABLE trips (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
departure_point TEXT NOT NULL,
destination TEXT NOT NULL,
travel_date TEXT NOT NULL,
time_window_start TEXT NOT NULL,
time_window_end TEXT NOT NULL,
is_recurring INTEGER DEFAULT 0, -- Weekly rollover flag
FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
);transit-matchmaker/
│
├── app.py # Core controller, route configurations, and validation engine
├── schema.sql # Relational database initialization script
├── transit.db # SQLite binary database file (Generated runtime instance)
├── requirements.txt # Production dependencies list
├── .gitignore # Explicit environment and operating system file exclusion rules
│
├── static/
│ ├── css/
│ │ └── styles.css # Bespoke design system and modern UI variables
│ └── js/
│ └── script.js # Dark Mode state logic and flash alert auto dismiss timers
│
└── templates/
├── layout.html # Master boilerplate layout containing HTML head, responsive navbar, and scripts
├── index.html # Smart welcome landing / authenticated user dashboard grid
├── login.html # Secure session entry form card
├── register.html # User identity provisioning form card
├── add_trip.html # Transactional travel schedule submission form
└── matches.html # Dynamic match collection and contact generation view
Follow these steps to spin up the development environment on your local system:
- Clone the Repository:
git clone https://github.com/madhavcodes25/transit-matchmaker.git
cd transit-matchmaker- Initialize Python Virtual Environment:
python3 -m venv venv
source venv/bin/activate- Install Dependencies:
pip install -r requirements.txt- Construct the Database Instance:
sqlite3 transit.db < schema.sql- Fire up the Development Server:
PORT=5001 python3 app.py- Access App: Open your web browser and navigate to http://127.0.0.1:5001.