Skip to content

Reference

Supun Jayawardana edited this page May 5, 2025 · 2 revisions

Firebase Realtime Database Schema

This is the data model used in the HealthPlus Android application.

Structure

/users
  └── {uid}
       ├── username: string
       ├── birthday: string
       ├── emergencyContact: string
       ├── bloodType: string
       ├── allergies: string
       └── medications: string

Description

  • /users: Root node containing all users.

  • {uid}: Firebase-generated user ID.

  • name: User’s full name.

  • birthday: Date of birth (ISO format recommended).

  • emergencyContact: Primary emergency contact number.

  • bloodType: User’s blood group (e.g., A+, O-).

  • allergies: Text description of known allergies.

  • medications: User’s current medications.

Notes

  • All data is scoped under each user’s UID.

  • Firebase security rules ensure data isolation and access control.

  • Emergency info is user-editable from within the app.

API Reference

Authentication via headers: X-Api-Key: your-api-key

Clone this wiki locally