docs: consolidate repository guides and preserve audit history
This commit is contained in:
@@ -1,64 +1,7 @@
|
||||
# Frontend Architecture
|
||||
# Frontend architecture
|
||||
|
||||
## Goals
|
||||
The frontend is a statically exported Next.js 16 application. Next provides the build shell (`app/layout.tsx` and `app/page.tsx`); it does not provide server-side data fetching or application routing. React Router owns public and authenticated navigation inside the client shell.
|
||||
|
||||
The frontend should be:
|
||||
The application uses local React state and feature hooks rather than Redux, Zustand, or React Query. API access is centralized in `job-tracker-ui/src/api.ts`. MUI 7 supplies the component library and `src/theme.ts` supplies light/dark theme configuration. English and Norwegian Bokmål translations live in `src/i18n/`.
|
||||
|
||||
- Maintainable.
|
||||
- Consistent.
|
||||
- Easy to extend.
|
||||
|
||||
---
|
||||
|
||||
# Structure
|
||||
|
||||
Organise by feature.
|
||||
|
||||
Example:
|
||||
|
||||
features/
|
||||
|
||||
jobs/
|
||||
|
||||
career/
|
||||
|
||||
cv-builder/
|
||||
|
||||
settings/
|
||||
|
||||
auth/
|
||||
|
||||
|
||||
---
|
||||
|
||||
# Components
|
||||
|
||||
Prefer:
|
||||
|
||||
Reusable components.
|
||||
|
||||
Small focused components.
|
||||
|
||||
---
|
||||
|
||||
# Pages
|
||||
|
||||
Pages should:
|
||||
|
||||
- Compose components.
|
||||
- Handle routing.
|
||||
- Manage page-level state.
|
||||
|
||||
---
|
||||
|
||||
# State
|
||||
|
||||
Avoid unnecessary global state.
|
||||
|
||||
Use:
|
||||
|
||||
- Local state.
|
||||
- Feature state.
|
||||
- Server state.
|
||||
|
||||
Where appropriate.
|
||||
Production builds are served by nginx. Same-origin `/api` proxying is the default; `NEXT_PUBLIC_API_BASE_URL` is an explicit build-time override and must not contain secrets. See [Frontend guide](../frontend/README.md) and [UI system](../frontend/ui-system.md).
|
||||
|
||||
Reference in New Issue
Block a user