create-rr-stack 0.0.0-stage → 0.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/index.ts +48 -0
  3. package/package.json +34 -4
  4. package/scaffold.ts +88 -0
  5. package/template/.env.example +3 -0
  6. package/template/.github/workflows/ci.yml +38 -0
  7. package/template/AGENTS.md +44 -0
  8. package/template/CLAUDE.md +1 -0
  9. package/template/LICENSE +21 -0
  10. package/template/README.md +58 -0
  11. package/template/_gitignore +7 -0
  12. package/template/compose.yml +17 -0
  13. package/template/openapi.json +137 -0
  14. package/template/scripts/check.sh +49 -0
  15. package/template/scripts/smoke.sh +31 -0
  16. package/template/server/.sqlx/query-2abc65ebb76339a9d9a9d09820c9cdd6ceba212593a9641b80cda81df39e2fed.json +64 -0
  17. package/template/server/.sqlx/query-4713cdeecf4c3beeef699a78fc6f52857ba3a8f357565ba00d1d97095057e0f5.json +62 -0
  18. package/template/server/Cargo.lock +2135 -0
  19. package/template/server/Cargo.toml +34 -0
  20. package/template/server/clippy.toml +2 -0
  21. package/template/server/migrations/0001_todos.sql +6 -0
  22. package/template/server/src/bin/openapi.rs +4 -0
  23. package/template/server/src/health.rs +15 -0
  24. package/template/server/src/lib.rs +80 -0
  25. package/template/server/src/main.rs +22 -0
  26. package/template/server/src/todos.rs +94 -0
  27. package/template/server/tests/health.rs +31 -0
  28. package/template/server/tests/todos.rs +83 -0
  29. package/template/web/_gitignore +7 -0
  30. package/template/web/app/api/@tanstack/react-query.gen.ts +84 -0
  31. package/template/web/app/api/client/client.gen.ts +277 -0
  32. package/template/web/app/api/client/index.ts +27 -0
  33. package/template/web/app/api/client/types.gen.ts +218 -0
  34. package/template/web/app/api/client/utils.gen.ts +316 -0
  35. package/template/web/app/api/client.gen.ts +16 -0
  36. package/template/web/app/api/core/auth.gen.ts +48 -0
  37. package/template/web/app/api/core/bodySerializer.gen.ts +82 -0
  38. package/template/web/app/api/core/params.gen.ts +178 -0
  39. package/template/web/app/api/core/pathSerializer.gen.ts +171 -0
  40. package/template/web/app/api/core/queryKeySerializer.gen.ts +117 -0
  41. package/template/web/app/api/core/serverSentEvents.gen.ts +242 -0
  42. package/template/web/app/api/core/types.gen.ts +110 -0
  43. package/template/web/app/api/core/utils.gen.ts +140 -0
  44. package/template/web/app/api/index.ts +4 -0
  45. package/template/web/app/api/sdk.gen.ts +32 -0
  46. package/template/web/app/api/types.gen.ts +74 -0
  47. package/template/web/app/app.css +15 -0
  48. package/template/web/app/root.tsx +82 -0
  49. package/template/web/app/routes/home.tsx +21 -0
  50. package/template/web/app/routes/todos.tsx +47 -0
  51. package/template/web/app/routes.ts +6 -0
  52. package/template/web/bun.lock +572 -0
  53. package/template/web/openapi-ts.config.ts +11 -0
  54. package/template/web/package.json +30 -0
  55. package/template/web/public/favicon.ico +0 -0
  56. package/template/web/react-router.config.ts +7 -0
  57. package/template/web/tsconfig.json +26 -0
  58. package/template/web/vite.config.ts +13 -0
  59. package/README.md +0 -3
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from "@hey-api/openapi-ts";
2
+
3
+ // RR_OPENAPI / RR_API_OUT let scripts/check.sh regenerate into a temp dir and diff against the committed client.
4
+ export default defineConfig({
5
+ input: process.env.RR_OPENAPI ?? "../openapi.json",
6
+ output: process.env.RR_API_OUT ?? "app/api",
7
+ plugins: [
8
+ "@hey-api/client-fetch",
9
+ { name: "@tanstack/react-query", queryOptions: true, mutationOptions: true },
10
+ ],
11
+ });
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "rr-web",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "react-router dev",
7
+ "build": "react-router build",
8
+ "gen": "cd ../server && cargo run -q --bin openapi > ../openapi.json && cd ../web && openapi-ts",
9
+ "typecheck": "react-router typegen && tsc --noEmit"
10
+ },
11
+ "dependencies": {
12
+ "@react-router/node": "^8.5.2",
13
+ "@tanstack/react-query": "^5.108.2",
14
+ "isbot": "^5.1.36",
15
+ "react": "^19.3.1",
16
+ "react-dom": "^19.3.1",
17
+ "react-router": "^8.5.2"
18
+ },
19
+ "devDependencies": {
20
+ "@hey-api/openapi-ts": "^0.99.0",
21
+ "@react-router/dev": "^8.5.2",
22
+ "@tailwindcss/vite": "^4.2.2",
23
+ "@types/node": "^22",
24
+ "@types/react": "^19.3.0",
25
+ "@types/react-dom": "^19.3.0",
26
+ "tailwindcss": "^4.2.2",
27
+ "typescript": "^5.9.3",
28
+ "vite": "^8.0.3"
29
+ }
30
+ }
Binary file
@@ -0,0 +1,7 @@
1
+ import type { Config } from "@react-router/dev/config";
2
+
3
+ // Paths listed in `prerender` become static HTML at build time (for SEO); every other route is SPA.
4
+ export default {
5
+ ssr: false,
6
+ prerender: ["/"],
7
+ } satisfies Config;
@@ -0,0 +1,26 @@
1
+ {
2
+ "include": [
3
+ "**/*",
4
+ "**/.server/**/*",
5
+ "**/.client/**/*",
6
+ ".react-router/types/**/*"
7
+ ],
8
+ "compilerOptions": {
9
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
10
+ "types": ["node", "vite/client"],
11
+ "target": "ES2022",
12
+ "module": "ES2022",
13
+ "moduleResolution": "bundler",
14
+ "jsx": "react-jsx",
15
+ "rootDirs": [".", "./.react-router/types"],
16
+ "paths": {
17
+ "~/*": ["./app/*"]
18
+ },
19
+ "esModuleInterop": true,
20
+ "verbatimModuleSyntax": true,
21
+ "noEmit": true,
22
+ "resolveJsonModule": true,
23
+ "skipLibCheck": true,
24
+ "strict": true
25
+ }
26
+ }
@@ -0,0 +1,13 @@
1
+ import { reactRouter } from "@react-router/dev/vite";
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import { defineConfig } from "vite";
4
+
5
+ export default defineConfig({
6
+ plugins: [tailwindcss(), reactRouter()],
7
+ resolve: {
8
+ tsconfigPaths: true,
9
+ },
10
+ server: {
11
+ proxy: { "/api": "http://localhost:3000" },
12
+ },
13
+ });
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.