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 .
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.
|
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. |
| π€ 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 |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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?
RoleProtectedPagewraps 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.
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














