create-duoo 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +94 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # Duoo
2
+
3
+ A minimal, lightning-fast starter generator for building full-stack applications with Node.js, Express, Vite, and React in a unified TypeScript monorepo with shared types.
4
+
5
+ No heavy meta-frameworks. Decoupled client and server.
6
+
7
+ ## Quick Start
8
+
9
+ Scaffold a fresh project using your package manager of choice:
10
+
11
+ ```bash
12
+ npm create duoo my-app
13
+ # or
14
+ npx create-duoo my-app
15
+ ```
16
+
17
+ Then boot up the dev environment:
18
+
19
+ ```bash
20
+ cd my-app
21
+ npm i
22
+ npm run dev
23
+ ```
24
+
25
+ - Client: http://localhost:5173
26
+ - Server: http://localhost:3000
27
+
28
+ ## Tech Stack
29
+
30
+ - Client: React, TypeScript, Vite (instant HMR, no proxy magic)
31
+ - Server: Node.js, Express, TypeScript (`tsx watch` for sub-millisecond reloads)
32
+ - Shared: Zero-dependency shared workspace for DTOs, schemas, and contract types
33
+ - Workspaces: Native npm workspaces orchestrated with `concurrently`
34
+
35
+ ## Project Structure
36
+
37
+ ```bash
38
+ my-app/
39
+ ├── client/ # React single-page app bundled with Vite
40
+ ├── server/ # Express API server running on Node.js
41
+ ├── shared/ # Shared interfaces, DTOs, and utility types
42
+ ├── package.json # Monorepo root scripts & workspace configuration
43
+ └── tsconfig.base.json
44
+ ```
45
+
46
+ ### End-to-End Type Safety
47
+
48
+ Define your payload interfaces and DTOs inside `shared/src/index.ts`
49
+
50
+ ```bash
51
+ // shared/src/index.ts
52
+ export interface User {
53
+ id: string;
54
+ name: string;
55
+ email: string;
56
+ }
57
+ ```
58
+
59
+ Import them cleanly in your Express backend routes and React frontend components with zero code generation:
60
+
61
+ ```bash
62
+ // server/src/routes.ts
63
+ import type { User } from '@app/shared';
64
+
65
+ // client/src/features/users/UserList.tsx
66
+ import type { User } from '@app/shared';
67
+ ```
68
+
69
+ ## Configuration & Environment
70
+
71
+ The client communicates directly with the Express backend using `VITE_API_URL`.
72
+
73
+ Local dev (`client/.env`):
74
+
75
+ ```bash
76
+ VITE_API_URL=http://localhost:3001
77
+ ```
78
+
79
+ Production (`client/.env.production`):
80
+
81
+ ```bash
82
+ VITE_API_URL=https://api.yourdomain.com
83
+ ```
84
+
85
+ Scripts
86
+ Run from the root directory:
87
+
88
+ - `npm run dev` — Concurrently starts both Express API and Vite client in watch mode
89
+
90
+ - `npm run build` — Builds all packages across workspaces for production
91
+
92
+ License
93
+
94
+ **MIT**
package/index.js CHANGED
@@ -5,7 +5,7 @@ import path from 'node:path';
5
5
  import fs from 'node:fs';
6
6
 
7
7
  // Replace with your actual GitHub repository URL
8
- const REPO_URL = 'https://github.com/ThePratikSah/duo.git';
8
+ const REPO_URL = 'https://github.com/ThePratikSah/duoo.git';
9
9
 
10
10
  const targetDir = process.argv[2];
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-duoo",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Scaffold a duo starter project",
5
5
  "type": "module",
6
6
  "bin": {