@polymorphism-tech/morph-spec 4.3.2 → 4.3.3
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/package.json +1 -1
- package/src/commands/project/init.js +14 -4
- package/src/commands/project/update.js +7 -3
- package/stacks/blazor-azure/.morph/.morphversion +3 -3
- package/stacks/blazor-azure/.morph/config/config.json +1 -1
- package/stacks/nextjs-supabase/.morph/.morphversion +3 -3
- package/stacks/nextjs-supabase/.morph/config/agents.json +345 -948
- package/stacks/nextjs-supabase/.morph/config/config.json +1 -1
- package/stacks/blazor-azure/.morph/archive/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/config/config.template.json +0 -122
- package/stacks/blazor-azure/.morph/features/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/hooks/pre-commit/tests-csharp.sh +0 -61
- package/stacks/blazor-azure/.morph/project.md +0 -160
- package/stacks/blazor-azure/.morph/schemas/agent.schema.json +0 -296
- package/stacks/blazor-azure/.morph/schemas/tasks.schema.json +0 -220
- package/stacks/blazor-azure/.morph/specs/.gitkeep +0 -20
- package/stacks/blazor-azure/.morph/state.json +0 -18
- package/stacks/blazor-azure/.morph/test-infra/example.bicep +0 -59
- package/stacks/nextjs-supabase/.morph/config/config.template.json +0 -92
- package/stacks/nextjs-supabase/.morph/hooks/pre-commit/tests-typescript.sh +0 -61
- package/stacks/nextjs-supabase/.morph/project.md +0 -168
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://morph-spec.dev/schemas/tasks.schema.json",
|
|
4
|
-
"title": "MORPH-SPEC Tasks Schema",
|
|
5
|
-
"description": "Schema for tasks.json files in MORPH-SPEC features",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["version", "feature", "tasks"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"version": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "Schema version",
|
|
12
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
13
|
-
"examples": ["3.0.0"]
|
|
14
|
-
},
|
|
15
|
-
"feature": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Feature name (kebab-case)",
|
|
18
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
19
|
-
"examples": ["scheduled-reports", "user-auth"]
|
|
20
|
-
},
|
|
21
|
-
"createdAt": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"format": "date-time",
|
|
24
|
-
"description": "Creation timestamp"
|
|
25
|
-
},
|
|
26
|
-
"updatedAt": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"format": "date-time",
|
|
29
|
-
"description": "Last update timestamp"
|
|
30
|
-
},
|
|
31
|
-
"summary": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"description": "Task summary statistics",
|
|
34
|
-
"properties": {
|
|
35
|
-
"total": { "type": "integer", "minimum": 0 },
|
|
36
|
-
"completed": { "type": "integer", "minimum": 0 },
|
|
37
|
-
"inProgress": { "type": "integer", "minimum": 0 },
|
|
38
|
-
"pending": { "type": "integer", "minimum": 0 },
|
|
39
|
-
"blocked": { "type": "integer", "minimum": 0 }
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"tasks": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"description": "List of tasks",
|
|
45
|
-
"items": {
|
|
46
|
-
"$ref": "#/definitions/task"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"checkpoints": {
|
|
50
|
-
"type": "array",
|
|
51
|
-
"description": "Checkpoint definitions",
|
|
52
|
-
"items": {
|
|
53
|
-
"$ref": "#/definitions/checkpoint"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"definitions": {
|
|
58
|
-
"task": {
|
|
59
|
-
"type": "object",
|
|
60
|
-
"required": ["id", "title", "status"],
|
|
61
|
-
"properties": {
|
|
62
|
-
"id": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "Task ID (format: T001, T002, etc.)",
|
|
65
|
-
"pattern": "^T\\d{3}$",
|
|
66
|
-
"examples": ["T001", "T002", "T010"]
|
|
67
|
-
},
|
|
68
|
-
"title": {
|
|
69
|
-
"type": "string",
|
|
70
|
-
"description": "Task title (short description)",
|
|
71
|
-
"maxLength": 100,
|
|
72
|
-
"examples": ["Create ScheduledReport entity"]
|
|
73
|
-
},
|
|
74
|
-
"description": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "Detailed task description"
|
|
77
|
-
},
|
|
78
|
-
"status": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"enum": ["pending", "in_progress", "completed", "blocked", "skipped"],
|
|
81
|
-
"description": "Current task status"
|
|
82
|
-
},
|
|
83
|
-
"type": {
|
|
84
|
-
"type": "string",
|
|
85
|
-
"enum": ["entity", "command", "query", "handler", "service", "component", "page", "test", "migration", "config", "infra", "docs"],
|
|
86
|
-
"description": "Type of task"
|
|
87
|
-
},
|
|
88
|
-
"priority": {
|
|
89
|
-
"type": "string",
|
|
90
|
-
"enum": ["low", "medium", "high", "critical"],
|
|
91
|
-
"description": "Task priority"
|
|
92
|
-
},
|
|
93
|
-
"dependencies": {
|
|
94
|
-
"type": "array",
|
|
95
|
-
"description": "IDs of tasks that must be completed first",
|
|
96
|
-
"items": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"pattern": "^T\\d{3}$"
|
|
99
|
-
},
|
|
100
|
-
"examples": [["T001", "T002"]]
|
|
101
|
-
},
|
|
102
|
-
"files": {
|
|
103
|
-
"type": "array",
|
|
104
|
-
"description": "Files to be created or modified",
|
|
105
|
-
"items": {
|
|
106
|
-
"type": "string"
|
|
107
|
-
},
|
|
108
|
-
"examples": [["Domain/Entities/ScheduledReport.cs", "Infrastructure/Persistence/Config/ScheduledReportConfig.cs"]]
|
|
109
|
-
},
|
|
110
|
-
"checkpoint": {
|
|
111
|
-
"type": "string",
|
|
112
|
-
"description": "Checkpoint ID this task belongs to",
|
|
113
|
-
"pattern": "^CP\\d{3}$"
|
|
114
|
-
},
|
|
115
|
-
"estimatedLines": {
|
|
116
|
-
"type": "integer",
|
|
117
|
-
"description": "Estimated lines of code",
|
|
118
|
-
"minimum": 0
|
|
119
|
-
},
|
|
120
|
-
"actualLines": {
|
|
121
|
-
"type": "integer",
|
|
122
|
-
"description": "Actual lines of code (after completion)",
|
|
123
|
-
"minimum": 0
|
|
124
|
-
},
|
|
125
|
-
"completedAt": {
|
|
126
|
-
"type": "string",
|
|
127
|
-
"format": "date-time",
|
|
128
|
-
"description": "Completion timestamp"
|
|
129
|
-
},
|
|
130
|
-
"notes": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"description": "Additional notes or comments"
|
|
133
|
-
},
|
|
134
|
-
"blockedReason": {
|
|
135
|
-
"type": "string",
|
|
136
|
-
"description": "Reason for blocked status"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"checkpoint": {
|
|
141
|
-
"type": "object",
|
|
142
|
-
"required": ["id", "name"],
|
|
143
|
-
"properties": {
|
|
144
|
-
"id": {
|
|
145
|
-
"type": "string",
|
|
146
|
-
"description": "Checkpoint ID",
|
|
147
|
-
"pattern": "^CP\\d{3}$",
|
|
148
|
-
"examples": ["CP001", "CP002"]
|
|
149
|
-
},
|
|
150
|
-
"name": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"description": "Checkpoint name",
|
|
153
|
-
"examples": ["Entity Layer Complete", "Backend Complete"]
|
|
154
|
-
},
|
|
155
|
-
"afterTasks": {
|
|
156
|
-
"type": "array",
|
|
157
|
-
"description": "Task IDs after which this checkpoint triggers",
|
|
158
|
-
"items": {
|
|
159
|
-
"type": "string",
|
|
160
|
-
"pattern": "^T\\d{3}$"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"validation": {
|
|
164
|
-
"type": "array",
|
|
165
|
-
"description": "Validation steps for this checkpoint",
|
|
166
|
-
"items": {
|
|
167
|
-
"type": "string"
|
|
168
|
-
},
|
|
169
|
-
"examples": [["Run tests", "Build project", "Review code"]]
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
"examples": [
|
|
175
|
-
{
|
|
176
|
-
"version": "3.0.0",
|
|
177
|
-
"feature": "scheduled-reports",
|
|
178
|
-
"createdAt": "2024-01-15T10:00:00Z",
|
|
179
|
-
"summary": {
|
|
180
|
-
"total": 9,
|
|
181
|
-
"completed": 0,
|
|
182
|
-
"inProgress": 0,
|
|
183
|
-
"pending": 9,
|
|
184
|
-
"blocked": 0
|
|
185
|
-
},
|
|
186
|
-
"tasks": [
|
|
187
|
-
{
|
|
188
|
-
"id": "T001",
|
|
189
|
-
"title": "Create ScheduledReport entity",
|
|
190
|
-
"status": "pending",
|
|
191
|
-
"type": "entity",
|
|
192
|
-
"priority": "high",
|
|
193
|
-
"files": [
|
|
194
|
-
"Domain/Entities/ScheduledReport.cs",
|
|
195
|
-
"Infrastructure/Persistence/Config/ScheduledReportConfig.cs"
|
|
196
|
-
],
|
|
197
|
-
"estimatedLines": 100
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"id": "T002",
|
|
201
|
-
"title": "Create CreateReportCommand + Handler",
|
|
202
|
-
"status": "pending",
|
|
203
|
-
"type": "command",
|
|
204
|
-
"dependencies": ["T001"],
|
|
205
|
-
"files": [
|
|
206
|
-
"Application/Features/Reports/Commands/CreateReportCommand.cs"
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
"checkpoints": [
|
|
211
|
-
{
|
|
212
|
-
"id": "CP001",
|
|
213
|
-
"name": "Entity Layer Complete",
|
|
214
|
-
"afterTasks": ["T001", "T002", "T003"],
|
|
215
|
-
"validation": ["Build project", "Run unit tests"]
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
]
|
|
220
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Specs Ativas
|
|
2
|
-
|
|
3
|
-
Esta pasta contém as especificações ATIVAS do projeto.
|
|
4
|
-
Specs são extraídas de features arquivadas e representam a "verdade atual" do sistema.
|
|
5
|
-
|
|
6
|
-
## Estrutura
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
specs/
|
|
10
|
-
└── {domain}/
|
|
11
|
-
└── spec.md
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Como usar
|
|
15
|
-
|
|
16
|
-
1. Quando uma feature é arquivada, specs relevantes são extraídas para cá
|
|
17
|
-
2. Specs aqui são a referência para comportamento do sistema
|
|
18
|
-
3. Novas features podem referenciar e modificar estas specs
|
|
19
|
-
|
|
20
|
-
*Gerado pelo MORPH Framework*
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./templates/state.template.json",
|
|
3
|
-
"version": "2.1.1",
|
|
4
|
-
"project": {
|
|
5
|
-
"name": "{PROJECT_NAME}",
|
|
6
|
-
"type": "blazor-server",
|
|
7
|
-
"createdAt": null,
|
|
8
|
-
"updatedAt": null
|
|
9
|
-
},
|
|
10
|
-
"features": {},
|
|
11
|
-
"metadata": {
|
|
12
|
-
"totalFeatures": 0,
|
|
13
|
-
"completedFeatures": 0,
|
|
14
|
-
"totalCostEstimated": 0,
|
|
15
|
-
"totalTimeSpent": 0,
|
|
16
|
-
"lastUpdated": null
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Example Bicep file for testing cost calculator
|
|
2
|
-
|
|
3
|
-
param location string = 'eastus2'
|
|
4
|
-
param environment string = 'dev'
|
|
5
|
-
|
|
6
|
-
// Azure SQL Database - Basic tier ($4.99/month)
|
|
7
|
-
resource sqlDatabase 'Microsoft.Sql/servers/databases@2023-05-01-preview' = {
|
|
8
|
-
name: 'sqldb-myapp-${environment}'
|
|
9
|
-
location: location
|
|
10
|
-
sku: {
|
|
11
|
-
name: 'Basic'
|
|
12
|
-
tier: 'Basic'
|
|
13
|
-
}
|
|
14
|
-
properties: {
|
|
15
|
-
collation: 'SQL_Latin1_General_CP1_CI_AS'
|
|
16
|
-
maxSizeBytes: 2147483648 // 2 GB
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Container App - Scale-to-zero ($0/month)
|
|
21
|
-
resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
|
|
22
|
-
name: 'ca-myapp-${environment}'
|
|
23
|
-
location: location
|
|
24
|
-
properties: {
|
|
25
|
-
configuration: {
|
|
26
|
-
ingress: {
|
|
27
|
-
external: true
|
|
28
|
-
targetPort: 8080
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
template: {
|
|
32
|
-
containers: [
|
|
33
|
-
{
|
|
34
|
-
name: 'main'
|
|
35
|
-
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
scale: {
|
|
39
|
-
minReplicas: 0 // Scale-to-zero = FREE
|
|
40
|
-
maxReplicas: 2
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Application Insights - Free tier ($0/month)
|
|
47
|
-
resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
|
|
48
|
-
name: 'appi-myapp-${environment}'
|
|
49
|
-
location: location
|
|
50
|
-
kind: 'web'
|
|
51
|
-
properties: {
|
|
52
|
-
Application_Type: 'web'
|
|
53
|
-
}
|
|
54
|
-
sku: {
|
|
55
|
-
name: 'Free'
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Total: $4.99/month (within $10 limit)
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"project": {
|
|
3
|
-
"name": "MyProject",
|
|
4
|
-
"description": "Project description",
|
|
5
|
-
"type": "nextjs-supabase",
|
|
6
|
-
"repository": "https://github.com/org/repo"
|
|
7
|
-
},
|
|
8
|
-
"supabase": {
|
|
9
|
-
"projectId": "your-project-id",
|
|
10
|
-
"url": "https://xxx.supabase.co",
|
|
11
|
-
"region": "us-east-1",
|
|
12
|
-
"resources": {
|
|
13
|
-
"database": {
|
|
14
|
-
"enabled": true,
|
|
15
|
-
"tier": "Free",
|
|
16
|
-
"extensions": ["pgvector", "pg_trgm"]
|
|
17
|
-
},
|
|
18
|
-
"auth": {
|
|
19
|
-
"enabled": true,
|
|
20
|
-
"providers": ["email", "google", "github"],
|
|
21
|
-
"mfa": false
|
|
22
|
-
},
|
|
23
|
-
"storage": {
|
|
24
|
-
"enabled": true,
|
|
25
|
-
"maxFileSizeMB": 50
|
|
26
|
-
},
|
|
27
|
-
"realtime": {
|
|
28
|
-
"enabled": false
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"easypanel": {
|
|
33
|
-
"domain": "yourdomain.com",
|
|
34
|
-
"ssl": "letsencrypt",
|
|
35
|
-
"services": {
|
|
36
|
-
"api": {
|
|
37
|
-
"dockerfile": "Dockerfile.api",
|
|
38
|
-
"port": 8080,
|
|
39
|
-
"healthCheck": "/health"
|
|
40
|
-
},
|
|
41
|
-
"web": {
|
|
42
|
-
"dockerfile": "Dockerfile.web",
|
|
43
|
-
"port": 3000,
|
|
44
|
-
"healthCheck": "/api/health"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"autoDeploy": {
|
|
48
|
-
"enabled": true,
|
|
49
|
-
"branch": "main"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"github": {
|
|
53
|
-
"organization": "your-org",
|
|
54
|
-
"repository": "your-repo",
|
|
55
|
-
"defaultBranch": "main",
|
|
56
|
-
"featureBranchPrefix": "feature/"
|
|
57
|
-
},
|
|
58
|
-
"agents": {
|
|
59
|
-
"core": {
|
|
60
|
-
"standardsArchitect": { "enabled": true },
|
|
61
|
-
"supabaseExpert": { "enabled": true },
|
|
62
|
-
"containerSpecialist": { "enabled": true }
|
|
63
|
-
},
|
|
64
|
-
"stack": {
|
|
65
|
-
"dotnetSenior": { "enabled": true },
|
|
66
|
-
"nextjsExpert": { "enabled": true },
|
|
67
|
-
"apiDesigner": { "enabled": true }
|
|
68
|
-
},
|
|
69
|
-
"specialists": {
|
|
70
|
-
"easypanelDeployer": { "enabled": true },
|
|
71
|
-
"cssSpecialist": { "enabled": true },
|
|
72
|
-
"securityExpert": { "enabled": true }
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"checkpoints": {
|
|
76
|
-
"afterDesign": true,
|
|
77
|
-
"afterTasks": true,
|
|
78
|
-
"everyNTasks": 3,
|
|
79
|
-
"beforeDeploy": true
|
|
80
|
-
},
|
|
81
|
-
"costs": {
|
|
82
|
-
"limits": {
|
|
83
|
-
"noApproval": "free-tier",
|
|
84
|
-
"withApproval": "$25/month",
|
|
85
|
-
"requiresADR": "above $25/month"
|
|
86
|
-
},
|
|
87
|
-
"estimates": {
|
|
88
|
-
"dev": "$6/month (Supabase Free + VPS $5)",
|
|
89
|
-
"prod": "$31/month (Supabase Pro $25 + VPS $6)"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Scope: nextjs-supabase | Validates TypeScript test coverage
|
|
3
|
-
# MORPH-SPEC Pre-Commit Hook: Test Coverage
|
|
4
|
-
# Checks for .test.ts/.test.tsx files for modified TypeScript files
|
|
5
|
-
|
|
6
|
-
echo "🧪 Checking TypeScript test coverage..."
|
|
7
|
-
|
|
8
|
-
# Get modified .ts/.tsx files (excluding test files)
|
|
9
|
-
MODIFIED_TS=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx)$' | grep -v -E '\.(test|spec)\.(ts|tsx)$')
|
|
10
|
-
|
|
11
|
-
if [[ -z "$MODIFIED_TS" ]]; then
|
|
12
|
-
echo "✓ No TypeScript files modified"
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
HAS_WARNINGS=false
|
|
17
|
-
|
|
18
|
-
for ts_file in $MODIFIED_TS; do
|
|
19
|
-
# Skip trivial files (types, interfaces, DTOs)
|
|
20
|
-
if grep -qi "export type\|export interface\|DTO" "$ts_file"; then
|
|
21
|
-
echo " ℹ️ Skipping trivial file: $ts_file"
|
|
22
|
-
continue
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
# Look for test file
|
|
26
|
-
base_name=$(basename "$ts_file" .ts)
|
|
27
|
-
base_name=$(basename "$base_name" .tsx)
|
|
28
|
-
dir_name=$(dirname "$ts_file")
|
|
29
|
-
|
|
30
|
-
TEST_PATTERNS=(
|
|
31
|
-
"$dir_name/$base_name.test.ts"
|
|
32
|
-
"$dir_name/$base_name.test.tsx"
|
|
33
|
-
"$dir_name/__tests__/$base_name.test.ts"
|
|
34
|
-
"$dir_name/__tests__/$base_name.test.tsx"
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
FOUND_TEST=false
|
|
38
|
-
for pattern in "${TEST_PATTERNS[@]}"; do
|
|
39
|
-
if [[ -f "$pattern" ]]; then
|
|
40
|
-
FOUND_TEST=true
|
|
41
|
-
break
|
|
42
|
-
fi
|
|
43
|
-
done
|
|
44
|
-
|
|
45
|
-
if [[ "$FOUND_TEST" == "false" ]]; then
|
|
46
|
-
echo " ⚠️ Missing test for: $ts_file"
|
|
47
|
-
HAS_WARNINGS=true
|
|
48
|
-
else
|
|
49
|
-
echo " ✓ Test found for: $ts_file"
|
|
50
|
-
fi
|
|
51
|
-
done
|
|
52
|
-
|
|
53
|
-
if [[ "$HAS_WARNINGS" == "true" ]]; then
|
|
54
|
-
echo ""
|
|
55
|
-
echo "⚠️ Warning: Some TypeScript files lack tests"
|
|
56
|
-
echo " Consider adding tests before committing"
|
|
57
|
-
echo " (Override with: git commit --no-verify)"
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
# WARNING ONLY - don't block commit
|
|
61
|
-
exit 0
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
# Project Context - {PROJECT_NAME}
|
|
2
|
-
|
|
3
|
-
> Fill in project-specific information for MORPH agents.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
**Name:** {PROJECT_NAME}
|
|
8
|
-
**Description:** {Brief project description}
|
|
9
|
-
**Type:** Next.js + Supabase Application
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Technical Stack
|
|
14
|
-
|
|
15
|
-
| Layer | Technology | Version |
|
|
16
|
-
|-------|------------|---------|
|
|
17
|
-
| Frontend | Next.js (App Router) | 15.x |
|
|
18
|
-
| UI Library | shadcn/ui + Tailwind CSS | Latest |
|
|
19
|
-
| Backend | .NET Minimal API | 10.0 |
|
|
20
|
-
| Database | PostgreSQL (Supabase) | 15+ |
|
|
21
|
-
| Data Access | Npgsql + Dapper | Latest |
|
|
22
|
-
| Auth | Supabase Auth | Latest |
|
|
23
|
-
| Storage | Supabase Storage | Latest |
|
|
24
|
-
| Realtime | Supabase Realtime | Latest |
|
|
25
|
-
| Vector Search | pgvector (Supabase) | Latest |
|
|
26
|
-
| Hosting | EasyPanel on VPS | Latest |
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Architecture
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
+-------------------------------------------------+
|
|
34
|
-
| Web (Next.js 15 App Router) |
|
|
35
|
-
+-------------------------------------------------+
|
|
36
|
-
| API (.NET 10 Minimal API) |
|
|
37
|
-
+-------------------------------------------------+
|
|
38
|
-
| Data Access (Npgsql + Dapper) |
|
|
39
|
-
+-------------------------------------------------+
|
|
40
|
-
| Supabase Cloud (DB, Auth, Storage) |
|
|
41
|
-
+-------------------------------------------------+
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Project Structure
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
src/
|
|
48
|
-
api/
|
|
49
|
-
{Project}.Api/ # .NET 10 Minimal API
|
|
50
|
-
Endpoints/ # Minimal API endpoint groups
|
|
51
|
-
Services/ # Business logic
|
|
52
|
-
Repositories/ # Dapper queries
|
|
53
|
-
Models/ # Entities, DTOs (records)
|
|
54
|
-
web/
|
|
55
|
-
app/ # Next.js App Router pages
|
|
56
|
-
components/ # React components (shadcn/ui)
|
|
57
|
-
lib/ # Utilities, Supabase client
|
|
58
|
-
hooks/ # Custom React hooks
|
|
59
|
-
|
|
60
|
-
supabase/
|
|
61
|
-
migrations/ # SQL migrations
|
|
62
|
-
seeds/ # Seed data
|
|
63
|
-
policies/ # RLS policies
|
|
64
|
-
|
|
65
|
-
tests/
|
|
66
|
-
{Project}.Tests.Unit/ # .NET unit tests (xUnit)
|
|
67
|
-
{Project}.Tests.Integration/ # .NET integration tests
|
|
68
|
-
web/__tests__/ # Vitest + Testing Library
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Conventions
|
|
74
|
-
|
|
75
|
-
### Naming
|
|
76
|
-
|
|
77
|
-
- **C# Classes:** PascalCase (e.g., `ReportScheduleService`)
|
|
78
|
-
- **C# Interfaces:** I + PascalCase (e.g., `IReportScheduleService`)
|
|
79
|
-
- **C# Methods:** PascalCase, async with Async suffix (e.g., `GetByIdAsync`)
|
|
80
|
-
- **C# Variables:** camelCase (e.g., `reportSchedule`)
|
|
81
|
-
- **C# Private fields:** _camelCase (e.g., `_repository`)
|
|
82
|
-
- **TypeScript Functions/Variables:** camelCase (e.g., `getReportSchedule`)
|
|
83
|
-
- **TypeScript Components:** PascalCase (e.g., `ReportScheduleCard`)
|
|
84
|
-
- **TypeScript Types/Interfaces:** PascalCase (e.g., `ReportScheduleDto`)
|
|
85
|
-
- **SQL Tables:** snake_case (e.g., `report_schedules`)
|
|
86
|
-
- **SQL Columns:** snake_case (e.g., `created_at`)
|
|
87
|
-
|
|
88
|
-
### Code Style
|
|
89
|
-
|
|
90
|
-
- C#: Primary constructors (C# 14), records for DTOs, sealed classes by default
|
|
91
|
-
- TypeScript: Strict mode, prefer `const`, arrow functions for components
|
|
92
|
-
- SQL: Lowercase keywords, explicit column lists (never SELECT *)
|
|
93
|
-
|
|
94
|
-
### Documentation
|
|
95
|
-
|
|
96
|
-
- Code in English
|
|
97
|
-
- XML comments on public C# methods
|
|
98
|
-
- JSDoc on exported TypeScript functions
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Supabase Resources
|
|
103
|
-
|
|
104
|
-
| Resource | Purpose | Tier |
|
|
105
|
-
|----------|---------|------|
|
|
106
|
-
| PostgreSQL | Primary database | Pro / Free |
|
|
107
|
-
| Auth | Authentication (OAuth) | Included |
|
|
108
|
-
| Storage | File uploads | Included |
|
|
109
|
-
| Realtime | WebSocket subscriptions | Included |
|
|
110
|
-
| pgvector | Vector search (if needed) | Extension |
|
|
111
|
-
|
|
112
|
-
### Auth Configuration
|
|
113
|
-
|
|
114
|
-
- **Provider:** Supabase Auth
|
|
115
|
-
- **OAuth:** Google + GitHub
|
|
116
|
-
- **Session:** @supabase/ssr (server-side cookies)
|
|
117
|
-
- **JWT:** Validated in .NET API via Supabase JWT secret
|
|
118
|
-
|
|
119
|
-
### Cost Estimates
|
|
120
|
-
|
|
121
|
-
| Environment | Monthly Cost |
|
|
122
|
-
|-------------|-------------|
|
|
123
|
-
| Dev (Supabase Free + VPS) | ~$6 |
|
|
124
|
-
| Prod (Supabase Pro + VPS) | ~$31 |
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## External Integrations
|
|
129
|
-
|
|
130
|
-
| Service | Purpose | Auth Method |
|
|
131
|
-
|---------|---------|-------------|
|
|
132
|
-
| Supabase | DB, Auth, Storage | Service Role Key |
|
|
133
|
-
| {Service} | {Purpose} | {Method} |
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Development Guidelines
|
|
138
|
-
|
|
139
|
-
### Git Flow
|
|
140
|
-
|
|
141
|
-
- **main** -- Production
|
|
142
|
-
- **develop** -- Development
|
|
143
|
-
- **feature/{name}** -- Features
|
|
144
|
-
|
|
145
|
-
### Commit Convention
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
{type}({scope}): {message}
|
|
149
|
-
|
|
150
|
-
Types: feat, fix, docs, style, refactor, test, chore
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### PR Requirements
|
|
154
|
-
|
|
155
|
-
- [ ] Tests passing
|
|
156
|
-
- [ ] Code review approved
|
|
157
|
-
- [ ] No conflicts
|
|
158
|
-
- [ ] Linked to work item
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Notes
|
|
163
|
-
|
|
164
|
-
{Add project-specific notes here}
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
*Generated by MORPH Framework*
|