How ryan-b553/issue-tracker-assessment works
Issue Tracker lets users register or log in, then create, filter, assign, update, and comment on issues; a dashboard summarizes issue totals and distributions. The browser pages use cached query hooks and a shared fetch helper to call Next.js API routes, which validate requests, enforce session and edit permissions, and access MySQL through Prisma. The graph also includes user lookup and the shared UI/auth layers. Relationships for unsampled handlers and pages follow the README and SOURCE INDEX; those files were not inspected directly.
Main entry points: api.ts Fetch helper · prisma.ts Prisma client · page.tsx Issue detail · useIssues.ts Issue query hook
Components 24
Browser experience
- Issue list
src/app/issues/page.tsx - New issue
src/app/issues/new/page.tsx - Issue detail
src/app/issues/[id]/page.tsx - Dashboard
src/app/dashboard/page.tsx - Login and register
src/app/(auth) - Auth guard
src/components/AuthGuard.tsx - Navigation
src/components/Navbar.tsx - Status badge
src/components/StatusBadge.tsx - Priority badge
src/components/PriorityBadge.tsx - Current-user hook
src/hooks/useCurrentUser.ts - Issue query hook
src/hooks/useIssues.ts - User query hook
src/hooks/useUsers.ts - Fetch helper
src/lib/api.ts
Identity and access
- Auth endpoints
src/app/api/auth - Session and auth
src/lib/auth.ts - Auth validation
src/lib/validations/auth.ts
Issue management
- Issue endpoints
src/app/api/issues - Comment endpoint
src/app/api/issues/[id]/comments/route.ts - Issue validation
src/lib/validations/issue.ts
API and persistence
- User endpoint
src/app/api/users/route.ts - Dashboard endpoint
src/app/api/dashboard/route.ts - Prisma client
src/lib/prisma.ts - MySQL database
prisma/schema.prisma
Other components
- User
Connections 36
- User → Login and register: signs in
README.md - User → Issue list: browses issues
README.md - User → New issue: creates issues
README.md - User → Issue detail: updates and comments
README.md - User → Dashboard: views metrics
README.md - Auth guard → Current-user hook: checks session
src/components/AuthGuard.tsx - Navigation → Current-user hook: reads user
src/components/Navbar.tsx - Issue list → Issue query hook: loads issues
src/app/issues/page.tsx - New issue → Issue query hook: mutates issues
src/app/issues/new/page.tsx - New issue → User query hook: loads assignees
src/app/issues/new/page.tsx - Issue detail → Issue query hook: loads and updates
src/app/issues/[id]/page.tsx - Issue detail → User query hook: loads assignees
src/app/issues/[id]/page.tsx - Dashboard → Issue query hook: loads issues
src/app/dashboard/page.tsx - Issue list → Status badge: renders status
src/app/issues/page.tsx - Issue detail → Status badge: renders status
src/app/issues/[id]/page.tsx - Issue detail → Priority badge: renders priority
src/app/issues/[id]/page.tsx - Issue query hook → Fetch helper: fetches issues
src/hooks/useIssues.ts - Current-user hook → Fetch helper: fetches session
src/hooks/useCurrentUser.ts - User query hook → Fetch helper: fetches users
src/hooks/useUsers.ts - Login and register → Fetch helper: calls auth API
- Fetch helper → Auth endpoints: sends requests
- Fetch helper → Issue endpoints: sends requests
README.md - Fetch helper → Comment endpoint: sends requests
README.md - Fetch helper → User endpoint: sends requests
README.md - Fetch helper → Dashboard endpoint: sends requests
README.md - Auth endpoints → Session and auth: uses sessions
src/app/api/auth/login/route.ts - Auth endpoints → Auth validation: validates credentials
src/app/api/auth/login/route.ts - Issue endpoints → Session and auth: checks access
src/app/api/issues/route.ts - Issue endpoints → Issue validation: validates input
src/app/api/issues/route.ts - Comment endpoint → Issue validation: validates comment
README.md - Issue endpoints → Prisma client: reads and writes
src/app/api/issues/route.ts - Comment endpoint → Prisma client: reads and writes
src/app/api/issues/[id]/comments/route.ts - Auth endpoints → Prisma client: accesses users
src/app/api/auth/login/route.ts - User endpoint → Prisma client: queries users
src/app/api/users/route.ts - Dashboard endpoint → Prisma client: aggregates issues
src/app/api/dashboard/route.ts - Prisma client → MySQL database: persists records
README.md