# Target `src/` module map

This is the end-state layout we’ll migrate to in the `src-migration` phase.

## High-level structure

```
src/
  app/                     # Next.js App Router (routes, layouts, route handlers)
  components/              # shared UI components (client/server)
  features/                # feature modules (schemas + services + repo + UI where needed)
  server/                  # server-only infrastructure (db, auth, http utils, uploads)
  shared/                  # isomorphic utilities (types, helpers) if needed
```

## Feature modules (planned)

- `src/features/projects/*`
  - `repo.ts`: Prisma queries for `project`
  - `schemas.ts`: Zod schemas for create/update payloads
  - `service.ts`: image delete + project CRUD orchestration
- `src/features/bold/*`
- `src/features/about/*` (about cards + about section meta)
- `src/features/navbar/*`
- `src/features/hero/*`
- `src/features/services/*` + `src/features/servicesCta/*`
- `src/features/socialLinks/*`
- `src/features/watts/*` + `src/features/wattsLights/*`
- `src/features/seo/*`
- `src/features/settings/*`
  - email settings + google settings (recaptcha/ga)

## Server infrastructure (planned)

- `src/server/db/prisma.ts` (single prisma export)
- `src/server/auth/*` (NextAuth config + admin checks)
- `src/server/http/*` (parseJson, response helpers, error mapping)
- `src/server/uploads/*` (upload dir resolution, safe filename validation, file serving helpers)
- `src/server/log/*` (minimal structured logging)


