Skip to content

Real-time Livability Index for Bremen. An interactive geospatial platform analyzing quality of life based on many factors.

License

Notifications You must be signed in to change notification settings

Milad9A/Bremen-Livability-Index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

176 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bremen Livability Index Icon

Bremen Livability Index (BLI)

Backend Tests Frontend Tests Build and Release Apps codecov

A comprehensive geospatial platform featuring a Flutter mobile & web application and a Python FastAPI backend. It calculates Quality of Life scores for any location in Bremen, Germany, in real-time.

πŸ“– For in-depth technical details, see TECHNICAL.md – covering system architecture, database design, scoring algorithm, and deployment.

🌐 Live Applications

Access the Bremen Livability Index on multiple platforms:

πŸ•ΈοΈ Web Application

Live App: bremen-livability-frontend.onrender.com
Run the full app directly in your browserβ€”no installation required.

πŸ“‘ API Endpoint

Live API: bremen-livability-backend.onrender.com
Docs: bremen-livability-backend.onrender.com/docs
RESTful API for livability analysis and geocoding.

πŸ“± & πŸ–₯️ Native Applications

Download the latest version for all platforms from GitHub Releases.

Platform File Instructions
iOS Runner.app / Source Run via Xcode / Flutter
Android BLI-Android.apk Install APK on device.
Windows BLI-Windows.zip Extract and run bli.exe.
macOS BLI-macOS.zip Extract and run bli.app.
Linux BLI-Linux.tar.gz Extract and run ./bundle/bli.

⚠️ Note: Desktop builds are unsigned. You may need to verify them in your system security settings:

  • Windows: Click "More Info" β†’ "Run anyway" in Windows Defender SmartScreen
  • macOS: Right-click the app β†’ "Open" β†’ "Open" (bypasses Gatekeeper)
  • Linux: Run chmod +x bli before running All platforms use the same backend API and provide the same core functionality.

✨ Features

  • πŸ—ΊοΈ Premium Map Experience – Full-screen map with "Liquid Glass" UI, real-time background refraction, and tactile haptic feedback.
  • πŸ“ Instant Analysis – Tap any location to calculate a detailed livability score based on 20+ spatial factors.
  • βš™οΈ Personalized Scoring – Customize factor importance to tailor scores to your lifestyle.
  • οΏ½ Smart Search & Favorites – "Apple-style" expandable search bar and cross-device sync.
  • πŸ” Secure & Reliable – Multi-provider authentication (Google, GitHub, Email) with >90% test coverage.

πŸ“Š Scoring System

Livability is calculated from 20 spatial factors using proximity-based analysis. Score range: 0-100.

Factors:

  • Positive (9): Greenery, Amenities, Public Transport, Healthcare, Bike Infra, Education, Sports, Pedestrian, Culture
  • Negative (11): Accidents, Industry, Major Roads, Noise, Railways, Gas Stations, Waste, Power, Parking, Airports, Construction

πŸ“– Details: Scoring Algorithm in TECHNICAL.md

πŸš€ Quick Start

1. Start Database

cd backend && docker-compose up -d

2. Setup Backend

cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

3. Initialize Database Schema

python -m scripts.initialize_db

4. Ingest Data

python -m scripts.ingest_all_data

5. Start Server

./start_server.sh

API: http://localhost:8000 | Docs: http://localhost:8000/docs

6. Run Flutter App

cd frontend/bli
flutter pub get
flutter run

πŸ“‘ API Endpoints

Interactive Docs: /docs (Swagger UI)

πŸ“– Full Endpoint Reference: See API Endpoints in TECHNICAL.md for request/response examples and authentication details.

πŸ—οΈ Architecture

Backend: FastAPI + PostgreSQL/PostGIS | Frontend: Flutter (cross-platform) | Data: OpenStreetMap + Unfallatlas

πŸ“– Details: System Architecture, Database Design, Backend Implementation in TECHNICAL.md

☁️ Deployment

Cloud Stack (Free Forever):

CI/CD Pipeline:

  • Backend changes β†’ Backend Tests run on GitHub Actions β†’ Render deploys on commit
  • Frontend changes β†’ Frontend Tests run β†’ Build workflow creates app releases β†’ Render deploys on commit

Render deploys automatically on every push to master. GitHub Actions runs tests in parallel to catch issues early.

πŸ“– Details: Deployment Architecture in TECHNICAL.md

πŸ§ͺ Testing

Run Tests

# Backend
cd backend && pytest

# Frontend
cd frontend/bli && flutter test

πŸ“– Full Testing Guide: See Testing in TECHNICAL.md for coverage reports and test details.

πŸ—ƒοΈ Data Sources & Resources

Source Description License
OpenStreetMap Trees, parks, amenities, transport, healthcare, cycling, pedestrian infrastructure, education, sports, cultural venues ODbL 1.0
Unfallatlas German traffic accident data (2019-2023) dl-de/by-2-0

πŸ“– Full Details: External Resources & References in TECHNICAL.md

πŸ“„ License

This project is licensed under the MIT License.