create-projx 1.7.4 → 1.7.5
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 +10 -10
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/src/templates/README.md.ejs +2 -2
- package/src/templates/ci.yml.ejs +8 -1
- package/src/templates/docker-compose.yml.ejs +3 -12
- package/src/templates/pre-commit.ejs +14 -0
package/README.md
CHANGED
|
@@ -86,16 +86,16 @@ If this saves you even one hour, it's already paid for itself. (It's free.)
|
|
|
86
86
|
|
|
87
87
|
## What you get
|
|
88
88
|
|
|
89
|
-
| Component | Stack | What it gives you
|
|
90
|
-
| ------------- | ------------------------------------------------------------- |
|
|
91
|
-
| `fastapi` | Python, SQLAlchemy, Alembic | Auto-entity CRUD, JWT auth, migrations, OpenAPI docs
|
|
92
|
-
| `fastify` | Node.js, Prisma / Drizzle / Sequelize / TypeORM, TypeBox | Auto-entity CRUD, JWT auth, typed schemas, OpenAPI docs
|
|
93
|
-
| `express` | Express 5, TypeScript, Prisma / Drizzle / Sequelize / TypeORM | Auto-entity CRUD, JWT auth, validation, security middleware, health checks
|
|
94
|
-
| `frontend` | React 19, TypeScript, Vite | Auth, theming, design tokens, light/dark mode
|
|
95
|
-
| `mobile` | Flutter, Riverpod, GoRouter | Auth, biometric, theming, GoRouter shell
|
|
96
|
-
| `e2e` | Playwright | Page object model, auth fixtures, accessibility scans
|
|
97
|
-
| `infra` | Terraform, AWS | EKS, RDS, VPC, ALB, CodePipeline, multi-environment
|
|
98
|
-
| `admin-panel` |
|
|
89
|
+
| Component | Stack | What it gives you |
|
|
90
|
+
| ------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
91
|
+
| `fastapi` | Python, SQLAlchemy, Alembic | Auto-entity CRUD, JWT auth, migrations, OpenAPI docs |
|
|
92
|
+
| `fastify` | Node.js, Prisma / Drizzle / Sequelize / TypeORM, TypeBox | Auto-entity CRUD, JWT auth, typed schemas, OpenAPI docs |
|
|
93
|
+
| `express` | Express 5, TypeScript, Prisma / Drizzle / Sequelize / TypeORM | Auto-entity CRUD, JWT auth, validation, security middleware, health checks |
|
|
94
|
+
| `frontend` | React 19, TypeScript, Vite | Auth, theming, design tokens, light/dark mode |
|
|
95
|
+
| `mobile` | Flutter, Riverpod, GoRouter | Auth, biometric, theming, GoRouter shell |
|
|
96
|
+
| `e2e` | Playwright | Page object model, auth fixtures, accessibility scans |
|
|
97
|
+
| `infra` | Terraform, AWS | EKS, RDS, VPC, ALB, CodePipeline, multi-environment |
|
|
98
|
+
| `admin-panel` | Go, HTMX (Docker), Postgres | Auth-gated table browser over any Postgres, read-only by default, internal-only behind nginx |
|
|
99
99
|
|
|
100
100
|
Plus, in every project: Docker Compose for dev + prod, GitHub Actions CI per component (path-filtered), pre-commit hooks, secret detection, VS Code settings, and 80% test coverage enforced.
|
|
101
101
|
|
package/dist/index.js
CHANGED
|
@@ -386,7 +386,7 @@ var LABELS = {
|
|
|
386
386
|
infra: { label: "Infrastructure", hint: "Terraform + AWS" },
|
|
387
387
|
"admin-panel": {
|
|
388
388
|
label: "Admin Panel",
|
|
389
|
-
hint: "
|
|
389
|
+
hint: "Go + HTMX \u2014 auth-gated table browser over any Postgres"
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
392
|
var DEFAULTS = ["fastify", "frontend", "e2e"];
|
|
@@ -1484,13 +1484,13 @@ async function scanDirectory(dir, relPath) {
|
|
|
1484
1484
|
evidence: "Terraform .tf files found"
|
|
1485
1485
|
});
|
|
1486
1486
|
}
|
|
1487
|
-
const
|
|
1488
|
-
if (
|
|
1487
|
+
const goMod = await readFileOrNull(join5(dir, "go.mod"));
|
|
1488
|
+
if (goMod && /^module\s+adminpanel\b/m.test(goMod)) {
|
|
1489
1489
|
results.push({
|
|
1490
1490
|
component: "admin-panel",
|
|
1491
1491
|
directory: relPath,
|
|
1492
1492
|
confidence: "high",
|
|
1493
|
-
evidence:
|
|
1493
|
+
evidence: 'Go module "adminpanel" found'
|
|
1494
1494
|
});
|
|
1495
1495
|
}
|
|
1496
1496
|
return results;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-projx",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "Scaffold production-grade fullstack projects in seconds. FastAPI, Fastify, Express, React, Flutter, Terraform — with auth, database, CI/CD, E2E tests, and Docker. One command, ready to deploy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@ Scaffolded with [Projx](https://github.com/ukanhaupa/projx).
|
|
|
28
28
|
| **<%= paths.infra %>/** | Terraform, AWS (EKS, RDS, VPC, CodePipeline) |
|
|
29
29
|
<% } %>
|
|
30
30
|
<% if (components.includes('admin-panel')) { %>
|
|
31
|
-
| **<%= paths['admin-panel'] %>/** |
|
|
31
|
+
| **<%= paths['admin-panel'] %>/** | Go + HTMX admin panel — auth-gated table browser over Postgres |
|
|
32
32
|
<% } %>
|
|
33
33
|
| **Identity** | OIDC / JWT |
|
|
34
34
|
| **Containers** | Docker, Docker Compose |
|
|
@@ -91,7 +91,7 @@ cd <%= paths.mobile %> && cp .env.example .env && flutter pub get && flutter run
|
|
|
91
91
|
### <%= paths['admin-panel'] %>/
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
cd <%= paths['admin-panel'] %> && cp .env.example .env # set
|
|
94
|
+
cd <%= paths['admin-panel'] %> && cp .env.example .env # set DATABASE_URL, SESSION_SECRET, ADMIN_EMAIL, ADMIN_PASSWORD
|
|
95
95
|
docker compose up --build <%= paths['admin-panel'] %>
|
|
96
96
|
```
|
|
97
97
|
<% if (components.includes('frontend')) { %>
|
package/src/templates/ci.yml.ejs
CHANGED
|
@@ -395,7 +395,7 @@ jobs:
|
|
|
395
395
|
<% for (const inst of adminPanelInstances) { %>
|
|
396
396
|
|
|
397
397
|
<%= inst.path %>:
|
|
398
|
-
name: <%= inst.display %>
|
|
398
|
+
name: <%= inst.display %>
|
|
399
399
|
needs: changes
|
|
400
400
|
if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.<%= inst.path %> == 'true'
|
|
401
401
|
runs-on: ubuntu-latest
|
|
@@ -406,5 +406,12 @@ jobs:
|
|
|
406
406
|
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
|
407
407
|
with:
|
|
408
408
|
path: ${{ env.WS }}
|
|
409
|
+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
410
|
+
with:
|
|
411
|
+
go-version: '1.26'
|
|
412
|
+
cache-dependency-path: ${{ env.WS }}/<%= inst.path %>/go.sum
|
|
413
|
+
- run: test -z "$(gofmt -l .)"
|
|
414
|
+
- run: go vet ./...
|
|
415
|
+
- run: go build ./...
|
|
409
416
|
- run: docker build -t <%= inst.path %>:ci .
|
|
410
417
|
<% } %>
|
|
@@ -164,22 +164,13 @@ services:
|
|
|
164
164
|
- "8055"
|
|
165
165
|
env_file:
|
|
166
166
|
- ./<%= inst.path %>/.env
|
|
167
|
-
volumes:
|
|
168
|
-
- ./<%= inst.path %>/uploads:/directus/uploads
|
|
169
|
-
- ./<%= inst.path %>/extensions:/directus/extensions
|
|
170
167
|
restart: unless-stopped
|
|
171
168
|
healthcheck:
|
|
172
|
-
test:
|
|
173
|
-
[
|
|
174
|
-
"CMD",
|
|
175
|
-
"node",
|
|
176
|
-
"-e",
|
|
177
|
-
"require('http').get('http://localhost:8055/server/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))",
|
|
178
|
-
]
|
|
169
|
+
test: ["CMD", "/admin", "healthcheck"]
|
|
179
170
|
interval: 30s
|
|
180
|
-
timeout:
|
|
171
|
+
timeout: 5s
|
|
181
172
|
retries: 3
|
|
182
|
-
start_period:
|
|
173
|
+
start_period: 10s
|
|
183
174
|
networks:
|
|
184
175
|
- app-network
|
|
185
176
|
<% } %>
|
|
@@ -157,3 +157,17 @@ if [ -n "$<%= inst.upper %>_TF" ]; then
|
|
|
157
157
|
fi
|
|
158
158
|
fi
|
|
159
159
|
<% } %>
|
|
160
|
+
<% for (const inst of adminPanelInstances) { %>
|
|
161
|
+
|
|
162
|
+
<%= inst.upper %>_GO=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.go$' || true)
|
|
163
|
+
if [ -n "$<%= inst.upper %>_GO" ]; then
|
|
164
|
+
if command -v go &> /dev/null; then
|
|
165
|
+
echo "Checking <%= inst.path %>..."
|
|
166
|
+
echo "$<%= inst.upper %>_GO" | sed 's|^<%= inst.path %>/||' | (cd <%= inst.path %> && xargs gofmt -w)
|
|
167
|
+
(cd <%= inst.path %> && go vet ./...)
|
|
168
|
+
echo "$<%= inst.upper %>_GO" | xargs git add
|
|
169
|
+
else
|
|
170
|
+
echo "Skipping <%= inst.path %> checks (go not installed)"
|
|
171
|
+
fi
|
|
172
|
+
fi
|
|
173
|
+
<% } %>
|