rbin-task-flow 1.8.0 → 1.9.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.
|
@@ -91,6 +91,31 @@ In **front web** (Next.js, React) or **mobile** (Expo, React Native) projects, e
|
|
|
91
91
|
|
|
92
92
|
The `app/` directory contains ONLY route definitions. Each file is a thin wrapper that imports and renders the feature page/screen.
|
|
93
93
|
|
|
94
|
+
### Next.js App Router — Route groups in app/
|
|
95
|
+
|
|
96
|
+
In **Next.js App Router** projects, organize `app/` with route groups:
|
|
97
|
+
|
|
98
|
+
- **`(public)/`** — Public routes (login, signup, landing, etc.)
|
|
99
|
+
- **`(private)/`** — Private routes (dashboard, profile, etc.; protect via layout or middleware)
|
|
100
|
+
- **`(server)/`** — API / server routes (Route Handlers, e.g. `route.ts`)
|
|
101
|
+
|
|
102
|
+
Example structure:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
app/
|
|
106
|
+
├── (public)/
|
|
107
|
+
│ ├── login/page.tsx
|
|
108
|
+
│ └── signup/page.tsx
|
|
109
|
+
├── (private)/
|
|
110
|
+
│ ├── dashboard/page.tsx
|
|
111
|
+
│ └── admin/question/page.tsx
|
|
112
|
+
├── (server)/
|
|
113
|
+
│ └── api/
|
|
114
|
+
│ └── .../route.ts
|
|
115
|
+
├── layout.tsx
|
|
116
|
+
└── ...
|
|
117
|
+
```
|
|
118
|
+
|
|
94
119
|
**Front-end (Next.js App Router or React):**
|
|
95
120
|
```typescript
|
|
96
121
|
// src/app/(private)/dashboard/page.tsx
|
|
@@ -133,7 +158,7 @@ export class CreateSessionController {
|
|
|
133
158
|
**Rules:**
|
|
134
159
|
- **Front-end/Mobile**: `page.tsx` / route files NEVER contain logic, state, or imports beyond the feature component
|
|
135
160
|
- **Backend**: `app/` contains controllers and validators only — no business logic
|
|
136
|
-
-
|
|
161
|
+
- **Next.js App Router**: Use `(public)/` for public routes, `(private)/` for private routes, `(server)/` for API/Route Handlers. Other React front-ends and mobile may use only `(public)` and `(private)` as needed.
|
|
137
162
|
- `layout.tsx` files may contain auth guards and providers
|
|
138
163
|
- All business logic lives in `features/`
|
|
139
164
|
|