Skip to content

Aditya-gam/Navigate-LA-28

Repository files navigation

πŸ—ΊοΈ Navigate LA 28

A Modern Geospatial Navigation Platform for the 2028 Los Angeles Olympics

Docker React FastAPI PostgreSQL PostGIS

🏟️ Empowering tourists with real-time navigation, attraction discovery, and transit optimization for the LA 2028 Olympics

πŸš€ Quick Start β€’ πŸ“‹ Features β€’ πŸ—οΈ Architecture β€’ πŸ“– Documentation β€’ 🀝 Contributing


πŸ“‹ Features

πŸ—ΊοΈ Interactive Mapping

  • Real-time geospatial visualization using Leaflet with custom Olympic venue markers
  • Dynamic route planning with multi-modal transportation options
  • Live traffic and transit updates for optimal journey planning
  • Accessibility-focused navigation with barrier-free route options

🎯 Smart Discovery

  • AI-powered attraction recommendations based on user preferences and crowd data
  • Olympic venue information with event schedules and capacity insights
  • Restaurant and amenity discovery with real-time availability
  • Crowd density analytics to avoid overcrowded locations

🚌 Public Transit Integration

  • Real-time bus tracking with arrival predictions
  • Metro line integration with live service updates
  • Optimized multi-modal routing combining walking, bus, and metro
  • Transit accessibility information for mobility-impaired users

πŸ“Š Analytics Dashboard

  • Visitor flow analytics with heat maps and crowd patterns
  • Popular destinations tracking with trending locations
  • Transit usage statistics and route optimization insights
  • Demographic analytics for better service planning

πŸ—οΈ Architecture

graph TB
    subgraph "Frontend Layer"
        A[React + Redux App<br/>Port 3030] --> B[Leaflet Maps]
        A --> C[Chart.js Analytics]
        A --> D[Real-time Updates]
    end
    
    subgraph "Backend Layer"
        E[FastAPI Server<br/>Port 8000] --> F[Authentication]
        E --> G[Geospatial API]
        E --> H[Analytics Engine]
    end
    
    subgraph "Data Layer"
        I[PostgreSQL + PostGIS<br/>Port 5433] --> J[User Data]
        I --> K[Geospatial Data]
        I --> L[Analytics Data]
    end
    
    subgraph "Proxy Layer"
        M[Nginx Proxy<br/>Port 80] --> N[API Routing]
        M --> O[Static File Serving]
        M --> P[Security & CORS]
    end
    
    A --> M
    M --> E
    E --> I
    
    style A fill:#61DAFB,stroke:#20232a,stroke-width:2px
    style E fill:#009688,stroke:#00695C,stroke-width:2px
    style I fill:#336791,stroke:#1e3a8a,stroke-width:2px
    style M fill:#009639,stroke:#006400,stroke-width:2px
Loading

πŸ› οΈ Technology Stack

Component Technology Purpose
Frontend React 18 + Redux Toolkit Modern reactive UI with state management
Backend FastAPI + Python 3.10+ High-performance async API with auto-docs
Database PostgreSQL 13 + PostGIS Geospatial data storage and querying
Analytics Pandas + PostGIS High-performance data analysis and geospatial queries
Maps Leaflet + React-Leaflet Interactive mapping with custom overlays
Analytics Chart.js + React-Chartjs-2 Real-time data visualization
Containerization Docker + Docker Compose Orchestrated multi-service deployment

πŸš€ Quick Start

Prerequisites

πŸ“‹ Required Software (Click to expand)
Software Version Download Link
Docker Desktop Latest Download
Node.js + npm 18.x+ Download
Python 3.10+ Download
Git Latest Download

Verify installations:

docker --version          # Docker version 20.x+
node --version            # v18.x+
npm --version             # 9.x+
python3 --version         # Python 3.10+
git --version             # git version 2.x+

πŸƒβ€β™‚οΈ One-Command Setup

