Skip to content

Architecture

Dylan Johnson edited this page Oct 19, 2024 · 16 revisions

General Architecture Information

Model Classes and Databases

Database Schema

Firebase real-time databases store everything in one JSON tree. The following tree represents the schema of that tree, but avoids exact JSON syntax for conciseness. [Type] represents a list of that type. Non-JSON-supported types, such as UUIDs, Dates, Datetimes, are strings.

Root of Firebase real-time database tree:

  • users: list of objects with:
    • id: UUID
    • classes: [UUID]
    • classInvitations: [UUID]
    • globalSettings: bool
    • blockedUsers: [UUID]
  • settings: list of objects with:
    • user: UUID
    • class: UUID
    • unpreparedOption: bool
    • selectionAnimation: bool
    • selectionAlgorithmIParam: int
    • skippedStudentNotRespottedOnThatDay: bool
    • raiseAbsentSpotProb: bool
    • raiseSkipSpotProb: bool
    • currentRatingSystemMax: int
  • classes: list of objects with:
    • students: [UUID]
    • layout: UUID
    • name: string
    • owner: UUID
    • acceptedUsers: [UUID]
    • invitedUsers: [UUID]
  • students: list of objects with:
    • id: UUID
    • class: UUID
    • firstname: string
    • lastname: string
    • nonAbsentSpottings: int
    • lastNonAbsentSpotting: Date
    • absences: int
    • unprepareds: int
    • lastAbsence: Date
    • lastUnprepared: Date
    • totalOfRatings: double
    • numberOfRatings: int
    • seat: string
    • profilePicture: Cloud Storage for Firebase URI string
    • year: string
  • spottings: list of objects with:
    • id: UUID
    • student: UUID
    • class: UUID
    • unprepared: bool
    • rating: double
    • skipped: bool
    • absent: bool
    • datetime: DateTime
    • maxOfRatingSystem: int
  • gridLayouts: list of objects with:
    • id: UUID
    • class: UUID
    • rows: int
    • columns: int
    • seatNumberingSystem: string
  • bowlLayouts: list of objects with:
    • id: UUID
    • class: UUID
    • rows: int
    • columnsPerRow: [int]
    • seatNumberingSystem: string
  • customLayouts: list of objects with:
    • id: UUID
    • class: UUID
    • seatNumberingSystem: string
    • seats: list of objects with:
      • x: double
      • y: double
      • rotation: double
      • name: string

Views

Clone this wiki locally