create-pyro 0.1.0 → 0.2.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 +32 -11
- package/dist/index.js +150 -30
- package/dist/scaffold.js +106 -0
- package/package.json +7 -7
- package/template/.dockerignore +30 -0
- package/template/.env.example +23 -0
- package/template/.gitattributes +2 -0
- package/template/.github/workflows/ci.yml +43 -0
- package/template/.vscode/extensions.json +3 -0
- package/template/.vscode/settings.json +8 -0
- package/template/README.md +57 -4
- package/template/apps/api/Dockerfile +46 -0
- package/template/apps/api/package.json +43 -0
- package/template/apps/api/src/app.test.ts +44 -0
- package/template/apps/api/src/app.ts +54 -0
- package/template/apps/api/src/index.ts +13 -0
- package/template/apps/api/src/lib/auth.ts +46 -0
- package/template/apps/api/src/lib/response.ts +28 -0
- package/template/apps/api/src/lib/session.ts +22 -0
- package/template/apps/api/src/middleware/auth.ts +34 -0
- package/template/apps/api/src/routes/auth.ts +9 -0
- package/template/apps/api/src/routes/index.ts +8 -0
- package/template/apps/api/src/routes/me.test.ts +45 -0
- package/template/apps/api/src/routes/me.ts +29 -0
- package/template/apps/api/src/test/database-url.ts +23 -0
- package/template/apps/api/src/test/global-setup.ts +36 -0
- package/template/apps/api/src/test/setup.ts +8 -0
- package/template/apps/api/src/types/context.ts +8 -0
- package/template/apps/api/tsconfig.build.json +8 -0
- package/template/apps/api/tsconfig.json +9 -0
- package/template/apps/api/tsdown.config.ts +13 -0
- package/template/apps/api/vitest.config.ts +11 -0
- package/template/apps/web/Dockerfile +49 -0
- package/template/apps/web/app/app.css +29 -0
- package/template/apps/web/app/lib/api.server.ts +13 -0
- package/template/apps/web/app/lib/api.test.ts +28 -0
- package/template/apps/web/app/lib/api.ts +47 -0
- package/template/apps/web/app/lib/auth-client.ts +13 -0
- package/template/apps/web/app/lib/env.server.ts +11 -0
- package/template/apps/web/app/lib/public-env.ts +17 -0
- package/template/apps/web/app/lib/session.server.ts +31 -0
- package/template/apps/web/app/lib/utils.ts +6 -0
- package/template/apps/web/app/root.tsx +86 -0
- package/template/apps/web/app/routes/dashboard.tsx +81 -0
- package/template/apps/web/app/routes/home.tsx +161 -0
- package/template/apps/web/app/routes.ts +6 -0
- package/template/apps/web/package.json +41 -0
- package/template/apps/web/public/favicon.svg +5 -0
- package/template/apps/web/react-router.config.ts +6 -0
- package/template/apps/web/tsconfig.json +23 -0
- package/template/apps/web/vite.config.ts +19 -0
- package/template/apps/web/vitest.config.ts +13 -0
- package/template/biome.json +53 -0
- package/template/compose.dev.yml +26 -0
- package/template/compose.yml +75 -0
- package/template/gitignore +32 -1
- package/template/infra/nginx/default.conf +33 -0
- package/template/package.json +23 -1
- package/template/packages/config/package.json +31 -0
- package/template/packages/config/src/index.test.ts +100 -0
- package/template/packages/config/src/index.ts +100 -0
- package/template/packages/config/tsconfig.build.json +8 -0
- package/template/packages/config/tsconfig.json +9 -0
- package/template/packages/config/tsdown.config.ts +12 -0
- package/template/packages/db/Dockerfile +22 -0
- package/template/packages/db/drizzle/0000_init.sql +53 -0
- package/template/packages/db/drizzle/meta/0000_snapshot.json +376 -0
- package/template/packages/db/drizzle/meta/_journal.json +13 -0
- package/template/packages/db/drizzle.config.ts +12 -0
- package/template/packages/db/package.json +38 -0
- package/template/packages/db/src/client.ts +12 -0
- package/template/packages/db/src/index.ts +2 -0
- package/template/packages/db/src/schema/auth.ts +96 -0
- package/template/packages/db/src/schema/index.ts +1 -0
- package/template/packages/db/tsconfig.build.json +7 -0
- package/template/packages/db/tsconfig.json +9 -0
- package/template/packages/db/tsdown.config.ts +12 -0
- package/template/packages/shared/package.json +32 -0
- package/template/packages/shared/src/index.ts +2 -0
- package/template/packages/shared/src/schemas/auth.test.ts +32 -0
- package/template/packages/shared/src/schemas/auth.ts +22 -0
- package/template/packages/shared/src/schemas/index.ts +1 -0
- package/template/packages/shared/src/types/api.ts +15 -0
- package/template/packages/shared/src/types/index.ts +2 -0
- package/template/packages/shared/src/types/user.ts +10 -0
- package/template/packages/shared/tsconfig.build.json +8 -0
- package/template/packages/shared/tsconfig.json +9 -0
- package/template/packages/shared/tsdown.config.ts +12 -0
- package/template/pnpm-workspace.yaml +25 -0
- package/template/tsconfig.json +19 -0
- package/template/turbo.json +27 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ApiSuccess<T> = {
|
|
2
|
+
success: true;
|
|
3
|
+
data: T;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type ApiError = {
|
|
7
|
+
success: false;
|
|
8
|
+
error: {
|
|
9
|
+
code: string;
|
|
10
|
+
message: string;
|
|
11
|
+
details?: unknown;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type ApiResponse<T> = ApiSuccess<T> | ApiError;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
packages:
|
|
2
|
+
- "apps/*"
|
|
3
|
+
- "packages/*"
|
|
4
|
+
allowBuilds:
|
|
5
|
+
esbuild: true
|
|
6
|
+
catalog:
|
|
7
|
+
"@better-auth/drizzle-adapter": ^1.7.13
|
|
8
|
+
"@dotenv-run/cli": ^1.3.6
|
|
9
|
+
"@hono/node-server": ^2.1.5
|
|
10
|
+
"@paralleldrive/cuid2": ^3.3.0
|
|
11
|
+
"@types/node": ^26.6.5
|
|
12
|
+
"@types/pg": ^8.23.1
|
|
13
|
+
"@types/react": ^19.3.0
|
|
14
|
+
"@types/react-dom": ^19.3.0
|
|
15
|
+
better-auth: ^1.7.13
|
|
16
|
+
drizzle-orm: ^0.45.4
|
|
17
|
+
hono: ^4.13.14
|
|
18
|
+
pg: ^8.23.1
|
|
19
|
+
react: ^19.3.1
|
|
20
|
+
react-dom: ^19.3.1
|
|
21
|
+
tsdown: 0.23.1
|
|
22
|
+
tsx: ^4.23.15
|
|
23
|
+
typescript: ^7.0.2
|
|
24
|
+
vitest: ^5.0.5
|
|
25
|
+
zod: ^4.6.7
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2024",
|
|
4
|
+
"lib": ["es2024"],
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"noEmit": true
|
|
10
|
+
},
|
|
11
|
+
"files": [],
|
|
12
|
+
"references": [
|
|
13
|
+
{ "path": "./apps/api" },
|
|
14
|
+
{ "path": "./apps/web" },
|
|
15
|
+
{ "path": "./packages/config" },
|
|
16
|
+
{ "path": "./packages/db" },
|
|
17
|
+
{ "path": "./packages/shared" }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://turbo.build/schema.json",
|
|
3
|
+
"tasks": {
|
|
4
|
+
"build": {
|
|
5
|
+
"dependsOn": ["^build"],
|
|
6
|
+
"outputs": ["dist/**"]
|
|
7
|
+
},
|
|
8
|
+
"start": {
|
|
9
|
+
"dependsOn": ["build"],
|
|
10
|
+
"cache": false
|
|
11
|
+
},
|
|
12
|
+
"dev": {
|
|
13
|
+
"dependsOn": ["^build"],
|
|
14
|
+
"persistent": true,
|
|
15
|
+
"cache": false
|
|
16
|
+
},
|
|
17
|
+
"test": {
|
|
18
|
+
"dependsOn": ["^build"],
|
|
19
|
+
"inputs": ["src/**", "app/**", "drizzle/**", "vitest.config.ts"],
|
|
20
|
+
"passThroughEnv": ["DATABASE_URL", "TEST_DATABASE_URL"]
|
|
21
|
+
},
|
|
22
|
+
"typecheck": {
|
|
23
|
+
"dependsOn": ["^build"],
|
|
24
|
+
"cache": false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|