@fierst/c7t 0.0.0-stage → 1.0.0-beta.1

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 (57) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +62 -2
  4. package/bin/c7t.d.mts +1 -0
  5. package/bin/c7t.mjs +107 -0
  6. package/bin/create.d.mts +9 -0
  7. package/bin/create.mjs +337 -0
  8. package/dist/adapters/bun.d.mts +40 -0
  9. package/dist/adapters/bun.mjs +114 -0
  10. package/dist/adapters/cloudflare.d.mts +29 -0
  11. package/dist/adapters/cloudflare.mjs +28 -0
  12. package/dist/adapters/node.d.mts +31 -0
  13. package/dist/adapters/node.mjs +139 -0
  14. package/dist/adapters/static.d.mts +34 -0
  15. package/dist/adapters/static.mjs +53 -0
  16. package/dist/adapters/vercel.d.mts +40 -0
  17. package/dist/adapters/vercel.mjs +79 -0
  18. package/dist/client.d.mts +78 -0
  19. package/dist/client.mjs +181 -0
  20. package/dist/head-CUiNFY7Q.mjs +142 -0
  21. package/dist/index.d.mts +77 -0
  22. package/dist/index.mjs +25 -0
  23. package/dist/multipart-CwqTb3AQ.mjs +72 -0
  24. package/dist/protocol-B6QOAMGj.d.mts +115 -0
  25. package/dist/protocol-CZANZJ5x.mjs +126 -0
  26. package/dist/router-19ZZ3woS.d.mts +148 -0
  27. package/dist/router-B50LekA_.mjs +680 -0
  28. package/dist/router.d.mts +2 -0
  29. package/dist/router.mjs +1 -0
  30. package/dist/search-params-C03mU47i.mjs +79 -0
  31. package/dist/server.d.mts +146 -0
  32. package/dist/server.mjs +850 -0
  33. package/dist/ssg-DFBgqaob.d.mts +40 -0
  34. package/dist/ssg.d.mts +2 -0
  35. package/dist/ssg.mjs +179 -0
  36. package/dist/vite.d.mts +95 -0
  37. package/dist/vite.mjs +920 -0
  38. package/docs/README.md +26 -0
  39. package/docs/guides/01-getting-started.md +164 -0
  40. package/docs/guides/02-data-fetching-and-mutations.md +258 -0
  41. package/docs/guides/03-streaming-and-workflows.md +198 -0
  42. package/docs/guides/04-routing-layouts-and-state.md +236 -0
  43. package/docs/guides/05-auth-sessions-and-security.md +179 -0
  44. package/docs/guides/06-ssg-and-deployment.md +247 -0
  45. package/docs/guides/07-databases-and-drizzle.md +200 -0
  46. package/docs/reference.md +112 -0
  47. package/llms.txt +1627 -0
  48. package/package.json +122 -4
  49. package/template/gitignore +11 -0
  50. package/template/package.json +22 -0
  51. package/template/src/routes/404.tsx +16 -0
  52. package/template/src/routes/about.tsx +22 -0
  53. package/template/src/routes/index.tsx +41 -0
  54. package/template/src/routes/layout.tsx +14 -0
  55. package/template/src/styles.css +39 -0
  56. package/template/tsconfig.json +18 -0
  57. package/template/vite.config.ts +16 -0
