Saathi is an exclusive social coordination platform built for IIT Roorkee students. Whether you are looking for a travel companion to the railway station, a study group for end-sems, or friends to play badminton with, Saathi helps you find your circle and coordinate effortlessly.
The following flowchart explains the core user journey, from secure Firebase authentication to post-activity expense tracking.
flowchart TD
A([Student with @iitr.ac.in]) -->|Login| B{Firebase Auth}
B -- Unauthorized --> X([Access Denied])
B -- Authenticated --> C[Explore Real-time Feed & Map]
C --> D[Host an Activity]
C --> E[Join an Activity]
D -->|Manage Waitlist| F{Host Approval}
E -->|Send Request| F
F -- Approved --> G[Private Group Chat]
F -- Declined --> H[Notify User]
G --> I[Integrated Expense Tracker & Bill Splitting]
I --> J[UPI QR Generation for Settlements]
J --> K[Rate Host & Auto-Archive]
Saathi is a 100% serverless application that relies entirely on Firebase for authentication and data storage.
- Authentication: Uses Google OAuth and Email/Password sign-ins, restricted at the client level strictly to IITR domains.
- Firestore Database: Stores users, activities, waitlists, expenses, and chats.
- Strict Security Rules (
firestore.rules):- Validates that only
@*.iitr.ac.inemails can write to the database. - Prevents race conditions (like overbooking spots).
- Ensures only the host can manage an activity and its waitlist.
- Restricts private chats and expense trackers strictly to approved group members.
- Validates that only
- IITR Exclusive Gating: Strictly gated platform. Only users with
@*.iitr.ac.inemail addresses are allowed to register or login. Checked both on the client and enforced at the Firestore security rules level. - Security Hardening: Firestore rules prevent race conditions, enforce data validation, and restrict chat/expense access strictly to approved members.
- Interactive Map View: Uses Leaflet and React-Leaflet to visualize activities geographically across the IITR campus.
- Marker Clustering: Groups nearby activities into clusters to prevent map clutter when zoomed out.
- Geolocation & Distance Sorting: Optionally sorts activities based on the user's physical distance from the meeting point.
- Automatic Bill Splitting: Add cab fares, meals, or any shared cost. The system automatically divides the total cost among approved members (fair share).
- Greedy Settlement Algorithm: Calculates exactly who owes whom using an optimized algorithm to minimize the number of transactions.
- UPI QR Code Generation: Generates standard UPI QR codes (
upi://pay) directly within the app so debtors can scan and pay creditors instantly.
- Waitlists & Host Approvals: When a user wants to join an activity, they enter a waitlist. The host receives a notification and can approve or decline the request.
- Private Group Chats: Once a member is approved, they gain access to a real-time, private chat room restricted exclusively to the activity's roster.
- Smart Duplicate Prevention: Before publishing a new activity, the platform checks for similar active circles (same time + destination) and suggests joining them to encourage pooling over fragmentation.
- Shareable QR Codes & Deep Links: Every activity gets an auto-generated QR code and a deep-link URL (e.g.,
?activity=ID), making it trivial to share on WhatsApp or posters. - Calendar Export: A one-click export generates an
.icsfile to add the activity to Google Calendar or Apple Calendar. - Auto-Archive: Activities whose dates have passed are automatically archived to keep the active feed clean.
- Infinite Scrolling Pagination: Uses cursor-based Firestore pagination (loading 15 activities at a time) for a smooth and highly scalable feed.
- Bhawan Quick-Filters: Instantly filter the feed to only show activities originating from your specific Bhawan/Hostel.
- Smart Suggestions: Strips away irrelevant noise by suggesting activities that match your department, year, or interests.
- Robust Notifications Center: Tracks chat messages, waitlist requests, and host decisions. Supports pagination (limit 20 + load older) and batch mark-as-read.
- Peer Rating System: After an activity, members can leave a 1-5 star rating and a written review for the host.
- Unique Rating Enforcement: Deterministic document IDs ensure users can only rate a specific activity once.
- Frontend: React 19, Vite, TypeScript
- Styling & UI: Tailwind CSS v4, Lucide Icons, Framer Motion
- Maps: Leaflet, React-Leaflet, MarkerCluster
- Utilities: React-QR-Code, Sonner (Toasts)
- Backend / Database: Firebase (Auth, Firestore)
- Deployment Ready: Configured for Vercel and Netlify (SPA routing included)
-
Install Dependencies
npm install
-
Configure Environment Variables Copy
.env.exampleto.envand fill in your Firebase configuration keys:cp .env.example .env
-
Start the Development Server
npm run dev
The app will be running at
http://localhost:5173.
This project is perfectly optimized for free-tier deployments on Vercel or Netlify. It uses a purely static SPA architecture with no backend server required.
- Push this repository to GitHub.
- Go to Vercel or Netlify and import the repository.
- The platform will automatically detect Vite as the framework.
- Important: Add all the
VITE_FIREBASE_*environment variables (found in.env.example) to your Vercel/Netlify project settings before deploying. - In your Firebase Console, go to Authentication > Settings > Authorized Domains and add your new Vercel/Netlify domain (e.g.,
saathi.vercel.app) so Google Login works. - Deploy!
Note: Custom routing rules for SPAs are already included in the vercel.json and netlify.toml files in this repository.