create-skit 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.
- package/README.md +36 -0
- package/bin/create-skit.mjs +1064 -0
- package/lib/module-application.mjs +281 -0
- package/lib/module-resolver.mjs +179 -0
- package/modules/README.md +22 -0
- package/modules/ai-dx/files/AGENTS.md +116 -0
- package/modules/ai-dx/files/ARCHITECTURE.md +103 -0
- package/modules/ai-dx/module.json +14 -0
- package/modules/ai-dx-claude/files/CLAUDE.md +8 -0
- package/modules/ai-dx-claude/module.json +13 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/auth.mdc +53 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/database.mdc +48 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/env.mdc +43 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/nextjs.mdc +58 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/project.mdc +33 -0
- package/modules/ai-dx-cursor/files/.cursor/rules/testing.mdc +55 -0
- package/modules/ai-dx-cursor/module.json +18 -0
- package/modules/ai-dx-gemini/files/.gemini/GEMINI.md +5 -0
- package/modules/ai-dx-gemini/module.json +13 -0
- package/modules/auth-core/module.json +8 -0
- package/modules/auth-github/module.json +20 -0
- package/modules/billing-polar/module.json +20 -0
- package/modules/billing-stripe/module.json +23 -0
- package/modules/dashboard-shell/files/src/app/globals.css +756 -0
- package/modules/dashboard-shell/files/src/app/settings/page.tsx +67 -0
- package/modules/dashboard-shell/module.json +11 -0
- package/modules/db-pg/module.json +21 -0
- package/modules/db-postgresjs/module.json +21 -0
- package/modules/deploy-docker/files/.dockerignore +19 -0
- package/modules/deploy-docker/files/Dockerfile +25 -0
- package/modules/deploy-docker/module.json +11 -0
- package/modules/email-resend/module.json +21 -0
- package/modules/quality-baseline/module.json +8 -0
- package/modules/testing-baseline/module.json +8 -0
- package/package.json +40 -0
- package/presets/README.md +12 -0
- package/presets/blank.json +67 -0
- package/presets/dashboard.json +67 -0
- package/templates/base-web/.env.example +17 -0
- package/templates/base-web/.github/workflows/ci.yml +34 -0
- package/templates/base-web/.husky/pre-commit +3 -0
- package/templates/base-web/.husky/pre-push +3 -0
- package/templates/base-web/.prettierignore +3 -0
- package/templates/base-web/README.md +42 -0
- package/templates/base-web/drizzle.config.ts +16 -0
- package/templates/base-web/eslint.config.mjs +127 -0
- package/templates/base-web/manifest.json +5 -0
- package/templates/base-web/next-env.d.ts +4 -0
- package/templates/base-web/next.config.ts +5 -0
- package/templates/base-web/package.json +75 -0
- package/templates/base-web/playwright.config.ts +21 -0
- package/templates/base-web/prettier.config.mjs +9 -0
- package/templates/base-web/proxy.ts +23 -0
- package/templates/base-web/src/app/api/auth/[...all]/route.ts +5 -0
- package/templates/base-web/src/app/api/billing/checkout/route.ts +26 -0
- package/templates/base-web/src/app/api/billing/portal/route.ts +25 -0
- package/templates/base-web/src/app/api/email/test/route.ts +28 -0
- package/templates/base-web/src/app/api/webhooks/polar/route.ts +5 -0
- package/templates/base-web/src/app/api/webhooks/stripe/route.ts +5 -0
- package/templates/base-web/src/app/billing/page.tsx +55 -0
- package/templates/base-web/src/app/dashboard/page.tsx +15 -0
- package/templates/base-web/src/app/email/page.tsx +46 -0
- package/templates/base-web/src/app/error.tsx +27 -0
- package/templates/base-web/src/app/globals.css +534 -0
- package/templates/base-web/src/app/layout.tsx +19 -0
- package/templates/base-web/src/app/llms-full.txt/route.ts +158 -0
- package/templates/base-web/src/app/llms.txt/route.ts +59 -0
- package/templates/base-web/src/app/loading.tsx +24 -0
- package/templates/base-web/src/app/not-found.tsx +16 -0
- package/templates/base-web/src/app/page.tsx +5 -0
- package/templates/base-web/src/app/sign-in/page.tsx +14 -0
- package/templates/base-web/src/app/sign-up/page.tsx +14 -0
- package/templates/base-web/src/components/auth/email-auth-form.test.tsx +40 -0
- package/templates/base-web/src/components/auth/email-auth-form.tsx +128 -0
- package/templates/base-web/src/components/auth/sign-out-button.tsx +29 -0
- package/templates/base-web/src/db/index.ts +16 -0
- package/templates/base-web/src/db/schema/auth.ts +4 -0
- package/templates/base-web/src/db/schema/index.ts +2 -0
- package/templates/base-web/src/db/schema/projects.ts +17 -0
- package/templates/base-web/src/db/seeds/index.ts +32 -0
- package/templates/base-web/src/lib/auth-client.ts +5 -0
- package/templates/base-web/src/lib/auth-session.ts +21 -0
- package/templates/base-web/src/lib/auth.ts +23 -0
- package/templates/base-web/src/lib/billing/index.ts +37 -0
- package/templates/base-web/src/lib/billing/providers/polar.ts +80 -0
- package/templates/base-web/src/lib/billing/providers/stripe.ts +77 -0
- package/templates/base-web/src/lib/billing/types.ts +25 -0
- package/templates/base-web/src/lib/email/index.ts +19 -0
- package/templates/base-web/src/lib/email/templates.test.ts +12 -0
- package/templates/base-web/src/lib/email/templates.ts +40 -0
- package/templates/base-web/src/lib/env.ts +83 -0
- package/templates/base-web/tests/e2e/home.spec.ts +8 -0
- package/templates/base-web/tsconfig.json +34 -0
- package/templates/base-web/vitest.config.ts +19 -0
- package/templates/blank/.env.example +16 -0
- package/templates/blank/.github/workflows/ci.yml +34 -0
- package/templates/blank/.husky/pre-commit +3 -0
- package/templates/blank/.husky/pre-push +3 -0
- package/templates/blank/.prettierignore +3 -0
- package/templates/blank/drizzle.config.ts +16 -0
- package/templates/blank/eslint.config.mjs +127 -0
- package/templates/blank/next-env.d.ts +4 -0
- package/templates/blank/next.config.ts +5 -0
- package/templates/blank/package.json +75 -0
- package/templates/blank/playwright.config.ts +21 -0
- package/templates/blank/prettier.config.mjs +9 -0
- package/templates/blank/proxy.ts +28 -0
- package/templates/blank/src/app/api/auth/[...all]/route.ts +5 -0
- package/templates/blank/src/app/api/billing/checkout/route.ts +26 -0
- package/templates/blank/src/app/api/billing/portal/route.ts +25 -0
- package/templates/blank/src/app/api/email/test/route.ts +28 -0
- package/templates/blank/src/app/api/webhooks/polar/route.ts +5 -0
- package/templates/blank/src/app/api/webhooks/stripe/route.ts +5 -0
- package/templates/blank/src/app/billing/page.tsx +70 -0
- package/templates/blank/src/app/email/page.tsx +46 -0
- package/templates/blank/src/app/globals.css +394 -0
- package/templates/blank/src/app/layout.tsx +19 -0
- package/templates/blank/src/app/page.tsx +23 -0
- package/templates/blank/src/app/sign-in/page.tsx +18 -0
- package/templates/blank/src/app/sign-up/page.tsx +18 -0
- package/templates/blank/src/components/auth/email-auth-form.test.tsx +39 -0
- package/templates/blank/src/components/auth/email-auth-form.tsx +109 -0
- package/templates/blank/src/components/auth/sign-out-button.tsx +29 -0
- package/templates/blank/src/db/index.ts +16 -0
- package/templates/blank/src/db/schema/auth.ts +4 -0
- package/templates/blank/src/db/schema/index.ts +2 -0
- package/templates/blank/src/db/schema/projects.ts +17 -0
- package/templates/blank/src/db/seeds/index.ts +28 -0
- package/templates/blank/src/lib/auth-client.ts +5 -0
- package/templates/blank/src/lib/auth-session.ts +11 -0
- package/templates/blank/src/lib/auth.ts +23 -0
- package/templates/blank/src/lib/billing/index.ts +37 -0
- package/templates/blank/src/lib/billing/providers/polar.ts +80 -0
- package/templates/blank/src/lib/billing/providers/stripe.ts +77 -0
- package/templates/blank/src/lib/billing/types.ts +25 -0
- package/templates/blank/src/lib/email/index.ts +19 -0
- package/templates/blank/src/lib/email/templates.test.ts +15 -0
- package/templates/blank/src/lib/email/templates.ts +40 -0
- package/templates/blank/src/lib/env.ts +80 -0
- package/templates/blank/tsconfig.json +34 -0
- package/templates/blank/vitest.config.ts +19 -0
- package/templates/dashboard/.env.example +16 -0
- package/templates/dashboard/.github/workflows/ci.yml +34 -0
- package/templates/dashboard/.husky/pre-commit +3 -0
- package/templates/dashboard/.husky/pre-push +3 -0
- package/templates/dashboard/.prettierignore +3 -0
- package/templates/dashboard/drizzle.config.ts +16 -0
- package/templates/dashboard/eslint.config.mjs +127 -0
- package/templates/dashboard/next-env.d.ts +4 -0
- package/templates/dashboard/next.config.ts +5 -0
- package/templates/dashboard/package.json +75 -0
- package/templates/dashboard/playwright.config.ts +21 -0
- package/templates/dashboard/prettier.config.mjs +9 -0
- package/templates/dashboard/proxy.ts +36 -0
- package/templates/dashboard/src/app/api/auth/[...all]/route.ts +5 -0
- package/templates/dashboard/src/app/api/billing/checkout/route.ts +26 -0
- package/templates/dashboard/src/app/api/billing/portal/route.ts +25 -0
- package/templates/dashboard/src/app/api/email/test/route.ts +28 -0
- package/templates/dashboard/src/app/api/webhooks/polar/route.ts +5 -0
- package/templates/dashboard/src/app/api/webhooks/stripe/route.ts +5 -0
- package/templates/dashboard/src/app/billing/layout.tsx +22 -0
- package/templates/dashboard/src/app/billing/page.tsx +73 -0
- package/templates/dashboard/src/app/dashboard/layout.tsx +22 -0
- package/templates/dashboard/src/app/dashboard/page.tsx +104 -0
- package/templates/dashboard/src/app/email/layout.tsx +22 -0
- package/templates/dashboard/src/app/email/page.tsx +54 -0
- package/templates/dashboard/src/app/globals.css +1357 -0
- package/templates/dashboard/src/app/layout.tsx +25 -0
- package/templates/dashboard/src/app/page.tsx +154 -0
- package/templates/dashboard/src/app/settings/layout.tsx +22 -0
- package/templates/dashboard/src/app/settings/page.tsx +85 -0
- package/templates/dashboard/src/app/sign-in/page.tsx +47 -0
- package/templates/dashboard/src/app/sign-up/page.tsx +47 -0
- package/templates/dashboard/src/components/auth/email-auth-form.test.tsx +39 -0
- package/templates/dashboard/src/components/auth/email-auth-form.tsx +160 -0
- package/templates/dashboard/src/components/auth/sign-out-button.tsx +29 -0
- package/templates/dashboard/src/components/dashboard/shell.tsx +158 -0
- package/templates/dashboard/src/db/index.ts +16 -0
- package/templates/dashboard/src/db/schema/auth.ts +4 -0
- package/templates/dashboard/src/db/schema/index.ts +2 -0
- package/templates/dashboard/src/db/schema/projects.ts +17 -0
- package/templates/dashboard/src/db/seeds/index.ts +28 -0
- package/templates/dashboard/src/lib/auth-client.ts +5 -0
- package/templates/dashboard/src/lib/auth-session.ts +11 -0
- package/templates/dashboard/src/lib/auth.ts +41 -0
- package/templates/dashboard/src/lib/billing/index.ts +37 -0
- package/templates/dashboard/src/lib/billing/providers/polar.ts +80 -0
- package/templates/dashboard/src/lib/billing/providers/stripe.ts +77 -0
- package/templates/dashboard/src/lib/billing/types.ts +25 -0
- package/templates/dashboard/src/lib/email/index.ts +19 -0
- package/templates/dashboard/src/lib/email/templates.test.ts +15 -0
- package/templates/dashboard/src/lib/email/templates.ts +40 -0
- package/templates/dashboard/src/lib/env.ts +88 -0
- package/templates/dashboard/tsconfig.json +34 -0
- package/templates/dashboard/vitest.config.ts +19 -0
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&f[]=general-sans@400,500,600&display=swap");
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
color-scheme: dark;
|
|
5
|
+
--font-display: "Satoshi", system-ui, sans-serif;
|
|
6
|
+
--font-body: "General Sans", system-ui, sans-serif;
|
|
7
|
+
--font-mono: ui-monospace, "SF Mono", "Fira Code", monospace;
|
|
8
|
+
--ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
9
|
+
--radius: 14px;
|
|
10
|
+
--bg: #09090b;
|
|
11
|
+
--bg-raised: #111113;
|
|
12
|
+
--bg-overlay: #18181b;
|
|
13
|
+
--bg-subtle: #1e1e22;
|
|
14
|
+
--border: rgba(255, 255, 255, 0.06);
|
|
15
|
+
--border-hover: rgba(255, 255, 255, 0.12);
|
|
16
|
+
--text: #f0eef5;
|
|
17
|
+
--text-secondary: #9490a5;
|
|
18
|
+
--text-muted: #5e5a70;
|
|
19
|
+
--text-inverse: #09090b;
|
|
20
|
+
--accent: #00d4aa;
|
|
21
|
+
--accent-dim: rgba(0, 212, 170, 0.12);
|
|
22
|
+
--accent-glow: rgba(0, 212, 170, 0.25);
|
|
23
|
+
--accent-hover: #00eabc;
|
|
24
|
+
--danger: #f04e4e;
|
|
25
|
+
--danger-dim: rgba(240, 78, 78, 0.12);
|
|
26
|
+
--success: #34c759;
|
|
27
|
+
--success-dim: rgba(52, 199, 89, 0.12);
|
|
28
|
+
--warn: #f5a623;
|
|
29
|
+
--warn-dim: rgba(245, 166, 35, 0.12);
|
|
30
|
+
--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
|
|
31
|
+
--glow: 0 0 40px var(--accent-glow);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
35
|
+
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
|
|
36
|
+
body { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100dvh; }
|
|
37
|
+
a { color: inherit; text-decoration: none; }
|
|
38
|
+
button { cursor: pointer; font: inherit; border: none; background: none; }
|
|
39
|
+
input, textarea, select { font: inherit; }
|
|
40
|
+
::selection { background: var(--accent-dim); color: var(--accent); }
|
|
41
|
+
::-webkit-scrollbar { width: 6px; }
|
|
42
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
43
|
+
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
|
|
44
|
+
|
|
45
|
+
body::before {
|
|
46
|
+
content: "";
|
|
47
|
+
position: fixed;
|
|
48
|
+
inset: 0;
|
|
49
|
+
z-index: 9999;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
opacity: 0.02;
|
|
52
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
|
53
|
+
background-size: 256px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
|
|
57
|
+
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
|
|
58
|
+
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
|
|
59
|
+
|
|
60
|
+
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
|
|
61
|
+
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; letter-spacing: -0.035em; }
|
|
62
|
+
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
|
|
63
|
+
|
|
64
|
+
.eyebrow {
|
|
65
|
+
font-family: var(--font-mono);
|
|
66
|
+
font-size: 0.75rem;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
letter-spacing: 0.14em;
|
|
70
|
+
color: var(--accent);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.lede { font-size: 1.0625rem; line-height: 1.7; color: var(--text-secondary); max-width: 540px; }
|
|
74
|
+
|
|
75
|
+
.hero-actions {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
gap: 10px;
|
|
79
|
+
margin-top: 28px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.hero-actions a,
|
|
83
|
+
.subtle-button,
|
|
84
|
+
.ghost-button {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding: 11px 22px;
|
|
89
|
+
font-family: var(--font-display);
|
|
90
|
+
font-weight: 600;
|
|
91
|
+
font-size: 0.875rem;
|
|
92
|
+
color: var(--text-secondary);
|
|
93
|
+
border: 1px solid var(--border);
|
|
94
|
+
border-radius: 999px;
|
|
95
|
+
background: var(--bg-raised);
|
|
96
|
+
text-decoration: none;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
appearance: none;
|
|
99
|
+
transition: all 0.2s var(--ease);
|
|
100
|
+
}
|
|
101
|
+
.hero-actions a:hover, .subtle-button:hover, .ghost-button:hover {
|
|
102
|
+
color: var(--text);
|
|
103
|
+
border-color: var(--border-hover);
|
|
104
|
+
background: var(--bg-overlay);
|
|
105
|
+
}
|
|
106
|
+
.hero-actions a:first-child {
|
|
107
|
+
color: var(--text-inverse);
|
|
108
|
+
background: var(--accent);
|
|
109
|
+
border-color: var(--accent);
|
|
110
|
+
}
|
|
111
|
+
.hero-actions a:first-child:hover { background: var(--accent-hover); box-shadow: var(--glow); }
|
|
112
|
+
|
|
113
|
+
/* ── Blank header ──────────────────────────────────────────────── */
|
|
114
|
+
|
|
115
|
+
.blank-header {
|
|
116
|
+
position: fixed;
|
|
117
|
+
top: 0;
|
|
118
|
+
left: 0;
|
|
119
|
+
right: 0;
|
|
120
|
+
z-index: 100;
|
|
121
|
+
padding: 14px 28px;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: space-between;
|
|
125
|
+
background: rgba(9, 9, 11, 0.6);
|
|
126
|
+
backdrop-filter: blur(20px) saturate(180%);
|
|
127
|
+
border-bottom: 1px solid var(--border);
|
|
128
|
+
animation: fade-down 0.5s var(--ease);
|
|
129
|
+
}
|
|
130
|
+
.blank-logo {
|
|
131
|
+
font-family: var(--font-display);
|
|
132
|
+
font-weight: 900;
|
|
133
|
+
font-size: 1.0625rem;
|
|
134
|
+
letter-spacing: -0.03em;
|
|
135
|
+
}
|
|
136
|
+
.blank-nav { display: flex; align-items: center; gap: 6px; }
|
|
137
|
+
.blank-nav a {
|
|
138
|
+
padding: 8px 16px;
|
|
139
|
+
font-size: 0.8125rem;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
color: var(--text-secondary);
|
|
142
|
+
border-radius: 999px;
|
|
143
|
+
transition: all 0.15s ease;
|
|
144
|
+
}
|
|
145
|
+
.blank-nav a:hover { color: var(--text); }
|
|
146
|
+
.blank-nav-cta { background: var(--accent); color: var(--text-inverse) !important; font-weight: 600; }
|
|
147
|
+
.blank-nav-cta:hover { background: var(--accent-hover); }
|
|
148
|
+
|
|
149
|
+
/* ── Auth form (Fennec-style) ──────────────────────────────────── */
|
|
150
|
+
|
|
151
|
+
.auth-container {
|
|
152
|
+
display: grid;
|
|
153
|
+
min-height: 100dvh;
|
|
154
|
+
place-items: center;
|
|
155
|
+
padding: 32px;
|
|
156
|
+
position: relative;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
}
|
|
159
|
+
.auth-container::before, .auth-container::after {
|
|
160
|
+
content: "";
|
|
161
|
+
position: absolute;
|
|
162
|
+
border-radius: 50%;
|
|
163
|
+
filter: blur(120px);
|
|
164
|
+
opacity: 0.3;
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
}
|
|
167
|
+
.auth-container::before { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-glow), transparent 70%); top: -180px; right: -80px; }
|
|
168
|
+
.auth-container::after { width: 400px; height: 400px; background: radial-gradient(circle, rgba(91, 141, 239, 0.15), transparent 70%); bottom: -100px; left: -120px; }
|
|
169
|
+
|
|
170
|
+
.auth-card {
|
|
171
|
+
width: min(100%, 440px);
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
gap: 24px;
|
|
175
|
+
position: relative;
|
|
176
|
+
z-index: 1;
|
|
177
|
+
animation: fade-up 0.5s var(--ease);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.auth-brand {
|
|
181
|
+
font-family: var(--font-display);
|
|
182
|
+
font-weight: 900;
|
|
183
|
+
font-size: 1.125rem;
|
|
184
|
+
letter-spacing: -0.03em;
|
|
185
|
+
color: var(--accent);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.auth-header h1 {
|
|
189
|
+
font-size: 1.75rem;
|
|
190
|
+
margin-bottom: 6px;
|
|
191
|
+
}
|
|
192
|
+
.auth-header p {
|
|
193
|
+
color: var(--text-secondary);
|
|
194
|
+
font-size: 0.9375rem;
|
|
195
|
+
margin: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.auth-social-row {
|
|
199
|
+
display: grid;
|
|
200
|
+
grid-template-columns: 1fr 1fr;
|
|
201
|
+
gap: 10px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.auth-social-btn {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
gap: 8px;
|
|
209
|
+
padding: 12px 16px;
|
|
210
|
+
border: 1px solid var(--border);
|
|
211
|
+
border-radius: var(--radius);
|
|
212
|
+
color: var(--text);
|
|
213
|
+
background: var(--bg-raised);
|
|
214
|
+
font-size: 0.875rem;
|
|
215
|
+
font-weight: 500;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
transition: all 0.15s ease;
|
|
218
|
+
appearance: none;
|
|
219
|
+
}
|
|
220
|
+
.auth-social-btn:hover { border-color: var(--border-hover); background: var(--bg-overlay); }
|
|
221
|
+
.auth-social-btn svg { width: 18px; height: 18px; }
|
|
222
|
+
|
|
223
|
+
.auth-divider {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: 12px;
|
|
227
|
+
color: var(--text-muted);
|
|
228
|
+
font-size: 0.8125rem;
|
|
229
|
+
text-transform: lowercase;
|
|
230
|
+
}
|
|
231
|
+
.auth-divider::before,
|
|
232
|
+
.auth-divider::after {
|
|
233
|
+
content: "";
|
|
234
|
+
flex: 1;
|
|
235
|
+
height: 1px;
|
|
236
|
+
background: var(--border);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.auth-tabs {
|
|
240
|
+
display: grid;
|
|
241
|
+
grid-template-columns: 1fr 1fr;
|
|
242
|
+
border: 1px solid var(--border);
|
|
243
|
+
border-radius: var(--radius);
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
background: var(--bg);
|
|
246
|
+
}
|
|
247
|
+
.auth-tab {
|
|
248
|
+
padding: 10px 16px;
|
|
249
|
+
font-family: var(--font-mono);
|
|
250
|
+
font-size: 0.8125rem;
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
letter-spacing: 0.02em;
|
|
253
|
+
text-align: center;
|
|
254
|
+
color: var(--text-muted);
|
|
255
|
+
transition: all 0.15s ease;
|
|
256
|
+
}
|
|
257
|
+
.auth-tab:hover { color: var(--text-secondary); }
|
|
258
|
+
.auth-tab.active {
|
|
259
|
+
color: var(--text);
|
|
260
|
+
background: var(--bg-raised);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.auth-form { display: flex; flex-direction: column; gap: 16px; }
|
|
264
|
+
|
|
265
|
+
.auth-field { display: flex; flex-direction: column; gap: 6px; }
|
|
266
|
+
.auth-label {
|
|
267
|
+
font-family: var(--font-mono);
|
|
268
|
+
font-size: 0.6875rem;
|
|
269
|
+
font-weight: 600;
|
|
270
|
+
letter-spacing: 0.12em;
|
|
271
|
+
color: var(--text-muted);
|
|
272
|
+
}
|
|
273
|
+
.auth-input-wrap {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: 10px;
|
|
277
|
+
padding: 0 14px;
|
|
278
|
+
border: 1px solid var(--border);
|
|
279
|
+
border-radius: var(--radius);
|
|
280
|
+
background: var(--bg);
|
|
281
|
+
transition: all 0.2s ease;
|
|
282
|
+
}
|
|
283
|
+
.auth-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
|
|
284
|
+
.auth-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
|
|
285
|
+
.auth-input-wrap input {
|
|
286
|
+
flex: 1;
|
|
287
|
+
padding: 12px 0;
|
|
288
|
+
border: none;
|
|
289
|
+
background: none;
|
|
290
|
+
color: var(--text);
|
|
291
|
+
font-size: 0.9375rem;
|
|
292
|
+
outline: none;
|
|
293
|
+
}
|
|
294
|
+
.auth-input-wrap input::placeholder { color: var(--text-muted); }
|
|
295
|
+
.auth-toggle-pw {
|
|
296
|
+
display: flex;
|
|
297
|
+
align-items: center;
|
|
298
|
+
padding: 4px;
|
|
299
|
+
color: var(--text-muted);
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
transition: color 0.15s ease;
|
|
302
|
+
}
|
|
303
|
+
.auth-toggle-pw:hover { color: var(--text-secondary); }
|
|
304
|
+
.auth-toggle-pw svg { width: 18px; height: 18px; }
|
|
305
|
+
|
|
306
|
+
.auth-submit {
|
|
307
|
+
display: inline-flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
gap: 6px;
|
|
311
|
+
width: 100%;
|
|
312
|
+
padding: 14px 24px;
|
|
313
|
+
margin-top: 4px;
|
|
314
|
+
font-family: var(--font-display);
|
|
315
|
+
font-weight: 700;
|
|
316
|
+
font-size: 0.9375rem;
|
|
317
|
+
color: var(--text-inverse);
|
|
318
|
+
background: var(--accent);
|
|
319
|
+
border: 1px solid var(--accent);
|
|
320
|
+
border-radius: var(--radius);
|
|
321
|
+
appearance: none;
|
|
322
|
+
cursor: pointer;
|
|
323
|
+
transition: all 0.2s var(--ease);
|
|
324
|
+
position: relative;
|
|
325
|
+
overflow: hidden;
|
|
326
|
+
}
|
|
327
|
+
.auth-submit::before {
|
|
328
|
+
content: "";
|
|
329
|
+
position: absolute;
|
|
330
|
+
inset: 0;
|
|
331
|
+
background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
|
|
332
|
+
background-size: 200% 200%;
|
|
333
|
+
animation: shimmer 3s ease-in-out infinite;
|
|
334
|
+
}
|
|
335
|
+
.auth-submit:hover { background: var(--accent-hover); box-shadow: var(--glow); }
|
|
336
|
+
.auth-submit:disabled { opacity: 0.5; pointer-events: none; }
|
|
337
|
+
.auth-submit-arrow { font-size: 1.125rem; }
|
|
338
|
+
|
|
339
|
+
.auth-footer {
|
|
340
|
+
text-align: center;
|
|
341
|
+
font-family: var(--font-mono);
|
|
342
|
+
font-size: 0.75rem;
|
|
343
|
+
letter-spacing: 0.06em;
|
|
344
|
+
color: var(--text-muted);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* ── Legacy compat (billing/email pages still use these) ──────── */
|
|
348
|
+
|
|
349
|
+
.auth-button {
|
|
350
|
+
display: inline-flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
width: 100%;
|
|
354
|
+
padding: 13px 24px;
|
|
355
|
+
margin-top: 20px;
|
|
356
|
+
font-family: var(--font-display);
|
|
357
|
+
font-weight: 600;
|
|
358
|
+
font-size: 0.9375rem;
|
|
359
|
+
color: var(--text-inverse);
|
|
360
|
+
background: var(--accent);
|
|
361
|
+
border: 1px solid var(--accent);
|
|
362
|
+
border-radius: var(--radius);
|
|
363
|
+
appearance: none;
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
transition: all 0.2s var(--ease);
|
|
366
|
+
position: relative;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
}
|
|
369
|
+
.auth-button::before {
|
|
370
|
+
content: "";
|
|
371
|
+
position: absolute;
|
|
372
|
+
inset: 0;
|
|
373
|
+
background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
|
|
374
|
+
background-size: 200% 200%;
|
|
375
|
+
animation: shimmer 3s ease-in-out infinite;
|
|
376
|
+
}
|
|
377
|
+
.auth-button:hover { background: var(--accent-hover); box-shadow: var(--glow); }
|
|
378
|
+
.auth-button:disabled { opacity: 0.5; pointer-events: none; }
|
|
379
|
+
|
|
380
|
+
.auth-switch { margin: 0; color: var(--text-secondary); font-size: 0.875rem; }
|
|
381
|
+
.auth-switch a { color: var(--accent); font-weight: 500; }
|
|
382
|
+
.auth-switch a:hover { color: var(--accent-hover); }
|
|
383
|
+
|
|
384
|
+
.shell {
|
|
385
|
+
display: grid;
|
|
386
|
+
min-height: 100dvh;
|
|
387
|
+
place-items: center;
|
|
388
|
+
padding: 32px;
|
|
389
|
+
position: relative;
|
|
390
|
+
overflow: hidden;
|
|
391
|
+
}
|
|
392
|
+
.shell::before, .shell::after {
|
|
393
|
+
content: "";
|
|
394
|
+
position: absolute;
|
|
395
|
+
border-radius: 50%;
|
|
396
|
+
filter: blur(120px);
|
|
397
|
+
opacity: 0.35;
|
|
398
|
+
pointer-events: none;
|
|
399
|
+
}
|
|
400
|
+
.shell::before { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-glow), transparent 70%); top: -180px; right: -80px; }
|
|
401
|
+
.shell::after { width: 400px; height: 400px; background: radial-gradient(circle, rgba(91, 141, 239, 0.15), transparent 70%); bottom: -100px; left: -120px; }
|
|
402
|
+
|
|
403
|
+
.hero {
|
|
404
|
+
width: min(100%, 640px);
|
|
405
|
+
padding: 40px;
|
|
406
|
+
border: 1px solid var(--border);
|
|
407
|
+
border-radius: 24px;
|
|
408
|
+
background: var(--bg-raised);
|
|
409
|
+
position: relative;
|
|
410
|
+
z-index: 1;
|
|
411
|
+
animation: fade-up 0.5s var(--ease);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.field { display: flex; flex-direction: column; gap: 6px; }
|
|
415
|
+
.field span { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
|
|
416
|
+
.field input {
|
|
417
|
+
width: 100%;
|
|
418
|
+
padding: 11px 16px;
|
|
419
|
+
border: 1px solid var(--border);
|
|
420
|
+
border-radius: var(--radius);
|
|
421
|
+
background: var(--bg);
|
|
422
|
+
color: var(--text);
|
|
423
|
+
font-size: 0.9375rem;
|
|
424
|
+
outline: none;
|
|
425
|
+
transition: all 0.2s ease;
|
|
426
|
+
}
|
|
427
|
+
.field input::placeholder { color: var(--text-muted); }
|
|
428
|
+
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
|
|
429
|
+
|
|
430
|
+
.form-error {
|
|
431
|
+
padding: 12px 16px;
|
|
432
|
+
background: var(--danger-dim);
|
|
433
|
+
border: 1px solid rgba(240, 78, 78, 0.2);
|
|
434
|
+
border-radius: var(--radius);
|
|
435
|
+
color: var(--danger);
|
|
436
|
+
font-size: 0.875rem;
|
|
437
|
+
}
|
|
438
|
+
.form-success {
|
|
439
|
+
padding: 12px 16px;
|
|
440
|
+
background: var(--success-dim);
|
|
441
|
+
border: 1px solid rgba(52, 199, 89, 0.2);
|
|
442
|
+
border-radius: var(--radius);
|
|
443
|
+
color: var(--success);
|
|
444
|
+
font-size: 0.875rem;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.demo-banner {
|
|
448
|
+
padding: 14px 16px;
|
|
449
|
+
border: 1px solid rgba(245, 166, 35, 0.15);
|
|
450
|
+
border-radius: var(--radius);
|
|
451
|
+
background: var(--warn-dim);
|
|
452
|
+
color: var(--warn);
|
|
453
|
+
font-size: 0.875rem;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.billing-grid {
|
|
457
|
+
display: grid;
|
|
458
|
+
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
459
|
+
gap: 14px;
|
|
460
|
+
margin-top: 24px;
|
|
461
|
+
}
|
|
462
|
+
.billing-card {
|
|
463
|
+
display: flex;
|
|
464
|
+
flex-direction: column;
|
|
465
|
+
gap: 12px;
|
|
466
|
+
padding: 24px;
|
|
467
|
+
border: 1px solid var(--border);
|
|
468
|
+
border-radius: 18px;
|
|
469
|
+
background: var(--bg-raised);
|
|
470
|
+
transition: all 0.25s var(--ease);
|
|
471
|
+
}
|
|
472
|
+
.billing-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
|
|
473
|
+
.billing-card h2, .billing-card p { margin: 0; }
|
|
474
|
+
.billing-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }
|
|
475
|
+
.billing-caption { color: var(--text-muted); font-size: 0.85rem; }
|
|
476
|
+
|
|
477
|
+
/* ── Pricing section ───────────────────────────────────────────── */
|
|
478
|
+
|
|
479
|
+
.pricing-section { max-width: 1060px; margin: 0 auto; padding: 80px 28px; }
|
|
480
|
+
.pricing-section > .eyebrow { text-align: center; margin-bottom: 10px; }
|
|
481
|
+
.pricing-section > h2 { text-align: center; margin-bottom: 12px; }
|
|
482
|
+
.pricing-section > .lede { text-align: center; margin: 0 auto 48px; }
|
|
483
|
+
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
|
|
484
|
+
|
|
485
|
+
.pricing-card {
|
|
486
|
+
display: flex;
|
|
487
|
+
flex-direction: column;
|
|
488
|
+
gap: 20px;
|
|
489
|
+
padding: 32px;
|
|
490
|
+
border: 1px solid var(--border);
|
|
491
|
+
border-radius: 20px;
|
|
492
|
+
background: var(--bg-raised);
|
|
493
|
+
transition: all 0.25s var(--ease);
|
|
494
|
+
}
|
|
495
|
+
.pricing-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
|
|
496
|
+
.pricing-card.featured {
|
|
497
|
+
border-color: var(--accent);
|
|
498
|
+
background: linear-gradient(to bottom, var(--bg-raised), var(--accent-dim));
|
|
499
|
+
box-shadow: 0 0 60px var(--accent-dim);
|
|
500
|
+
}
|
|
501
|
+
.pricing-card .plan-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; margin: 0; }
|
|
502
|
+
.pricing-card .plan-price { display: flex; align-items: baseline; gap: 4px; }
|
|
503
|
+
.pricing-card .plan-price strong { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; letter-spacing: -0.03em; }
|
|
504
|
+
.pricing-card .plan-price span { color: var(--text-muted); font-size: 0.875rem; }
|
|
505
|
+
.pricing-card .plan-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5; margin: 0; }
|
|
506
|
+
.pricing-features { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; flex: 1; }
|
|
507
|
+
.pricing-features li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-secondary); font-size: 0.8125rem; line-height: 1.5; }
|
|
508
|
+
.pricing-features li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; }
|
|
509
|
+
.pricing-cta {
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
justify-content: center;
|
|
513
|
+
padding: 12px 20px;
|
|
514
|
+
font-family: var(--font-display);
|
|
515
|
+
font-weight: 600;
|
|
516
|
+
font-size: 0.875rem;
|
|
517
|
+
color: var(--text-secondary);
|
|
518
|
+
border: 1px solid var(--border);
|
|
519
|
+
border-radius: var(--radius);
|
|
520
|
+
background: var(--bg);
|
|
521
|
+
cursor: pointer;
|
|
522
|
+
transition: all 0.2s var(--ease);
|
|
523
|
+
text-decoration: none;
|
|
524
|
+
}
|
|
525
|
+
.pricing-cta:hover { color: var(--text); border-color: var(--border-hover); }
|
|
526
|
+
.pricing-card.featured .pricing-cta { color: var(--text-inverse); background: var(--accent); border-color: var(--accent); }
|
|
527
|
+
.pricing-card.featured .pricing-cta:hover { background: var(--accent-hover); box-shadow: var(--glow); }
|
|
528
|
+
|
|
529
|
+
@media (max-width: 640px) {
|
|
530
|
+
.shell { padding: 20px; }
|
|
531
|
+
.hero { padding: 28px; }
|
|
532
|
+
.auth-container { padding: 20px; }
|
|
533
|
+
.pricing-grid { grid-template-columns: 1fr; }
|
|
534
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
|
|
4
|
+
export const metadata: Metadata = {
|
|
5
|
+
title: "__PROJECT_NAME__",
|
|
6
|
+
description: "Generated by Skit"
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function RootLayout({
|
|
10
|
+
children
|
|
11
|
+
}: Readonly<{
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}>) {
|
|
14
|
+
return (
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<body>{children}</body>
|
|
17
|
+
</html>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export function GET() {
|
|
2
|
+
const content = `# __PROJECT_NAME__ — Full Project Context
|
|
3
|
+
|
|
4
|
+
> Built with Skit — opinionated Next.js 16 SaaS starter.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
- Framework: Next.js 16.2.x (App Router, React 19, TypeScript 5.9)
|
|
11
|
+
- Database: PostgreSQL + Drizzle ORM 0.44.x
|
|
12
|
+
- Auth: Better Auth 1.x (email/password__AUTH_LLMS_EXTRA__)
|
|
13
|
+
- Billing: __BILLING_LLMS_LINE__
|
|
14
|
+
- Email: __EMAIL_LLMS_LINE__
|
|
15
|
+
- Styling: Tailwind CSS 4
|
|
16
|
+
- Validation: Zod 4 + React Hook Form
|
|
17
|
+
- Testing: Vitest 3.2 (unit) + Playwright 1.55 (E2E)
|
|
18
|
+
- Quality: ESLint 9, Prettier, Husky + lint-staged
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Project Structure
|
|
23
|
+
|
|
24
|
+
\`\`\`
|
|
25
|
+
src/
|
|
26
|
+
├── app/
|
|
27
|
+
│ ├── page.tsx # Landing / marketing page
|
|
28
|
+
│ ├── dashboard/page.tsx # Protected dashboard
|
|
29
|
+
│ ├── settings/page.tsx # Account settings
|
|
30
|
+
│ ├── billing/page.tsx # Billing management
|
|
31
|
+
│ ├── email/page.tsx # Email demo
|
|
32
|
+
│ ├── sign-in/page.tsx # Sign in
|
|
33
|
+
│ ├── sign-up/page.tsx # Sign up
|
|
34
|
+
│ ├── api/
|
|
35
|
+
│ │ ├── auth/[...all]/route.ts # Auth API
|
|
36
|
+
│ │ ├── billing/checkout/route.ts # Checkout session
|
|
37
|
+
│ │ ├── billing/portal/route.ts # Customer portal
|
|
38
|
+
│ │ ├── webhooks/stripe/route.ts # Stripe webhooks
|
|
39
|
+
│ │ └── email/test/route.ts # Email test
|
|
40
|
+
│ ├── llms.txt/route.ts # LLM summary (this file)
|
|
41
|
+
│ └── llms-full.txt/route.ts
|
|
42
|
+
├── lib/
|
|
43
|
+
│ ├── auth.ts # Better Auth server config
|
|
44
|
+
│ ├── auth-client.ts # Client auth utilities
|
|
45
|
+
│ ├── auth-session.ts # Server session helper
|
|
46
|
+
│ ├── db.ts # Drizzle client
|
|
47
|
+
│ ├── billing.ts # Billing provider abstraction
|
|
48
|
+
│ ├── email.ts # Email client
|
|
49
|
+
│ └── env.ts # Environment validation (Zod)
|
|
50
|
+
├── db/
|
|
51
|
+
│ ├── schema.ts # Drizzle table definitions
|
|
52
|
+
│ └── seed.ts # Demo data seeder
|
|
53
|
+
└── middleware.ts # Route protection
|
|
54
|
+
\`\`\`
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Authentication
|
|
59
|
+
|
|
60
|
+
Uses Better Auth. Sessions stored in the database.
|
|
61
|
+
|
|
62
|
+
Server-side session access:
|
|
63
|
+
\`\`\`ts
|
|
64
|
+
import { getSession } from "@/lib/auth-session";
|
|
65
|
+
const session = await getSession();
|
|
66
|
+
if (!session) redirect("/sign-in");
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
Client-side session access:
|
|
70
|
+
\`\`\`ts
|
|
71
|
+
import { useSession } from "@/lib/auth-client";
|
|
72
|
+
const { data: session } = useSession();
|
|
73
|
+
\`\`\`
|
|
74
|
+
|
|
75
|
+
Protected routes defined in src/middleware.ts:
|
|
76
|
+
- /dashboard, /settings, /billing — redirect to /sign-in if unauthenticated
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Database
|
|
81
|
+
|
|
82
|
+
Drizzle ORM with PostgreSQL. Schema in src/db/schema.ts.
|
|
83
|
+
|
|
84
|
+
Commands:
|
|
85
|
+
- pnpm db:push — push schema to database
|
|
86
|
+
- pnpm db:migrate — run migrations
|
|
87
|
+
- pnpm db:seed — seed demo data
|
|
88
|
+
- pnpm db:studio — open Drizzle Studio
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Billing
|
|
93
|
+
|
|
94
|
+
Provider abstraction interface:
|
|
95
|
+
- createCheckoutSession() — create a payment session
|
|
96
|
+
- createCustomerPortalSession() — customer self-service portal
|
|
97
|
+
- handleWebhook() — process billing events
|
|
98
|
+
|
|
99
|
+
Configured via BILLING_PROVIDER env var.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Email
|
|
104
|
+
|
|
105
|
+
Resend integration. Usage:
|
|
106
|
+
\`\`\`ts
|
|
107
|
+
import { sendEmail } from "@/lib/email";
|
|
108
|
+
await sendEmail({ to: "user@example.com", subject: "Welcome!", html: "<p>Hello</p>" });
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Environment Variables
|
|
114
|
+
|
|
115
|
+
All validated via src/lib/env.ts. Never use process.env directly.
|
|
116
|
+
|
|
117
|
+
Required: DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL
|
|
118
|
+
Billing: STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_PRICE_ID, STRIPE_WEBHOOK_SECRET
|
|
119
|
+
Email: RESEND_API_KEY, EMAIL_FROM
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Conventions
|
|
124
|
+
|
|
125
|
+
- Server components by default; add "use client" only when needed
|
|
126
|
+
- All env access through src/lib/env.ts
|
|
127
|
+
- Database queries in server components or server actions
|
|
128
|
+
- Auth checks: middleware for routes, getSession() for pages/API
|
|
129
|
+
- File naming: kebab-case for files, PascalCase for components
|
|
130
|
+
- Imports: use @/ path alias
|
|
131
|
+
- No barrel exports (index.ts re-exports)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Testing
|
|
136
|
+
|
|
137
|
+
Unit tests: src/**/*.test.ts (Vitest)
|
|
138
|
+
E2E tests: tests/**/*.spec.ts (Playwright)
|
|
139
|
+
|
|
140
|
+
Commands:
|
|
141
|
+
- pnpm test — run unit tests
|
|
142
|
+
- pnpm test:e2e — run E2E tests
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## AI Agent Configuration
|
|
147
|
+
|
|
148
|
+
- AGENTS.md — primary rules for all agents
|
|
149
|
+
- CLAUDE.md — Claude Code specific workflow
|
|
150
|
+
- .cursor/rules/*.mdc — Cursor auto-activated rules
|
|
151
|
+
- .gemini/GEMINI.md — Gemini Code Assist
|
|
152
|
+
- ARCHITECTURE.md — project architecture and extension points
|
|
153
|
+
`;
|
|
154
|
+
|
|
155
|
+
return new Response(content, {
|
|
156
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" },
|
|
157
|
+
});
|
|
158
|
+
}
|