package/package.json CHANGED
@@ -1,6 +1,124 @@
1
1
  {
2
2
  "name": "@fierst/c7t",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-beta.1",
4
+ "description": "c7t (Construct) — Full-stack generator meta-framework built on @fierst/blokd, Hono, and Vite+ with deterministic State Receipts, dual-protocol server() callables, hybrid SSG, and bidirectional NDJSON streaming.",
5
+ "keywords": [
6
+ "blokd",
7
+ "c7t",
8
+ "construct",
9
+ "drizzle",
10
+ "fierst",
11
+ "fullstack",
12
+ "generators",
13
+ "hono",
14
+ "meta-framework",
15
+ "resumability",
16
+ "ssg",
17
+ "ssr",
18
+ "streaming",
19
+ "vite-plus"
20
+ ],
21
+ "homepage": "https://github.com/fierstdev/c7t#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/fierstdev/c7t/issues"
24
+ },
25
+ "license": "MIT",
26
+ "author": "Fierst LLC <hello@fierst.dev>",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/fierstdev/c7t.git"
30
+ },
31
+ "bin": {
32
+ "c7t": "./bin/c7t.mjs",
33
+ "create-c7t": "./bin/create.mjs"
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "docs",
38
+ "bin",
39
+ "template",
40
+ "llms.txt",
41
+ "README.md",
42
+ "CHANGELOG.md",
43
+ "LICENSE"
44
+ ],
45
+ "type": "module",
46
+ "sideEffects": false,
47
+ "exports": {
48
+ ".": {
49
+ "types": "./dist/index.d.mts",
50
+ "import": "./dist/index.mjs"
51
+ },
52
+ "./client": {
53
+ "types": "./dist/client.d.mts",
54
+ "import": "./dist/client.mjs"
55
+ },
56
+ "./router": {
57
+ "types": "./dist/router.d.mts",
58
+ "import": "./dist/router.mjs"
59
+ },
60
+ "./server": {
61
+ "types": "./dist/server.d.mts",
62
+ "import": "./dist/server.mjs"
63
+ },
64
+ "./ssg": {
65
+ "types": "./dist/ssg.d.mts",
66
+ "import": "./dist/ssg.mjs"
67
+ },
68
+ "./node": {
69
+ "types": "./dist/adapters/node.d.mts",
70
+ "import": "./dist/adapters/node.mjs"
71
+ },
72
+ "./cloudflare": {
73
+ "types": "./dist/adapters/cloudflare.d.mts",
74
+ "import": "./dist/adapters/cloudflare.mjs"
75
+ },
76
+ "./vercel": {
77
+ "types": "./dist/adapters/vercel.d.mts",
78
+ "import": "./dist/adapters/vercel.mjs"
79
+ },
80
+ "./bun": {
81
+ "types": "./dist/adapters/bun.d.mts",
82
+ "import": "./dist/adapters/bun.mjs"
83
+ },
84
+ "./static": {
85
+ "types": "./dist/adapters/static.d.mts",
86
+ "import": "./dist/adapters/static.mjs"
87
+ },
88
+ "./vite": {
89
+ "types": "./dist/vite.d.mts",
90
+ "import": "./dist/vite.mjs"
91
+ },
92
+ "./create": "./bin/create.mjs"
93
+ },
94
+ "publishConfig": {
95
+ "access": "public",
96
+ "tag": "beta"
97
+ },
98
+ "scripts": {
99
+ "pack": "vp pack",
100
+ "test": "vp test",
101
+ "test:node": "vp test --project=node",
102
+ "test:browser": "vp test --project=browser",
103
+ "test:smoke": "node tests/production-smoke.mjs",
104
+ "check": "vp check",
105
+ "lint": "vp lint",
106
+ "fmt": "vp fmt"
107
+ },
108
+ "dependencies": {
109
+ "@fierst/blokd": "^1.3.0-beta.1",
110
+ "hono": "^4.7.0",
111
+ "oxc-parser": "0.159.0"
112
+ },
113
+ "devDependencies": {
114
+ "@types/node": "^26.6.9",
115
+ "@vitest/browser-playwright": "5.1.1",
116
+ "playwright": "^1.50.0",
117
+ "typescript": "^6.0.3",
118
+ "valibot": "^1.0.0",
119
+ "vite-plus": "^1.0.0"
120
+ },
121
+ "engines": {
122
+ "node": ">=20.19.0"
123
+ }
124
+ }
@@ -0,0 +1,11 @@
1
+ node_modules
2
+ dist
3
+ .c7t
4
+ .vercel
5
+ .wrangler
6
+ .vitest
7
+ .env
8
+ *.db
9
+ *.db-journal
10
+ *.db-wal
11
+ *.log
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "c7t-starter",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vp dev",
8
+ "build": "c7t build",
9
+ "start": "c7t start",
10
+ "check": "vp check"
11
+ },
12
+ "dependencies": {
13
+ "@fierst/blokd": "^1.3.0-beta.1",
14
+ "@fierst/c7t": "^1.0.0-beta.1",
15
+ "hono": "^4.7.0"
16
+ },
17
+ "devDependencies": {
18
+ "@types/node": "^26.6.9",
19
+ "typescript": "^6.0.3",
20
+ "vite-plus": "^1.0.0"
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ import { head } from "@fierst/c7t";
2
+
3
+ export default function NotFoundPage(props: { pathname: string }) {
4
+ head({ title: "404 — Page Not Found" });
5
+ return (
6
+ <main>
7
+ <h1>404 — Not Found</h1>
8
+ <p>
9
+ No route matched <code>{props.pathname}</code>.
10
+ </p>
11
+ <p>
12
+ <a href="/">Return home</a>
13
+ </p>
14
+ </main>
15
+ );
16
+ }
@@ -0,0 +1,22 @@
1
+ import { head, server } from "@fierst/c7t";
2
+
3
+ export const prerender = true;
4
+
5
+ const getBuildStamp = server(async () => ({
6
+ framework: "@fierst/c7t",
7
+ mode: "prerendered",
8
+ }));
9
+
10
+ export default function* AboutPage() {
11
+ const info = yield* getBuildStamp();
12
+ head({ title: "About — Construct App" });
13
+
14
+ return () => (
15
+ <main>
16
+ <h1>About</h1>
17
+ <p>
18
+ Prerendered at build time by <code>{info.framework}</code> ({info.mode}).
19
+ </p>
20
+ </main>
21
+ );
22
+ }
@@ -0,0 +1,41 @@
1
+ import { head, server } from "@fierst/c7t";
2
+
3
+ const notes: string[] = ["Welcome to Construct (c7t)"];
4
+
5
+ export const getNotes = server(async () => [...notes]);
6
+
7
+ export const addNote = server(async (text: string) => {
8
+ notes.unshift(text);
9
+ return [...notes];
10
+ });
11
+
12
+ export default function* HomePage() {
13
+ let items = yield* getNotes();
14
+ let draft = "";
15
+
16
+ head({ title: "Construct App" });
17
+
18
+ return () => (
19
+ <main>
20
+ <h1>Construct (c7t)</h1>
21
+ <form
22
+ class="note-form"
23
+ onSubmit={async (e) => {
24
+ e.preventDefault();
25
+ if (!draft.trim()) return;
26
+ const text = draft.trim();
27
+ draft = "";
28
+ items = await addNote(text);
29
+ }}
30
+ >
31
+ <input bind:value={draft} placeholder="Write a note..." />
32
+ <button type="submit">Save</button>
33
+ </form>
34
+ <ul>
35
+ {items.map((item, i) => (
36
+ <li key={`${i}-${item}`}>{item}</li>
37
+ ))}
38
+ </ul>
39
+ </main>
40
+ );
41
+ }
@@ -0,0 +1,14 @@
1
+ import type { RouteProps } from "@fierst/c7t";
2
+ import "../styles.css";
3
+
4
+ export default function RootLayout(props: RouteProps) {
5
+ return (
6
+ <div class="app-shell">
7
+ <nav class="app-nav">
8
+ <a href="/">Home</a>
9
+ <a href="/about">About (SSG)</a>
10
+ </nav>
11
+ {props.children}
12
+ </div>
13
+ );
14
+ }
@@ -0,0 +1,39 @@
1
+ :root {
2
+ color-scheme: light dark;
3
+ font-family: system-ui, -apple-system, sans-serif;
4
+ }
5
+
6
+ body {
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ .app-shell {
12
+ max-width: 44rem;
13
+ margin: 0 auto;
14
+ padding: 2rem 1.5rem;
15
+ }
16
+
17
+ .app-nav {
18
+ display: flex;
19
+ gap: 1rem;
20
+ padding-bottom: 1rem;
21
+ margin-bottom: 2rem;
22
+ border-bottom: 1px solid rgba(128, 128, 128, 0.25);
23
+ }
24
+
25
+ .app-nav a {
26
+ font-weight: 600;
27
+ text-decoration: none;
28
+ }
29
+
30
+ .note-form {
31
+ display: flex;
32
+ gap: 0.5rem;
33
+ margin: 1.25rem 0;
34
+ }
35
+
36
+ .note-form input {
37
+ flex: 1;
38
+ padding: 0.5rem 0.75rem;
39
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
7
+ "jsx": "react-jsx",
8
+ "jsxImportSource": "@fierst/blokd",
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "erasableSyntaxOnly": true,
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "skipLibCheck": true,
15
+ "types": ["node"]
16
+ },
17
+ "include": ["src", "vite.config.ts"]
18
+ }
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from "vite-plus";
2
+ import c7t from "@fierst/c7t/vite";
3
+
4
+ export default defineConfig({
5
+ plugins: [c7t()],
6
+ lint: {
7
+ ignorePatterns: ["node_modules/**", "dist/**", ".vercel/**"],
8
+ rules: {
9
+ "require-yield": "off",
10
+ },
11
+ options: {
12
+ typeAware: true,
13
+ typeCheck: true,
14
+ },
15
+ },
16
+ });