How thamesblanq/ulads-front works
ULADS is a student-union portal with public pages and authenticated dashboards for elections, profiles, announcements, academic resources, and administration. Users sign in through a login page and API proxy, then use dashboard features that fetch or update backend data; election browsing and results are a distinct major workflow. The sampled API routes show cookie-based proxying to an external backend. The README is only the default Next.js template, and unsampled pages/routes leave feature-specific wiring uncertain.
Main entry points: route.ts Login proxy · elections Election API proxy · users Profile endpoints · ElectionPage.tsx Election views
Components 22
Web experience
- Landing page
app/page.tsx - Dashboard routes
app/dashboard - API utilities
lib/api.ts
Identity and profile
- Login and signup
app/components/Login.tsx - Login proxy
app/api/auth/login/route.ts - Profile page
app/components/ProfilePage.tsx - Profile endpoints
app/api/users - JWT cookie
Election lifecycle
- Election views
app/components/ElectionPage.tsx - Election management
app/components/ElectionManagement.tsx - Election API proxy
app/api/elections - Election results
app/components/ElectionResults.tsx
Student services
- Announcements
app/components/AnnouncementPage.tsx - Academic resources
app/components/ResourcePage.tsx - Messaging and minutes
app/dashboard - Payments
app/dashboard/payments/page.tsx
Administration
- Resource management
app/components/ManageResources.tsx - Audit logs
app/components/SystemAuditLogs.tsx - User management
app/components/UserManagement.tsx - Admin dashboard
app/dashboard/admin/page.tsx
Other components
- Student / admin
- ULADS backend
Connections 27
- Student / admin → Landing page: browses
- Student / admin → Login and signup: signs in
- Student / admin → Dashboard routes: opens
- Login and signup → Login proxy: submits credentials
- Login proxy → ULADS backend: forwards login
- ULADS backend → Login proxy: sets cookie
- Login proxy → JWT cookie: relays cookie
- Student / admin → Profile page: edits profile
- Profile page → Profile endpoints: requests profile
- Profile endpoints → JWT cookie: reads token
- Profile endpoints → ULADS backend: proxies profile calls
- Student / admin → Election views: views elections
- Election views → Election API proxy: requests election data
- Election management → Election API proxy: updates status
- Election API proxy → JWT cookie: reads token
- Election API proxy → ULADS backend: proxies election calls
- Election views → Election results: presents results
- Student / admin → Announcements: reads notices
- Student / admin → Academic resources: finds resources
- Student / admin → Resource management: manages links
- Resource management → ULADS backend: fetches and updates
- Student / admin → Messaging and minutes: uses services
- Student / admin → Payments: views payments
- Student / admin → Admin dashboard: administers portal
- Admin dashboard → User management: manages users
- Admin dashboard → Audit logs: reviews activity
- Dashboard routes → API utilities: uses API utilities