feature : Connect front to backend #1

Merged
BoxOfPandor merged 25 commits from feat/connect-front-to-backend into main 2026-03-19 14:56:19 +01:00
Owner

Summary

  • Replaced all mock data with real API calls across nest-front and nest-intra (forum, bugs, events, team, auth, account)
  • Built a typed API client (utils/api.ts) with JWT token management and domain-scoped helpers for both portals
  • Added SiteSettings model + /settings routes so admins can toggle forum and bug reporting on/off; SettingsContext and conditional rendering in Navbar/Footer reflect these toggles
  • Hardened auth middleware to validate user existence and status on every request
  • Updated Docker/Nginx config: front-end services now serve on port 80 with API proxy rules

Changes by layer

Backend (nest-backend/)

  • SiteSettings Prisma model + migration
  • GET/POST /settings route for forum & bug feature flags
  • GET /bugs response now uses data key (matches pagination shape of other endpoints)
  • Auth middleware re-validates user on every protected request
  • Verbose Prisma logging enabled for query/warn/error

Frontend public (nest-front/)

  • utils/api.ts — full rewrite: apiFetch, getToken/setToken/clearToken, authApi, usersApi, forumApi, bugsApi, eventsApi, teamApi
  • AuthContext — real JWT flow (validate via GET /auth/me on mount, no more mock roles)
  • SettingsContext — fetches feature flags and exposes forumEnabled / bugsEnabled
  • All public pages (Forum, Thread, BugReport, BugDetail, Events, Studio, Account) use live API data
  • DevRoleSwitcher simplified to quick-login buttons

Intra portal (nest-intra/)

  • utils/api.ts — typed API client mirroring front's structure
  • IntranetDashboard — recent bug stats from API
  • IntranetBugs — live bug list with status/severity filters
  • IntranetEvents — live events management
  • IntranetModeration — full forum moderation (categories + threads)
## Summary - Replaced all mock data with real API calls across `nest-front` and `nest-intra` (forum, bugs, events, team, auth, account) - Built a typed API client (`utils/api.ts`) with JWT token management and domain-scoped helpers for both portals - Added `SiteSettings` model + `/settings` routes so admins can toggle forum and bug reporting on/off; `SettingsContext` and conditional rendering in Navbar/Footer reflect these toggles - Hardened auth middleware to validate user existence and status on every request - Updated Docker/Nginx config: front-end services now serve on port 80 with API proxy rules ## Changes by layer **Backend (`nest-backend/`)** - `SiteSettings` Prisma model + migration - `GET/POST /settings` route for forum & bug feature flags - `GET /bugs` response now uses `data` key (matches pagination shape of other endpoints) - Auth middleware re-validates user on every protected request - Verbose Prisma logging enabled for query/warn/error **Frontend public (`nest-front/`)** - `utils/api.ts` — full rewrite: `apiFetch`, `getToken/setToken/clearToken`, `authApi`, `usersApi`, `forumApi`, `bugsApi`, `eventsApi`, `teamApi` - `AuthContext` — real JWT flow (validate via `GET /auth/me` on mount, no more mock roles) - `SettingsContext` — fetches feature flags and exposes `forumEnabled` / `bugsEnabled` - All public pages (Forum, Thread, BugReport, BugDetail, Events, Studio, Account) use live API data - `DevRoleSwitcher` simplified to quick-login buttons **Intra portal (`nest-intra/`)** - `utils/api.ts` — typed API client mirroring front's structure - `IntranetDashboard` — recent bug stats from API - `IntranetBugs` — live bug list with status/severity filters - `IntranetEvents` — live events management - `IntranetModeration` — full forum moderation (categories + threads)
BoxOfPandor self-assigned this 2026-03-18 11:16:51 +01:00
BoxOfPandor requested review from Nest 2026-03-18 11:16:51 +01:00
BoxOfPandor changed target branch from dev to main 2026-03-18 15:56:59 +01:00
BoxOfPandor added 25 commits 2026-03-18 15:56:59 +01:00
Pierre1901 approved these changes 2026-03-18 15:59:15 +01:00
Pierre1901 left a comment
Owner

good for me

good for me
BoxOfPandor merged commit dffb1a6681 into main 2026-03-19 14:56:19 +01:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
Crowmate/Nest
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Crowmate/Nest#1