Systems - JerryNixon/2025-luca-ama-app GitHub Wiki

Systems

Stories

  • As the [system] I want [all users to authenticate] so I can [secure the app]
    • Users must log in before accessing any event
    • Authentication must support Microsoft SSO
 flowchart LR
    start([Start])
    access[Access App]
    checkAuth{Authenticated?}
    login[Redirect to Microsoft SSO]
    grant[Grant Access]
    deny[Block Access]
    stop([Stop])

    start --> access --> checkAuth
    checkAuth -- No --> login --> checkAuth
    checkAuth -- Yes --> grant --> stop
    checkAuth -- Never --> deny --> stop 
  • As the [system] I want to [enforce role-based access] so I can [control what users can do]
    • Only moderators can create or edit events
    • Only presenters/modertaor can mark questions as answered

 flowchart LR
    start([Start])
    action[User Attempts Action]
    checkRole{Role?}
    mod[Allow: Moderator]
    pres[Allow: Presenter]
    deny[Block Access]
    stop([Stop])

    start --> action --> checkRole
    checkRole -- Create/Edit Event --> mod --> stop
    checkRole -- Mark Answered --> mod --> stop
    checkRole -- Mark Answered --> pres --> stop
    checkRole -- Other --> deny --> stop 
  • As the [system] I want to [manage user sessions] so I can [maintain secure access]
    • Sessions expire after inactivity
    • Users must re-authenticate after timeout
 flowchart LR
    start([Start])
    session[User Session Active]
    idle{Inactive Too Long?}
    expire[Expire Session]
    reauth[Prompt Re-authentication]
    access[Restore Access]
    stop([Stop])

    start --> session --> idle
    idle -- Yes --> expire --> reauth --> access --> stop
    idle -- No --> session 
  • As the [system] I want to [validate all inputs] so I can [prevent bad data from entering the system]
    • All required fields must be filled
    • Dates must follow logical order (e.g., close date after open date)
 flowchart LR
    start([Start])
    input[Receive Input]
    checkRequired{All Required Fields Filled?}
    checkDates{Dates in Logical Order?}
    valid[Accept Input]
    error[Show Validation Error]
    stop([Stop])

    start --> input --> checkRequired
    checkRequired -- No --> error --> stop
    checkRequired -- Yes --> checkDates
    checkDates -- No --> error --> stop
    checkDates -- Yes --> valid --> stop 
  • As the [system] I want to [log key actions] so I can [support auditing and debugging]
    • Log user logins, question submissions, and moderation actions
    • Store logs securely and make them queryable (SQL)
 flowchart LR
    start([Start])
    action[User Action Occurs]
    log[Log Action](/JerryNixon/2025-luca-ama-app/wiki/Log-Action)
    store[(SQL DB)]
    query[Make Logs Queryable]
    stop([Stop])

    start --> action --> log --> store --> query --> stop