How lawcunanan/agalog2.0-internship-goal-tracker works
Agalog is a role-based internship goal tracker. Students select an assigned goal, record work sessions, and review weekly hours and progress; admins monitor logs and student summaries and manage goals, while super admins oversee users and registered goals. Next.js page routes load initial data and hand it to client dashboards; client actions refresh or change that data through service modules and Supabase. The README documents Google/Supabase authentication and Excel exports. Some service implementations and integrations were not sampled, so their finer control flow is not inferred here.
Main entry points: server.ts Supabase server client · page.tsx Student dashboard · ssr Initial data queries · get-user.ts Server identity lookup
Components 26
Access and identity
- Home and login
app/page.tsx - Auth callback
app/auth/callback/route.ts - Auth state
providers/auth-provider.tsx - Supabase Auth
Student tracking
- Student route
app/student/page.tsx - Student dashboard
components/pages/student/page.tsx - Work session form
components/logs/log-form.tsx - Weekly logs
components/logs/weekly-log.tsx - Goal progress
components/logs/log-progress.tsx - Student record route
app/record/[goalId]/[studentId]/page.tsx - Record and export view
components/pages/record/page.tsx - Excel export
lib/utils/export-log.ts
Administration
- Admin route
app/admin/page.tsx - Admin dashboard
components/pages/admin/page.tsx - Goal management
components/dialogs/goals/manage-dialog.tsx - Today log monitoring
components/tables/today-logs.tsx - Super admin route
app/superadmin/page.tsx - Super admin dashboard
components/pages/superadmin/page.tsx
Data and services
- Server identity lookup
services/ssr/auth/get-user.ts - Initial data queries
services/ssr - Client data services
services/csr - Supabase server client
lib/supabase/server.ts - Supabase database
- AI endpoint
app/api/ai/route.ts - AI prompts
lib/ai/prompts.ts
Other components
- Intern or staff
Connections 36
- Intern or staff → Home and login: opens
README.md - Home and login → Auth state: uses auth state
app/page.tsx - Home and login → Supabase Auth: starts Google login
README.md - Supabase Auth → Auth callback: returns to
README.md - Auth callback → Supabase server client: creates server session
app/auth/callback/route.ts - Auth callback → Server identity lookup: checks role
app/auth/callback/route.ts - Auth state → Supabase Auth: subscribes to auth
providers/auth-provider.tsx - Student route → Server identity lookup: loads user
app/student/page.tsx - Student route → Supabase server client: creates data client
app/student/page.tsx - Student route → Initial data queries: loads goal and logs
app/student/page.tsx - Student route → Student dashboard: renders
app/student/page.tsx - Student dashboard → Work session form: renders
components/pages/student/page.tsx - Student dashboard → Weekly logs: renders
components/pages/student/page.tsx - Student dashboard → Goal progress: renders
components/pages/student/page.tsx - Work session form → Client data services: upserts session
components/logs/log-form.tsx - Student dashboard → Client data services: refreshes logs
components/pages/student/page.tsx - Student record route → Server identity lookup: loads user
app/record/[goalId]/[studentId]/page.tsx - Student record route → Supabase server client: creates data client
app/record/[goalId]/[studentId]/page.tsx - Student record route → Initial data queries: loads student record
app/record/[goalId]/[studentId]/page.tsx - Student record route → Record and export view: renders
app/record/[goalId]/[studentId]/page.tsx - Record and export view → Excel export: exports logs
components/pages/record/page.tsx - Admin route → Server identity lookup: loads user
app/admin/page.tsx - Admin route → Supabase server client: creates data client
app/admin/page.tsx - Admin route → Initial data queries: loads dashboard data
app/admin/page.tsx - Admin route → Admin dashboard: renders
app/admin/page.tsx - Admin dashboard → Today log monitoring: renders
components/pages/admin/page.tsx - Admin dashboard → Goal management: offers goal management
- Admin dashboard → Client data services: refreshes stats and filters
components/pages/admin/page.tsx - Super admin route → Server identity lookup: loads user
app/superadmin/page.tsx - Super admin route → Supabase server client: creates data client
app/superadmin/page.tsx - Super admin route → Initial data queries: loads oversight data
app/superadmin/page.tsx - Super admin route → Super admin dashboard: renders
app/superadmin/page.tsx - Supabase server client → Supabase database: queries
- Initial data queries → Supabase database: reads records
- Client data services → Supabase database: reads and writes
- AI endpoint → AI prompts: uses prompts
app/api/ai/route.ts