Travel Data Collection App (NATPAC) A mobile-first travel data collection platform built with Streamlit (Python) frontend and Django REST Framework backend for the Smart India Hackathon. This solution leverages Streamlitβs lightweight web framework to create a responsive, install-free application that runs seamlessly on mobile devices, ensuring easy deployment, fast updates, and accessibility. π Project Structure
SIH_Paradigm/ βββ backend/ # Django REST Framework backend β βββ natpac/ # Main Django project β βββ trips/ # Trip data app β βββ users/ # User management app β βββ requirements.txt # Python dependencies βββ frontend/ # Streamlit app (mobile-first) β βββ pages/ # Multi-page navigation (Trips, Analytics, Profile) β βββ components/ # Custom reusable UI components β βββ app.py # Entry point for Streamlit app β βββ requirements.txt # Streamlit dependencies βββ README.md # This file β¨ Features Frontend (Streamlit β Mobile-First)
- π± Mobile-responsive design (Streamlit layout + CSS tweaks)
- π Onboarding & consent flow (forms, checkboxes)
- π Trip data logging with GPS capture (via browser geolocation API)
- π¨βπ©βπ¦ Add accompanying travellers dynamically
- π Browser-based push notifications for reminders & nudges
- πΆ Offline-first experience with caching & background sync
- π¨ Modern UI using Streamlit themes & reusable components Backend (Django REST Framework)
- π JWT authentication for secure login
- π REST APIs for trip data, users, and analytics
- π Admin dashboard for researchers (Django Admin)
- π Export trip datasets to CSV/Excel
- π΅οΈ User anonymization for privacy
- π Secure HTTPS communication π Quick Start Backend Setup
cd backend python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt python manage.py migrate python manage.py createsuperuser python manage.py runserver Frontend Setup (Streamlit)
cd frontend python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt streamlit run app.py π Technology Stack
- Frontend: Streamlit (Python) β responsive, mobile-first PWA-like app
- Backend: Django REST Framework (Python)
- Database: SQLite (local + central)
- Authentication: JWT tokens
- Location Services: Browser GPS APIs
- Notifications: Browser push notifications
- Sync: Background REST API calls π Privacy & Security
- β User data anonymization with hashed IDs
- β JWT-based authentication
- β HTTPS for all communications
- β Local caching + secure sync with backend
- β GDPR-compliant consent management π System Architecture
+-------------------+ +---------------------+ +-----------------+ | User Device | <----> | Streamlit Frontend | <----> | Django Backend | | (Mobile Browser) | | (Python Web App) | | (REST APIs) | +-------------------+ +---------------------+ +-----------------+ β β β βΌ βββββββββββββββββββββββββββ SQLite/Postgres βββββββββββββββββΊ Database π¨βπ» Development Team Built for Smart India Hackathon 2024 β NATPAC Team Empowering travel data research with a mobile-first, web-based solution.