@ftisindia/create-app 0.1.0 → 0.1.2

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,94 @@
1
+ # @ftisindia/create-app
2
+
3
+ A `create-next-app`-style scaffolder that generates a production-ready **NestJS
4
+ modular-monolith** starter — with authentication, organisations, memberships,
5
+ invitations, per-organisation RBAC, request context, audit logs, typed settings, Swagger
6
+ docs, health checks, and a guided one-command local setup.
7
+
8
+ The CLI command is **`ftis-nest`**.
9
+
10
+ ## Quick start
11
+
12
+ ```bash
13
+ npx @ftisindia/create-app@latest my-app
14
+ ```
15
+
16
+ Or install once and use the short command anywhere:
17
+
18
+ ```bash
19
+ npm i -g @ftisindia/create-app
20
+ ftis-nest my-app
21
+ ```
22
+
23
+ Then bootstrap and run the generated app:
24
+
25
+ ```bash
26
+ cd my-app
27
+ npm run setup:local # creates DBs, runs migrations, seeds demo data, prints login
28
+ npm run start:dev
29
+ ```
30
+
31
+ Open:
32
+
33
+ - Swagger API docs — http://localhost:3000/docs
34
+ - Health check — http://localhost:3000/health
35
+
36
+ ## Usage
37
+
38
+ ```
39
+ ftis-nest <project-name|.> [options]
40
+ npx @ftisindia/create-app <project-name|.> [options]
41
+ ```
42
+
43
+ `<project-name>` is the folder to create. Use `.` to scaffold into the current directory
44
+ (it must be empty).
45
+
46
+ ### Options
47
+
48
+ | Option | Description |
49
+ |--------|-------------|
50
+ | `--no-install` | Copy files only; skip `npm install` and `prisma generate` |
51
+ | `--no-git` | Skip `git init` / add / initial commit |
52
+ | `--pm <name>` | Package manager to use: `npm`, `pnpm`, or `yarn` |
53
+ | `--help` | Show help |
54
+
55
+ ## Prerequisites
56
+
57
+ - **Node.js 20+**
58
+ - **PostgreSQL** running locally, or a reachable `DATABASE_URL`
59
+
60
+ ## What you get
61
+
62
+ The generated app is a modular monolith with these modules ready to use:
63
+
64
+ - **Auth** — email/password + Google OAuth handoff, JWT access/refresh, logout
65
+ - **Organisations / Memberships / Invitations** — multi-tenant org model with roles and invites
66
+ - **Access Control (RBAC)** — per-organisation roles and permissions (CASL) with a permission registry
67
+ - **Audit** — org-scoped audit logs
68
+ - **Settings** — typed per-organisation settings
69
+ - **Health** — database connectivity check
70
+ - **Sample** — a reference module to copy when adding your own
71
+
72
+ Plus global request validation, a consistent error envelope, Swagger at `/docs`,
73
+ request-context scoping, Prisma with migrations and seed scripts, and a `gen:module`
74
+ generator.
75
+
76
+ ## Common scripts in the generated app
77
+
78
+ ```bash
79
+ npm run setup:local # one-command local bootstrap (non-destructive)
80
+ npm run start:dev # watch mode
81
+ npm run build # production build
82
+ npm test # unit tests
83
+ npm run test:e2e # end-to-end tests
84
+ npm run gen:module # scaffold a new module
85
+ ```
86
+
87
+ See the generated app's own `README.md` and `docs/` for full guidance, including how to
88
+ add a module and the architecture rules.
89
+
90
+ ## License
91
+
92
+ Released under the **PolyForm Noncommercial License 1.0.0** — free for any noncommercial
93
+ use. **Commercial use requires a separate commercial license from
94
+ [ftisindia.com](https://ftisindia.com).** See the bundled `LICENSE` file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftisindia/create-app",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "One-command scaffolder for the Phase 1 NestJS foundation starter.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,6 +6,7 @@
6
6
  "emitDecoratorMetadata": true,
7
7
  "experimentalDecorators": true,
8
8
  "allowSyntheticDefaultImports": true,
9
+ "esModuleInterop": true,
9
10
  "target": "ES2023",
10
11
  "sourceMap": true,
11
12
  "outDir": "./dist",