rbin-task-flow 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,7 +97,7 @@ In **Next.js App Router** projects, organize `app/` with route groups:
|
|
|
97
97
|
|
|
98
98
|
- **`(public)/`** — Public routes (login, signup, landing, etc.)
|
|
99
99
|
- **`(private)/`** — Private routes (dashboard, profile, etc.; protect via layout or middleware)
|
|
100
|
-
- **`(server)/`** — API / server routes (Route Handlers, e.g. `route.ts`)
|
|
100
|
+
- **`(server)/`** — API / server routes (Route Handlers, e.g. `route.ts`). **Any route under `/api` must live inside `(server)`** — i.e. `app/(server)/api/...`, not `app/api/...`.
|
|
101
101
|
|
|
102
102
|
Example structure:
|
|
103
103
|
|
|
@@ -110,7 +110,7 @@ app/
|
|
|
110
110
|
│ ├── dashboard/page.tsx
|
|
111
111
|
│ └── admin/question/page.tsx
|
|
112
112
|
├── (server)/
|
|
113
|
-
│ └── api/
|
|
113
|
+
│ └── api/ # /api/* routes live here
|
|
114
114
|
│ └── .../route.ts
|
|
115
115
|
├── layout.tsx
|
|
116
116
|
└── ...
|
|
@@ -158,7 +158,7 @@ export class CreateSessionController {
|
|
|
158
158
|
**Rules:**
|
|
159
159
|
- **Front-end/Mobile**: `page.tsx` / route files NEVER contain logic, state, or imports beyond the feature component
|
|
160
160
|
- **Backend**: `app/` contains controllers and validators only — no business logic
|
|
161
|
-
- **Next.js App Router**: Use `(public)/` for public routes, `(private)/` for private routes, `(server)/` for API/Route Handlers
|
|
161
|
+
- **Next.js App Router**: Use `(public)/` for public routes, `(private)/` for private routes, `(server)/` for API/Route Handlers; **routes under `/api` must be under `app/(server)/api/`**, not `app/api/`. Other React front-ends and mobile may use only `(public)` and `(private)` as needed.
|
|
162
162
|
- `layout.tsx` files may contain auth guards and providers
|
|
163
163
|
- All business logic lives in `features/`
|
|
164
164
|
|