create-projx 1.0.0 → 1.1.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.
package/README.md ADDED
@@ -0,0 +1,144 @@
1
+ # Projx
2
+
3
+ Production-grade project scaffolder. Pick your stack, get a fully wired project with auth, database, CI/CD, and E2E tests — ready to deploy.
4
+
5
+ ## The Problem
6
+
7
+ Starting a new project means days of boilerplate: setting up auth, database migrations, CI/CD pipelines, Docker configs, linting, pre-commit hooks, test infrastructure. Every team does this from scratch, every time.
8
+
9
+ ## The Solution
10
+
11
+ ```bash
12
+ npx create-projx my-app
13
+ ```
14
+
15
+ Pick the components you need. Get a production-ready project in seconds.
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Interactive — pick your stack
21
+ npx create-projx my-app
22
+
23
+ # Non-interactive — specify components
24
+ npx create-projx my-app --components fastify,frontend,e2e
25
+
26
+ # Accept defaults (Fastify + Frontend + E2E)
27
+ npx create-projx my-app -y
28
+ ```
29
+
30
+ ## Components
31
+
32
+ | Component | Stack | What You Get |
33
+ | --------- | ----- | ------------ |
34
+ | `fastapi` | Python, SQLAlchemy, Alembic | Auto-entity CRUD, JWT auth, migrations, OpenAPI docs |
35
+ | `fastify` | Node.js, Prisma, TypeBox | Auto-entity CRUD, JWT auth, typed schemas, OpenAPI docs |
36
+ | `frontend` | React 19, TypeScript, Vite | Auto-entity UI from metadata, design tokens, light/dark mode |
37
+ | `mobile` | Flutter, Riverpod, GoRouter | Auto-entity screens, offline-first with Isar, biometric auth |
38
+ | `e2e` | Playwright | Page object model, auth fixtures, accessibility scans |
39
+ | `infra` | Terraform, AWS | EKS, RDS, VPC, ALB, CodePipeline, multi-environment |
40
+
41
+ All optional. Pick any combination.
42
+
43
+ ## Commands
44
+
45
+ ### Create a Project
46
+
47
+ ```bash
48
+ npx create-projx my-app
49
+ ```
50
+
51
+ Interactive prompt lets you pick components. Or specify them directly:
52
+
53
+ ```bash
54
+ npx create-projx my-app --components fastapi,fastify,frontend,mobile,e2e,infra
55
+ ```
56
+
57
+ ### Add Components Later
58
+
59
+ Already have a project? Add more components anytime:
60
+
61
+ ```bash
62
+ cd my-app
63
+ npx create-projx add frontend mobile
64
+ ```
65
+
66
+ This copies the new component directories, regenerates shared files (docker-compose, CI, pre-commit hooks) to include them, and installs dependencies.
67
+
68
+ ### Update Scaffolding
69
+
70
+ When we improve templates, update your project's scaffolding without touching your code:
71
+
72
+ ```bash
73
+ cd my-app
74
+ npx create-projx@latest update
75
+ ```
76
+
77
+ This updates template files (base models, middleware, configs, Dockerfiles, CI) tracked in `.projx` manifest. Files you created (new entities, pages, features) are never touched.
78
+
79
+ ## Options
80
+
81
+ ```
82
+ npx create-projx <name> [options]
83
+ npx create-projx add <components...>
84
+ npx create-projx update
85
+
86
+ --components <list> Comma-separated: fastapi,fastify,frontend,mobile,e2e,infra
87
+ --no-git Skip git init
88
+ --no-install Skip dependency installation
89
+ -y, --yes Accept defaults (fastify + frontend + e2e)
90
+ -h, --help Show help
91
+ ```
92
+
93
+ ## What a Scaffolded Project Looks Like
94
+
95
+ ```
96
+ my-app/
97
+ ├── fastapi/ # Auto-entity CRUD backend
98
+ ├── frontend/ # Auto-entity UI from /_meta
99
+ ├── e2e/ # Playwright E2E tests
100
+ ├── docker-compose.yml # Production (backend + frontend + SSL)
101
+ ├── docker-compose.dev.yml # Development (PostgreSQL + hot reload)
102
+ ├── .github/workflows/ # CI per component
103
+ ├── .githooks/pre-commit # Format + lint on commit
104
+ ├── setup.sh # Install all deps
105
+ └── .projx # Manifest (tracks template files for updates)
106
+ ```
107
+
108
+ Only the components you selected appear. Shared files (docker-compose, CI, hooks) are generated to match your selection.
109
+
110
+ ## Auto-Entity Pattern
111
+
112
+ The core idea: define a data model, get everything else for free.
113
+
114
+ **Backend** — Drop a model file. The registry auto-discovers it and generates CRUD routes, schemas, pagination, filtering, sorting, search, FK expansion, and OpenAPI docs.
115
+
116
+ **Frontend** — Fetches metadata from `GET /api/v1/_meta`, renders table + form UI automatically. Customize with overrides.
117
+
118
+ **Mobile** — Same metadata endpoint, generates list/detail/form screens. Offline-first with local DB and sync queue.
119
+
120
+ ## What's Included
121
+
122
+ - JWT auth with Keycloak (pluggable providers)
123
+ - Docker Compose for dev and prod
124
+ - GitHub Actions CI per component
125
+ - Pre-commit hooks (format + lint + typecheck)
126
+ - Secret detection in pre-commit
127
+ - 80% test coverage enforced
128
+ - Auto-entity discovery across all stacks
129
+
130
+ ## Development
131
+
132
+ Contributing to Projx itself:
133
+
134
+ ```bash
135
+ git clone https://github.com/ukanhaupa/projx.git
136
+ cd projx
137
+ ./setup.sh
138
+ ```
139
+
140
+ The CLI lives in `cli/`. Templates are the root-level component directories (`fastapi/`, `frontend/`, etc.).
141
+
142
+ ## License
143
+
144
+ MIT