Skip to content

Schema + role-based auth foundation for Grade Manager #7

Description

@ThomasLucking

Task description

As a dev, I want the core schema (users + role enum + apprentice/coach/trainer profiles, modules, grades, comments) migrated and seeded, so that the team can build every other Grade Manager story against a stable schema instead of guessing at it.

Acceptance criteria

  • Given the migrations, when run on a fresh DB, then users, apprentices, coaches, trainers, modules, grades, comments all exist clean with no errors.
  • Given users.role, when a user logs in, then auth()->user()->apprentice / ->coach / ->trainer resolves as a real hasOne relationship (not hand-waved).
  • Given the seeded demo users (apprentice x2 tracks, coach x2, trainer, admin), when they log in, then each is redirected based on their role.
  • Given GradePolicy, ApprenticePolicy, CommentPolicy skeletons, when referenced by later stories, then they exist and compile (permissive rules are fine at this stage — enforcement lands in a later story).

Design considerations

No UI in this story — schema and auth wiring only. ER diagram is in plan-d/ARCHITECTURE.md ("Database schema").

Technical informations

Source: .scratch/GRADE_MANAGER/plan-d/spec.md (Data model, Workstream split — this is the Week 1 shared spike, not parallelizable), plan-d/ARCHITECTURE.md (Database schema, Authentication and roles).

Additional notes

Blocks every other Grade Manager story (grade upload, weighted average, coach dashboard, comments, notifications) — must land before any feature stream starts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    foundationBlocking infra/schema work other stories depend onstoryUser story / task tracked on a project board

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions