Skip to content

lynx1097/govgate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GovGate Logo

GovGate

πŸ›οΈ A unified civic engagement platform connecting citizens, government, and advertisers

Special thanks to My colleages :

Mazen Yasser & Salma Walid for setting Up this project foundations , setting up firebase authentication , firestore , implementing Government role backend and testing .

Mohamed Tamer for implementing the Advertiser role backend and testing .


Flutter Dart Firebase Material Design Platform License


πŸ“– About

GovGate is a mobile-first civic engagement platform that brings together three audiences under one roof β€” citizens, government administrators, and local advertisers. It is designed to make civic participation effortless: report a pothole on your street, vote on a city poll, hear back from your local council, or promote a community business β€” all from a single app.

πŸŽ“ Built as a university project for Software Mobile Course (Fullstack), GovGate showcases a production-grade Flutter architecture, role-based access control, and a Firebase-powered realtime backend.


✨ Highlights

πŸ”

Role-based Access
Three tightly scoped user experiences enforced both client-side and via Firestore rules.

πŸ“‘

Realtime Backend
Live updates across announcements, polls, messages, and ad approvals via Firestore streams.

πŸ—ΊοΈ

Location-aware
Geotagged problem reports with Google Maps picker and photo evidence.

πŸ””

Push Notifications
FCM-powered alerts for replies, announcements, and ad status changes.

🎨

Role-themed UI
Each role has a distinct color palette β€” green, blue, orange β€” for instant context.

πŸ›‘οΈ

Secure Storage
Credentials and session state in OS-level secure storage; App Check enabled.

🎭 Three Roles, One App

πŸ‘€ Citizen
🟒 green
πŸ›οΈ Government
πŸ”΅ blue
πŸ“£ Advertiser
🟠 orange
Read public announcements Publish announcements Submit advertisements
Vote in active polls Create & close polls Track approval status
Send messages to government Inbox & reply to citizens Manage active campaigns
Report local problems (πŸ“· + πŸ“) Triage problem reports
Browse approved local ads Approve / reject ads
Quick-dial emergency numbers Maintain emergency contacts
Live notifications Community dashboard

πŸšͺ Onboarding & Auth

Role Selection Login Signup
Role Selection Login Signup

πŸ‘€ Citizen Experience

Home Announcements Report a Problem
Citizen Home Announcements Report Problem
Polls Contact Government Emergency Numbers
Polls Contact Emergency

πŸ›οΈ Government Experience

Dashboard Inbox Review Ads
Government Home Inbox Review Ads

πŸ“£ Advertiser Experience

Dashboard Create Ad Manage Ads
Advertiser Home Create Ad Manage Ads

πŸ› οΈ Tech Stack

Frontend

Flutter Dart Material 3

Backend & Services

Firebase Auth Cloud Firestore Firebase Storage FCM App Check

Platform APIs

Google Maps Image Picker Local Auth Secure Storage


🧱 Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         GovGate App                         β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚   Citizen    β”‚   β”‚  Government  β”‚   β”‚  Advertiser  β”‚     β”‚
β”‚  β”‚    Pages     β”‚   β”‚    Pages     β”‚   β”‚    Pages     β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                   RoleProtectedPage                         β”‚
β”‚                            β”‚                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                    Services Layer                    β”‚   β”‚
β”‚  β”‚  AuthService Β· DatabaseService Β·AdvertisementService β”‚   β”‚
β”‚  β”‚  PushNotificationService Β· ThemeServiceΒ· ErrorHandlerβ”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β–Ό                      β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Firebase  β”‚         β”‚  Firestore β”‚         β”‚  Firebase  β”‚
β”‚    Auth    β”‚         β”‚  + Rules   β”‚         β”‚  Storage   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚    FCM     β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why this shape?

  • RoleProtectedPage wraps every screen and enforces role checks against secure-cached credentials before render.
  • Services are stateless static singletons β€” easy to mock for tests.
  • Firestore Security Rules mirror the in-app role gates, so the data layer is safe even if a client misbehaves.

πŸ—‚οΈ Project Structure

lib/
β”œβ”€β”€ main.dart                     # App entrypoint, Firebase init
β”‚
β”œβ”€β”€ common/                       # Shared screens
β”‚   β”œβ”€β”€ role_selection_page.dart  # The welcome screen with role cards
β”‚   β”œβ”€β”€ login_page.dart
β”‚   β”œβ”€β”€ signup_page.dart
β”‚   β”œβ”€β”€ forgot_password_page.dart
β”‚   β”œβ”€β”€ polls_page.dart
β”‚   β”œβ”€β”€ poll_page.dart
β”‚   └── poll_results_page.dart
β”‚
β”œβ”€β”€ citizen/                      # πŸ‘€ Citizen-only screens
β”‚   β”œβ”€β”€ citizen_home_page.dart
β”‚   β”œβ”€β”€ announcement_details_page.dart
β”‚   β”œβ”€β”€ contact_government_page.dart
β”‚   β”œβ”€β”€ emergency_numbers_page.dart
β”‚   β”œβ”€β”€ problem_reporting_page.dart
β”‚   β”œβ”€β”€ view_advertisements_page.dart
β”‚   └── view_message_page.dart
β”‚
β”œβ”€β”€ government/                   # πŸ›οΈ Government-only screens
β”‚   β”œβ”€β”€ gov_home_page.dart
β”‚   β”œβ”€β”€ gov_dashboard_page.dart
β”‚   β”œβ”€β”€ gov_reports_page.dart
β”‚   β”œβ”€β”€ announcements_list_page.dart
β”‚   β”œβ”€β”€ create_announcement_page.dart
β”‚   β”œβ”€β”€ edit_announcement_page.dart
β”‚   β”œβ”€β”€ gov_announcements_page.dart
β”‚   β”œβ”€β”€ create_poll_page.dart
β”‚   β”œβ”€β”€ inbox_page.dart
β”‚   β”œβ”€β”€ manage_ads_page.dart
β”‚   └── review_advertisments_page.dart
β”‚
β”œβ”€β”€ advertiser/                   # πŸ“£ Advertiser-only screens
β”‚   β”œβ”€β”€ advertiser_home_page.dart
β”‚   β”œβ”€β”€ create_advertisment_page.dart
β”‚   └── manage_ads_page.dart
β”‚
β”œβ”€β”€ components/                   # Reusable widgets
β”‚   β”œβ”€β”€ role_protected_page.dart  # Role gating wrapper
β”‚   β”œβ”€β”€ shared_app_bar.dart
β”‚   └── coming_soon_page.dart
β”‚
β”œβ”€β”€ models/                       # Data models
β”‚   β”œβ”€β”€ advertisement.dart
β”‚   └── poll_model.dart
β”‚
β”œβ”€β”€ services/                     # Business logic & Firebase wrappers
β”‚   β”œβ”€β”€ auth_service.dart
β”‚   β”œβ”€β”€ database_service.dart
β”‚   β”œβ”€β”€ advertisement_service.dart
β”‚   β”œβ”€β”€ push_notifications.dart
β”‚   β”œβ”€β”€ theme_service.dart
β”‚   β”œβ”€β”€ theme_provider.dart
β”‚   └── error_handler.dart
β”‚
└── utils/
    └── string_extensions.dart


Built with πŸ’™ using Flutter & Firebase

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages