multi-agents-cli 1.1.9 → 1.1.10
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.
- package/README.md +18 -2
- package/core/templates/.agents/backend/API.md +270 -0
- package/core/templates/.agents/backend/AUTH.md +257 -0
- package/core/templates/.agents/backend/DB.md +268 -0
- package/core/templates/.agents/backend/EVENTS.md +264 -0
- package/core/templates/.agents/backend/INIT.md +250 -0
- package/core/templates/.agents/backend/JOBS.md +267 -0
- package/core/templates/.agents/backend/LOGIC.md +302 -0
- package/core/templates/.agents/backend/TESTING.md +277 -0
- package/core/templates/.agents/client/ACCESSIBILITY.md +277 -0
- package/core/templates/.agents/client/FORMS.md +245 -0
- package/core/templates/.agents/client/LOGIC.md +288 -0
- package/core/templates/.agents/client/ROUTING.md +246 -0
- package/core/templates/.agents/client/TESTING.md +252 -0
- package/core/templates/.agents/client/UI.md +237 -0
- package/core/templates/.agents/shared/CLOUD.md +229 -0
- package/core/templates/.agents/shared/CLOUD_TEARDOWN.md +158 -0
- package/core/templates/.agents/shared/SECURITY.md +297 -0
- package/core/templates/.frameworks/backend/django.md +55 -0
- package/core/templates/.frameworks/backend/express.md +74 -0
- package/core/templates/.frameworks/backend/fastapi.md +107 -0
- package/core/templates/.frameworks/backend/fastify.md +74 -0
- package/core/templates/.frameworks/backend/laravel.md +79 -0
- package/core/templates/.frameworks/backend/nestjs.md +75 -0
- package/core/templates/.frameworks/backend/rails.md +84 -0
- package/core/templates/.frameworks/client/angular.md +80 -0
- package/core/templates/.frameworks/client/nextjs.md +47 -0
- package/core/templates/.frameworks/client/nuxt.md +45 -0
- package/core/templates/.frameworks/client/remix.md +44 -0
- package/core/templates/.frameworks/client/sveltekit.md +44 -0
- package/core/templates/.frameworks/client/vite-react.md +45 -0
- package/core/templates/CLAUDE.md +562 -0
- package/core/templates/CONTRACTS.md +16 -0
- package/core/templates/backend/CLAUDE.md +207 -0
- package/core/templates/client/CLAUDE.md +213 -0
- package/core/workflow/agent.js +285 -6
- package/core/workflow/complete.js +141 -5
- package/core/workflow/reset.js +28 -21
- package/core/workflow/run.js +3 -0
- package/init.js +2 -2
- package/lib/questions-flow.js +13 -2
- package/lib/steps.js +13 -1
- package/lib/ui.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Django — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Critical: Use the Dot Argument
|
|
4
|
+
|
|
5
|
+
Django creates a subfolder by default. Use `.` as the project name to scaffold in place:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cd backend
|
|
9
|
+
django-admin startproject config .
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The `.` argument tells Django to scaffold in the current directory.
|
|
13
|
+
|
|
14
|
+
## Expected Structure After Scaffold
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
backend/
|
|
18
|
+
config/
|
|
19
|
+
__init__.py
|
|
20
|
+
asgi.py
|
|
21
|
+
settings.py
|
|
22
|
+
urls.py
|
|
23
|
+
wsgi.py
|
|
24
|
+
manage.py
|
|
25
|
+
requirements.txt
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Post-Scaffold
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cd backend
|
|
32
|
+
python -m venv venv
|
|
33
|
+
source venv/bin/activate
|
|
34
|
+
pip install django djangorestframework python-dotenv
|
|
35
|
+
pip freeze > requirements.txt
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Update .scaffold/.paths.json
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"backend": {
|
|
43
|
+
"schemasDir": {
|
|
44
|
+
"expected": "backend/api/serializers",
|
|
45
|
+
"current": "backend/api/serializers",
|
|
46
|
+
"status": "verified"
|
|
47
|
+
},
|
|
48
|
+
"modelsDir": {
|
|
49
|
+
"expected": "backend/api/models",
|
|
50
|
+
"current": "backend/api/models",
|
|
51
|
+
"status": "verified"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Express — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Scaffold Location
|
|
4
|
+
|
|
5
|
+
Express has no official scaffold CLI. Create the structure manually inside `backend/`:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
mkdir -p backend/src/routes
|
|
9
|
+
mkdir -p backend/src/middleware
|
|
10
|
+
mkdir -p backend/src/services
|
|
11
|
+
mkdir -p backend/src/types
|
|
12
|
+
touch backend/src/index.ts
|
|
13
|
+
touch backend/src/app.ts
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## package.json
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"name": "backend",
|
|
21
|
+
"version": "1.0.0",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "tsx watch src/index.ts",
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"start": "node dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"express": "^4.18.0",
|
|
29
|
+
"cors": "^2.8.5",
|
|
30
|
+
"dotenv": "^16.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/express": "^4.17.0",
|
|
34
|
+
"@types/cors": "^2.8.0",
|
|
35
|
+
"@types/node": "^20.0.0",
|
|
36
|
+
"typescript": "^5.0.0",
|
|
37
|
+
"tsx": "^4.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## app.ts Template
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import express from 'express';
|
|
46
|
+
import cors from 'cors';
|
|
47
|
+
|
|
48
|
+
export const app = express();
|
|
49
|
+
|
|
50
|
+
app.use(cors({ origin: process.env.CLIENT_URL || 'http://localhost:3000' }));
|
|
51
|
+
app.use(express.json());
|
|
52
|
+
|
|
53
|
+
app.get('/health', (_, res) => res.json({ status: 'ok' }));
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Post-Scaffold
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cd backend && npm install
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Update .scaffold/.paths.json
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"backend": {
|
|
67
|
+
"typesDir": {
|
|
68
|
+
"expected": "backend/src/types",
|
|
69
|
+
"current": "backend/src/types",
|
|
70
|
+
"status": "verified"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# FastAPI — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Critical: Scaffold Location
|
|
4
|
+
|
|
5
|
+
You are working inside a git worktree. Your root is the **repo root**, not `backend/`.
|
|
6
|
+
All FastAPI files MUST live under `backend/`. Do NOT scaffold at the repo root.
|
|
7
|
+
|
|
8
|
+
FastAPI has no official scaffold CLI — create the structure manually:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
mkdir -p backend/app/api/routes
|
|
12
|
+
mkdir -p backend/app/schemas
|
|
13
|
+
mkdir -p backend/app/models
|
|
14
|
+
mkdir -p backend/app/services
|
|
15
|
+
mkdir -p backend/app/core
|
|
16
|
+
touch backend/app/__init__.py
|
|
17
|
+
touch backend/app/main.py
|
|
18
|
+
touch backend/app/api/__init__.py
|
|
19
|
+
touch backend/app/api/routes/__init__.py
|
|
20
|
+
touch backend/app/schemas/__init__.py
|
|
21
|
+
touch backend/app/models/__init__.py
|
|
22
|
+
touch backend/app/services/__init__.py
|
|
23
|
+
touch backend/app/core/__init__.py
|
|
24
|
+
touch backend/app/core/config.py
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Expected Structure After Scaffold
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
backend/
|
|
31
|
+
app/
|
|
32
|
+
api/
|
|
33
|
+
routes/
|
|
34
|
+
__init__.py
|
|
35
|
+
core/
|
|
36
|
+
config.py
|
|
37
|
+
__init__.py
|
|
38
|
+
models/
|
|
39
|
+
__init__.py
|
|
40
|
+
schemas/
|
|
41
|
+
__init__.py
|
|
42
|
+
services/
|
|
43
|
+
__init__.py
|
|
44
|
+
__init__.py
|
|
45
|
+
main.py
|
|
46
|
+
requirements.txt
|
|
47
|
+
.env.example
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## main.py Template
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from fastapi import FastAPI
|
|
54
|
+
from fastapi.middleware.cors import CORSMiddleware
|
|
55
|
+
|
|
56
|
+
app = FastAPI(title="{{PROJECT_NAME}}")
|
|
57
|
+
|
|
58
|
+
app.add_middleware(
|
|
59
|
+
CORSMiddleware,
|
|
60
|
+
allow_origins=["http://localhost:3000"],
|
|
61
|
+
allow_credentials=True,
|
|
62
|
+
allow_methods=["*"],
|
|
63
|
+
allow_headers=["*"],
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
@app.get("/health")
|
|
67
|
+
def health():
|
|
68
|
+
return {"status": "ok"}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## requirements.txt
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
fastapi>=0.100.0
|
|
75
|
+
uvicorn[standard]>=0.23.0
|
|
76
|
+
pydantic>=2.0.0
|
|
77
|
+
python-dotenv>=1.0.0
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Post-Scaffold
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd backend
|
|
84
|
+
python -m venv venv
|
|
85
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
86
|
+
pip install -r requirements.txt
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Update .scaffold/.paths.json
|
|
90
|
+
|
|
91
|
+
After scaffolding, update `current` paths and set `status: verified`:
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"backend": {
|
|
95
|
+
"schemasDir": {
|
|
96
|
+
"expected": "backend/app/schemas",
|
|
97
|
+
"current": "backend/app/schemas",
|
|
98
|
+
"status": "verified"
|
|
99
|
+
},
|
|
100
|
+
"modelsDir": {
|
|
101
|
+
"expected": "backend/app/models",
|
|
102
|
+
"current": "backend/app/models",
|
|
103
|
+
"status": "verified"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Fastify — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Scaffold Location
|
|
4
|
+
|
|
5
|
+
Fastify has no official scaffold CLI. Create the structure manually inside `backend/`:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
mkdir -p backend/src/routes
|
|
9
|
+
mkdir -p backend/src/plugins
|
|
10
|
+
mkdir -p backend/src/schemas
|
|
11
|
+
mkdir -p backend/src/services
|
|
12
|
+
mkdir -p backend/src/types
|
|
13
|
+
touch backend/src/app.ts
|
|
14
|
+
touch backend/src/index.ts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## package.json
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"name": "backend",
|
|
22
|
+
"version": "1.0.0",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "tsx watch src/index.ts",
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"start": "node dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"fastify": "^4.0.0",
|
|
30
|
+
"@fastify/cors": "^8.0.0",
|
|
31
|
+
"dotenv": "^16.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
|
+
"typescript": "^5.0.0",
|
|
36
|
+
"tsx": "^4.0.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## app.ts Template
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import Fastify from 'fastify';
|
|
45
|
+
import cors from '@fastify/cors';
|
|
46
|
+
|
|
47
|
+
export const app = Fastify({ logger: true });
|
|
48
|
+
|
|
49
|
+
await app.register(cors, {
|
|
50
|
+
origin: process.env.CLIENT_URL || 'http://localhost:3000',
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
app.get('/health', async () => ({ status: 'ok' }));
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Post-Scaffold
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cd backend && npm install
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Update .scaffold/.paths.json
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"backend": {
|
|
67
|
+
"typesDir": {
|
|
68
|
+
"expected": "backend/src/types",
|
|
69
|
+
"current": "backend/src/types",
|
|
70
|
+
"status": "verified"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Laravel — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Scaffold Location
|
|
4
|
+
|
|
5
|
+
Use the Laravel installer inside the project root:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
composer create-project laravel/laravel backend
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Key Directory Structure
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
backend/
|
|
15
|
+
app/
|
|
16
|
+
Http/
|
|
17
|
+
Controllers/
|
|
18
|
+
Middleware/
|
|
19
|
+
Models/
|
|
20
|
+
Services/
|
|
21
|
+
routes/
|
|
22
|
+
api.php
|
|
23
|
+
web.php
|
|
24
|
+
database/
|
|
25
|
+
migrations/
|
|
26
|
+
seeders/
|
|
27
|
+
config/
|
|
28
|
+
tests/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## composer.json (key dependencies)
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"require": {
|
|
36
|
+
"php": "^8.2",
|
|
37
|
+
"laravel/framework": "^11.0",
|
|
38
|
+
"laravel/sanctum": "^4.0"
|
|
39
|
+
},
|
|
40
|
+
"require-dev": {
|
|
41
|
+
"phpunit/phpunit": "^11.0"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## routes/api.php Template
|
|
47
|
+
|
|
48
|
+
```php
|
|
49
|
+
<?php
|
|
50
|
+
use Illuminate\Http\Request;
|
|
51
|
+
use Illuminate\Support\Facades\Route;
|
|
52
|
+
|
|
53
|
+
Route::get('/health', fn() => response()->json(['status' => 'ok']));
|
|
54
|
+
|
|
55
|
+
Route::middleware('auth:sanctum')->group(function () {
|
|
56
|
+
Route::get('/user', fn(Request $request) => $request->user());
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Post-Scaffold
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd backend
|
|
64
|
+
composer install
|
|
65
|
+
cp .env.example .env
|
|
66
|
+
php artisan key:generate
|
|
67
|
+
php artisan migrate
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Update .scaffold/.paths.json
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"backend": {
|
|
75
|
+
"routesDir": { "expected": "backend/routes", "current": "backend/routes", "status": "verified" },
|
|
76
|
+
"modelsDir": { "expected": "backend/app/Models", "current": "backend/app/Models", "status": "verified" }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# NestJS — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Critical: Scaffold Location
|
|
4
|
+
|
|
5
|
+
You are working inside a git worktree. Your root is the **repo root**, not `backend/`.
|
|
6
|
+
All NestJS files MUST live under `backend/`. Do NOT scaffold at the repo root.
|
|
7
|
+
|
|
8
|
+
NestJS's `nest new` creates a subfolder by default. To scaffold in place:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# From the REPO ROOT — scaffold directly into backend/
|
|
12
|
+
nest new . --directory backend --skip-git --package-manager npm
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
OR scaffold with period to use current directory:
|
|
16
|
+
```bash
|
|
17
|
+
cd backend
|
|
18
|
+
nest new . --skip-git --package-manager npm
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Expected Structure After Scaffold
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
backend/
|
|
25
|
+
src/
|
|
26
|
+
app.controller.ts
|
|
27
|
+
app.controller.spec.ts
|
|
28
|
+
app.module.ts
|
|
29
|
+
app.service.ts
|
|
30
|
+
main.ts
|
|
31
|
+
test/
|
|
32
|
+
nest-cli.json
|
|
33
|
+
package.json
|
|
34
|
+
tsconfig.json
|
|
35
|
+
tsconfig.build.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Verify Location
|
|
39
|
+
|
|
40
|
+
After scaffolding, confirm:
|
|
41
|
+
```bash
|
|
42
|
+
ls backend/src/main.ts # should exist
|
|
43
|
+
ls backend/nest-cli.json # should exist
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If files landed at `backend/my-app/` instead of `backend/` — move them up:
|
|
47
|
+
```bash
|
|
48
|
+
mv backend/my-app/* backend/
|
|
49
|
+
mv backend/my-app/.* backend/ 2>/dev/null || true
|
|
50
|
+
rmdir backend/my-app
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Post-Scaffold
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cd backend
|
|
57
|
+
npm install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Update .scaffold/.paths.json
|
|
61
|
+
|
|
62
|
+
After scaffolding, update `current` paths and set `status: verified`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"backend": {
|
|
66
|
+
"dtoDir": {
|
|
67
|
+
"expected": "backend/src/dto",
|
|
68
|
+
"current": "backend/src/dto",
|
|
69
|
+
"status": "verified"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Create `backend/src/dto/` if it doesn't exist.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Ruby on Rails — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Scaffold Location
|
|
4
|
+
|
|
5
|
+
Use the Rails CLI from the project root:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rails new backend --api --database=postgresql
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Flags:
|
|
12
|
+
- `--api` strips views, uses API-only middleware stack
|
|
13
|
+
- `--database` set to your chosen DB: postgresql, mysql, sqlite3
|
|
14
|
+
|
|
15
|
+
## Key Directory Structure
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
backend/
|
|
19
|
+
app/
|
|
20
|
+
controllers/
|
|
21
|
+
api/
|
|
22
|
+
v1/
|
|
23
|
+
models/
|
|
24
|
+
serializers/
|
|
25
|
+
services/
|
|
26
|
+
config/
|
|
27
|
+
routes.rb
|
|
28
|
+
db/
|
|
29
|
+
migrate/
|
|
30
|
+
schema.rb
|
|
31
|
+
spec/
|
|
32
|
+
requests/
|
|
33
|
+
models/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Gemfile (key dependencies)
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
gem 'rails', '~> 7.2'
|
|
40
|
+
gem 'pg', '~> 1.5'
|
|
41
|
+
gem 'puma', '>= 5.0'
|
|
42
|
+
gem 'rack-cors'
|
|
43
|
+
gem 'devise'
|
|
44
|
+
gem 'jwt'
|
|
45
|
+
|
|
46
|
+
group :development, :test do
|
|
47
|
+
gem 'rspec-rails'
|
|
48
|
+
gem 'factory_bot_rails'
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## config/routes.rb Template
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
Rails.application.routes.draw do
|
|
56
|
+
get '/health', to: proc { [200, {}, [{ status: 'ok' }.to_json]] }
|
|
57
|
+
|
|
58
|
+
namespace :api do
|
|
59
|
+
namespace :v1 do
|
|
60
|
+
# define resources here
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Post-Scaffold
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cd backend
|
|
70
|
+
bundle install
|
|
71
|
+
rails db:create
|
|
72
|
+
rails db:migrate
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Update .scaffold/.paths.json
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"backend": {
|
|
80
|
+
"modelsDir": { "expected": "backend/app/models", "current": "backend/app/models", "status": "verified" },
|
|
81
|
+
"schemasDir": { "expected": "backend/app/serializers", "current": "backend/app/serializers", "status": "verified" }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Angular — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Critical: Scaffold Location
|
|
4
|
+
|
|
5
|
+
You are working inside a git worktree. Your root is the **repo root**, not `client/`.
|
|
6
|
+
All Angular files MUST live under `client/`. Do NOT scaffold at the repo root.
|
|
7
|
+
|
|
8
|
+
Angular's `ng new` creates a subfolder by default. To scaffold correctly:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# From the REPO ROOT — create a temp app, then move files into client/
|
|
12
|
+
ng new temp-app --directory client --skip-git --routing --style=scss
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
OR using the `--directory` flag directly:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ng new my-app --directory client --skip-git --routing --style=scss
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This places all Angular files inside `client/` at the correct level.
|
|
22
|
+
|
|
23
|
+
## Expected Structure After Scaffold
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
client/
|
|
27
|
+
src/
|
|
28
|
+
app/
|
|
29
|
+
app.component.ts
|
|
30
|
+
app.component.html
|
|
31
|
+
app.config.ts
|
|
32
|
+
app.routes.ts
|
|
33
|
+
assets/
|
|
34
|
+
index.html
|
|
35
|
+
main.ts
|
|
36
|
+
styles.scss
|
|
37
|
+
angular.json
|
|
38
|
+
package.json
|
|
39
|
+
tsconfig.json
|
|
40
|
+
tsconfig.app.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Verify Location
|
|
44
|
+
|
|
45
|
+
After scaffolding, confirm:
|
|
46
|
+
```bash
|
|
47
|
+
ls client/src/app/ # should show app.component.ts
|
|
48
|
+
ls client/angular.json # should exist
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If files landed at `client/my-app/` instead of `client/` — move them up:
|
|
52
|
+
```bash
|
|
53
|
+
mv client/my-app/* client/
|
|
54
|
+
mv client/my-app/.* client/ 2>/dev/null || true
|
|
55
|
+
rmdir client/my-app
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Post-Scaffold
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cd client
|
|
62
|
+
npm install
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Update .scaffold/.paths.json
|
|
66
|
+
|
|
67
|
+
After scaffolding, update `current` paths and set `status: verified`:
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"client": {
|
|
71
|
+
"typesDir": {
|
|
72
|
+
"expected": "client/src/app/core/types",
|
|
73
|
+
"current": "client/src/app/core/types",
|
|
74
|
+
"status": "verified"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Create `client/src/app/core/types/` if it doesn't exist — this is where shared types live.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Next.js — Scaffold Instructions
|
|
2
|
+
|
|
3
|
+
## Scaffold Location
|
|
4
|
+
|
|
5
|
+
Scaffold directly into `client/` from the repo root:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx create-next-app@latest client --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --no-git
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Expected Structure After Scaffold
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
client/
|
|
15
|
+
src/
|
|
16
|
+
app/
|
|
17
|
+
layout.tsx
|
|
18
|
+
page.tsx
|
|
19
|
+
globals.css
|
|
20
|
+
lib/
|
|
21
|
+
public/
|
|
22
|
+
next.config.ts
|
|
23
|
+
package.json
|
|
24
|
+
tsconfig.json
|
|
25
|
+
tailwind.config.ts
|
|
26
|
+
postcss.config.mjs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Post-Scaffold
|
|
30
|
+
|
|
31
|
+
Dependencies are installed automatically by create-next-app.
|
|
32
|
+
|
|
33
|
+
## Update .scaffold/.paths.json
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"client": {
|
|
38
|
+
"typesDir": {
|
|
39
|
+
"expected": "client/src/types",
|
|
40
|
+
"current": "client/src/types",
|
|
41
|
+
"status": "verified"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Create `client/src/types/` — this is where shared types live.
|