# Clone and start the entire application
git clone https://github.com/yourusername/Navigate-LA-28.git
cd Navigate-LA-28
docker-compose up -d --build

🌐 Access Your Application

Service URL Description
🎨 Frontend http://localhost:3030 Main application interface
πŸ”§ Backend API http://localhost:8000 FastAPI REST endpoints
πŸ“– API Docs http://localhost:8000/docs Interactive API documentation
πŸ—„οΈ PostgreSQL http://localhost:5433 Database connection
πŸ§ͺ Test DB http://localhost:5434 Test database connection

πŸ—„οΈ Database Setup

# Initialize database schema
docker-compose exec server python models/init_db.py

# Populate with sample data (if available)
docker-compose exec server python -c "print('Database initialized successfully')"

πŸ› οΈ Development

Frontend Development

βš›οΈ React Development Setup
cd client

# Install dependencies
npm install

# Start development server with hot reload
npm start

# Run tests with coverage
npm run test:coverage

# Lint and format code
npm run lint:fix
npm run format

# Type checking
npm run type-check

# Build for production
npm run build

Development Features:

  • πŸ”₯ Hot Module Replacement (HMR)
  • πŸ“ TypeScript support with strict checking
  • 🎨 ESLint + Prettier for code quality
  • πŸ§ͺ Jest + React Testing Library
  • πŸ“Š Bundle analyzer for optimization

Backend Development

🐍 Python Development Setup
cd server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
pip install -e ".[dev]"  # Development dependencies

# Start development server with auto-reload
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

# Run tests with coverage
pytest --cov=. --cov-report=html

# Code formatting and linting
black .
isort .
flake8 .
mypy .

# Security checks
bandit -r .
safety check

Development Features:

  • πŸ”„ Auto-reload on code changes
  • πŸ“‹ Comprehensive type hints
  • πŸ§ͺ Pytest with async support
  • πŸ”’ Security scanning with Bandit
  • πŸ“Š Code coverage reporting

Big Data Development

πŸ”₯ Spark + Hadoop Development
# Access Spark shell
docker-compose exec spark spark-shell

# Submit Spark jobs
docker-compose exec spark spark-submit --class MySparkApp /app/my_spark_job.py

# HDFS operations
docker-compose exec hadoop hdfs dfs -ls /
docker-compose exec hadoop hdfs dfs -put local_file /hdfs_path

# Upload datasets to HDFS
./move_to_hdfs.sh

Big Data Features:

  • πŸ—‚οΈ Distributed file storage with HDFS
  • ⚑ Real-time data processing with Spark
  • πŸ“ˆ Scalable analytics pipeline
  • πŸ”„ ETL job orchestration

🐳 Docker Services

πŸ“‹ Service Overview (Click to expand)
Service Container Name Ports Description
Frontend navigate_la_frontend 3000 React development server
Backend navigate_la_backend 5000 FastAPI application server
Database navigate_la_postgres 5433 PostgreSQL with PostGIS
Test DB navigate_la_postgres_test 5434 Testing database
Hadoop hadoop 9870, 9000 HDFS NameNode
DataNode hadoop_datanode 9864 HDFS DataNode
Spark Master spark_master 8080, 7077 Spark cluster master
Spark Worker spark_worker 8090 Spark worker node

πŸ”§ Docker Management

# View all services
docker-compose ps

# View service logs
docker-compose logs -f [service_name]

# Restart specific service
docker-compose restart [service_name]

# Clean rebuild
docker-compose down -v
docker-compose up -d --build --force-recreate

# Monitor resource usage
docker stats

πŸš€ Production Deployment

🌐 Production Build

# Build production containers
docker-compose -f docker-compose.prod.yml up -d --build

# Production includes:
# - Nginx reverse proxy with SSL
# - Redis caching layer
# - Optimized container images
# - Health checks and monitoring

βš™οΈ Environment Configuration

πŸ” Environment Variables Setup

Backend (server/.env):

