Skip to content

SimoneDeidier/DIMA-PROJECT-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

152 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIMA - AVIS Varese Blood Donation App

Flutter Dart Firebase Platform

Production-style Flutter application developed with AVIS Varese to digitalize donor onboarding, eligibility tracking, appointment booking, and support communication.

Executive Summary

This project was built as a real-world university collaboration with AVIS Varese (Politecnico di Milano, AY 2024/2025). The app covers the donor lifecycle end-to-end:

  • secure authentication and profile management
  • first-visit and donation booking workflows
  • pre-donation screening and donor status transitions
  • push/local notifications and in-app support chat
  • responsive UI for phone and tablet

The codebase combines a Flutter front end with a Firebase backend (Auth, Firestore, FCM, Cloud Functions) and includes integration, unit, and widget tests.

Product Features

1) Authentication and Registration

  • Email/password login with localized error handling
  • Google Sign-In flow
  • Email verification gating before full access
  • 3-step donor registration with personal/address/access data
  • Codice Fiscale uniqueness validation against Firestore

2) Appointment Booking

  • Booking for first control visit and donation
  • Donation type selection (sangue/plasma)
  • Calendar-based slot selection from Firestore availability
  • Combined visit+donation flow
  • Appointment details page with cancellation rules

3) Donor Eligibility and Health Flow

  • Pre-donation questionnaire with eligibility logic
  • Donor state timeline (new user, idoneo, sospensioni)
  • Temporary suspension flow with reason/date handling
  • Donation permissions managed by state (sangue/plasma)

4) Notifications and Communication

  • FCM push notifications with in-app category preferences
  • Local notifications while app is in foreground
  • Notification categories: reminders, support, idoneita, AVIS alerts
  • In-app support chat (Firestore real-time messages)
  • Searchable FAQ section by category

5) Profile and UX

  • Editable donor profile and password change
  • Account deletion with re-authentication flow
  • Theme settings (light, dark, system) persisted locally
  • Native calendar integration for appointment reminders
  • Responsive layouts for smartphone and tablet

Architecture

High-level Design

  • UI layer: pages + reusable widgets
  • Service layer: auth, database, notifications, chat, connectivity
  • Data layer: domain models and Firestore mapping
  • Navigation: GoRouter with auth/email-verification route guards
  • State management: Provider + ChangeNotifier services

Main Technical Components

Layer Tech Notes
Mobile app Flutter, Dart Single codebase for Android/iOS
Routing go_router Auth-aware redirects and shell navigation
State provider Theme/connectivity + reactive UI
Backend Firebase Auth, Firestore, Storage, Cloud Functions, FCM
Notifications firebase_messaging, flutter_local_notifications Push + local with category filtering
Local persistence shared_preferences Theme and notification preferences

Diagrams

Component Diagram

Deployment Diagram

Repository Structure

DIMA/
├── diagrams/
│   ├── componentDiagram.puml
│   ├── deployment_diagram.puml
│   ├── Pages/
│   └── UseCases/
├── src/dima/
│   ├── lib/
│   │   ├── models/
│   │   ├── pages/
│   │   ├── services/
│   │   ├── theme/
│   │   └── widget/
│   ├── functions/
│   │   ├── index.js
│   │   └── package.json
│   ├── integration_test/
│   └── test/
└── support-admin-script/

Engineering Highlights

  • Route protection strategy implemented centrally in app bootstrap (main.dart)
  • Clear separation between UI pages and service/business logic
  • Connectivity-aware error handling for network operations
  • Firestore-backed support chat with unread/seen management
  • Cloud Functions automation for reminders and staff notifications
  • Admin automation scripts for support and appointment operations

Testing

The project includes:

  • 5 integration test suites (16 scenarios) under src/dima/integration_test/
  • model unit tests under src/dima/test/models/
  • widget tests under src/dima/test/widget/

Run locally:

cd src/dima

# Static analysis
flutter analyze

# Unit + widget tests
flutter test

# Integration tests
flutter test integration_test/

Additional integration test docs are available in src/dima/integration_test/README.md.

Local Setup

Prerequisites

  • Flutter SDK 3.7.0+
  • Dart SDK 3.7.0+
  • Android Studio or VS Code
  • Firebase project configured for mobile apps

Installation

git clone https://github.com/SimoneDeidier/DIMA.git
cd DIMA/src/dima
flutter pub get
flutter run

Firebase Configuration

Provide platform config files:

  • src/dima/android/app/google-services.json
  • src/dima/ios/Runner/GoogleService-Info.plist

Visual Walkthrough

Mobile (phone)

Area Screenshot
Login Login
Home Home
Donation booking Donation booking
Donor profile Donor profile
Support/FAQ Support
Notification settings Notification settings

Tablet

Area Screenshot
Home Tablet Home
Donations Tablet Donations
Profile Tablet Profile
Notifications Tablet Notifications

Use Case Documentation

The repository includes visual sequence/use-case documentation in diagrams/UseCases/:

  • UC1: Email/Password Login
  • UC2: Google Login
  • UC3: Registration
  • UC4: Book first control visit
  • UC5: Book donation
  • UC6: Manage appointment
  • UC7: View donor status
  • UC8: Manage profile
  • UC9: Support chat
  • UC10: Assistance page interactions
  • UC11: Logout
  • UC12: Delete account
  • UC13: Theme settings
  • UC14: Temporary suspension

Admin Tooling

Standalone Node.js scripts in support-admin-script/ support operational workflows:

  • support conversation management
  • appointment management and outcomes
  • demo data seeding
  • visit availability generation

These tools are intentionally separated from the mobile app client.

Project Context

  • University: Politecnico di Milano
  • Course: Digital Systems Design
  • Academic year: 2024/2025
  • Partner organization: AVIS Varese

License

Academic project in collaboration with AVIS Varese. See LICENSE for repository terms.

About

Final project of the Design and Implementation of Mobile Application course - Politecnico di Milano 2024/25

Topics

Resources

License

Stars

Watchers

Forks

Contributors