DATABASE_URL=postgresql+asyncpg://username:password@host:port/dbname
SECRET_KEY=your-super-secure-secret-key-here
ENVIRONMENT=production
CORS_ORIGINS=https://yourdomain.com
REDIS_URL=redis://redis:6379

Frontend (client/.env):

REACT_APP_API_URL=https://api.yourdomain.com
REACT_APP_SENTRY_DSN=your-sentry-dsn
REACT_APP_GOOGLE_MAPS_API_KEY=your-api-key

πŸ“Š API Documentation

πŸ”Œ Core Endpoints

πŸ“‹ API Reference (Click to expand)
Endpoint Method Description Authentication
/auth/register POST User registration None
/auth/login POST User authentication None
/places/search GET Search attractions Optional
/places/nearby GET Find nearby locations Optional
/transit/routes GET Bus route information None
/transit/stops/nearby GET Nearby bus stops None
/analytics/popular GET Popular destinations Optional
/analytics/demographics GET Visitor statistics Admin

Interactive Documentation: http://localhost:8000/docs

πŸ“± Frontend Routes

Route Component Description
/ Home Main map interface
/search Search Location search
/analytics Analytics Data dashboard
/profile Profile User settings

πŸ§ͺ Testing

πŸ” Test Coverage

# Frontend tests
cd client
npm run test:coverage

# Backend tests
cd server
pytest --cov=. --cov-report=html

# View coverage reports
open client/coverage/lcov-report/index.html
open server/htmlcov/index.html

πŸ§ͺ Test Types

  • Unit Tests: Component and function testing
  • Integration Tests: API endpoint testing
  • E2E Tests: User journey validation
  • Performance Tests: Load and stress testing

πŸ“ˆ Performance & Analytics

πŸ“Š Monitoring

πŸ“ˆ Performance Metrics

Frontend Performance:

  • Lighthouse score: 95+ (Performance, Accessibility, SEO)
  • Bundle size: < 2MB (gzipped)
  • Time to Interactive: < 3s

Backend Performance:

  • API response time: < 200ms (95th percentile)
  • Database queries: < 50ms average
  • Concurrent users: 1000+ supported

Big Data Processing:

  • Spark job processing: 1M+ records/minute
  • HDFS storage: Petabyte scale ready
  • Real-time analytics: < 1s latency

πŸ” Security

πŸ›‘οΈ Security Features

  • πŸ”’ JWT Authentication with httpOnly cookies
  • 🌐 CORS Protection with domain whitelisting
  • πŸ” SQL Injection Prevention with parameterized queries
  • πŸ›‘οΈ XSS Protection with input sanitization
  • πŸ”‘ Secret Management with environment variables
  • πŸ“Š Security Headers via Nginx configuration

πŸ” Security Scanning

# Backend security scan
cd server
bandit -r .
safety check

# Frontend dependency audit
cd client
npm audit

🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines before submitting PRs.

πŸ‘₯ Team Members

Name Role Contact
Aditya Gambhir Backend & Analytics agamb031@ucr.edu
Faizaan Muzawar Frontend & Integration mmuza004@ucr.edu
Ajit Singh Infrastructure & DevOps asing349@ucr.edu
Samara Miramontes Documentation & Testing smira009@ucr.edu

πŸ”„ Development Workflow

# 1. Fork the repository
# 2. Create feature branch
git checkout -b feature/amazing-feature

# 3. Make changes and commit
git commit -m "Add amazing feature"

# 4. Push to branch
git push origin feature/amazing-feature

# 5. Create Pull Request

πŸ“š Documentation

πŸ“– Additional Resources

πŸ“„ Project Reports


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • UCLA CS Department for project guidance
  • LA 2028 Olympic Committee for venue data
  • Metro LA for transit API access
  • OpenStreetMap contributors for geospatial data

🏟️ Built with ❀️ for the Los Angeles 2028 Olympics GitHub stars GitHub forks GitHub issues

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors