@donotdev/cli 0.0.13 → 0.0.15
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/dependencies-matrix.json +357 -89
- package/dist/bin/commands/agent-setup.d.ts +6 -0
- package/dist/bin/commands/agent-setup.d.ts.map +1 -0
- package/dist/bin/commands/agent-setup.js +629 -0
- package/dist/bin/commands/agent-setup.js.map +1 -0
- package/dist/bin/commands/build.js +131 -50
- package/dist/bin/commands/bump.js +137 -49
- package/dist/bin/commands/cacheout.js +50 -21
- package/dist/bin/commands/create-app.js +270 -261
- package/dist/bin/commands/create-project.js +418 -197
- package/dist/bin/commands/deploy.js +1752 -712
- package/dist/bin/commands/dev.js +151 -35
- package/dist/bin/commands/emu.js +228 -70
- package/dist/bin/commands/format.js +50 -21
- package/dist/bin/commands/lint.js +50 -21
- package/dist/bin/commands/preview.js +155 -35
- package/dist/bin/commands/supabase-setup.d.ts +6 -0
- package/dist/bin/commands/supabase-setup.d.ts.map +1 -0
- package/dist/bin/commands/supabase-setup.js +7 -0
- package/dist/bin/commands/supabase-setup.js.map +1 -0
- package/dist/bin/commands/sync-secrets.js +224 -46
- package/dist/bin/commands/type-check.d.ts +14 -0
- package/dist/bin/commands/type-check.d.ts.map +1 -0
- package/dist/bin/commands/type-check.js +314 -0
- package/dist/bin/commands/type-check.js.map +1 -0
- package/dist/bin/commands/wai.js +7399 -11
- package/dist/bin/dndev.js +27 -2
- package/dist/bin/donotdev.js +27 -2
- package/dist/index.js +3960 -2996
- package/package.json +2 -2
- package/templates/app-demo/src/App.tsx.example +1 -0
- package/templates/app-demo/src/pages/FullPage.tsx.example +2 -2
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +2 -2
- package/templates/app-demo/src/themes.css.example +5 -12
- package/templates/app-expo/.env.example +64 -0
- package/templates/app-expo/.expo/README.md.example +5 -0
- package/templates/app-expo/.gitignore.example +36 -0
- package/templates/app-expo/README.md.example +58 -0
- package/templates/app-expo/app/.gitkeep +2 -0
- package/templates/app-expo/app/_layout.tsx.example +41 -0
- package/templates/app-expo/app/form.tsx.example +52 -0
- package/templates/app-expo/app/index.tsx.example +89 -0
- package/templates/app-expo/app/list.tsx.example +32 -0
- package/templates/app-expo/app/profile.tsx.example +76 -0
- package/templates/app-expo/app/signin.tsx.example +53 -0
- package/templates/app-expo/app.json.example +39 -0
- package/templates/app-expo/babel.config.js.example +10 -0
- package/templates/app-expo/eas.json.example +20 -0
- package/templates/app-expo/expo-env.d.ts.example +4 -0
- package/templates/app-expo/metro.config.js.example +20 -0
- package/templates/app-expo/service-account-key.json.example +12 -0
- package/templates/app-expo/tsconfig.json.example +19 -0
- package/templates/app-next/.env.example +4 -33
- package/templates/app-next/src/app/ClientLayout.tsx.example +2 -0
- package/templates/app-next/src/app/layout.tsx.example +7 -6
- package/templates/app-next/src/globals.css.example +2 -11
- package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-next/src/themes.css.example +10 -13
- package/templates/app-vite/.env.example +3 -32
- package/templates/app-vite/index.html.example +2 -24
- package/templates/app-vite/src/App.tsx.example +2 -0
- package/templates/app-vite/src/globals.css.example +2 -12
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -2
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/themes.css.example +109 -79
- package/templates/app-vite/vercel.json.example +11 -0
- package/templates/functions-firebase/build.mjs.example +2 -72
- package/templates/functions-firebase/functions-firebase/.env.example.example +23 -25
- package/templates/functions-firebase/functions-firebase/build.mjs.example +2 -72
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +1 -1
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +11 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +11 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +16 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +24 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +22 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +28 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +28 -0
- package/templates/functions-vercel/functions-vercel/tsconfig.json.example +1 -1
- package/templates/functions-vercel/functions-vercel/vercel.json.example +1 -1
- package/templates/functions-vercel/vercel.json.example +1 -1
- package/templates/github/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/overlay-firebase/env.fragment.example +34 -0
- package/templates/overlay-firebase/env.fragment.expo.example +34 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +34 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +49 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +23 -0
- package/templates/overlay-supabase/env.fragment.example +7 -0
- package/templates/overlay-supabase/env.fragment.expo.example +7 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +7 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +35 -0
- package/templates/overlay-supabase/src/config/providers.ts.example +33 -0
- package/templates/overlay-supabase/vercel.headers.example +23 -0
- package/templates/overlay-supabase/vercel.json.example +22 -0
- package/templates/overlay-vercel/env.fragment.example +34 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +34 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +24 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +2 -310
- package/templates/root-consumer/.claude/agents/builder.md.example +2 -326
- package/templates/root-consumer/.claude/agents/coder.md.example +2 -83
- package/templates/root-consumer/.claude/agents/extractor.md.example +2 -231
- package/templates/root-consumer/.claude/agents/polisher.md.example +2 -132
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +2 -81
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +1 -1
- package/templates/root-consumer/.claude/commands/build.md.example +1 -1
- package/templates/root-consumer/.claude/commands/design.md.example +1 -1
- package/templates/root-consumer/.claude/commands/grill.md.example +30 -0
- package/templates/root-consumer/.claude/commands/polish.md.example +1 -1
- package/templates/root-consumer/.claude/commands/techdebt.md.example +28 -0
- package/templates/root-consumer/.clinerules.example +1 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +15 -0
- package/templates/root-consumer/.cursorrules.example +1 -0
- package/templates/root-consumer/.dndev/args.json.example +6 -0
- package/templates/root-consumer/.gemini/settings.json.example +2 -2
- package/templates/root-consumer/.github/copilot-instructions.md.example +1 -0
- package/templates/root-consumer/.windsurfrules.example +1 -0
- package/templates/root-consumer/AI.md.example +25 -108
- package/templates/root-consumer/CLAUDE.md.example +1 -128
- package/templates/root-consumer/CONVENTIONS.md.example +1 -0
- package/templates/root-consumer/GEMINI.md.example +1 -0
- package/templates/root-consumer/firebase.json.example +1 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +54 -0
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -18
- package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +1 -1
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +99 -30
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +186 -0
- package/templates/root-consumer/guides/dndev/INDEX.md.example +4 -1
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +143 -12
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +9 -3
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +12 -7
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +234 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +124 -0
- package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +6 -2
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +176 -0
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +5 -9
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +174 -0
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +10 -0
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +25 -5
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +13 -2
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +2 -2
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +47 -11
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +15 -4
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +7 -6
- package/templates/app-payload/.env.example +0 -28
- package/templates/app-payload/README.md.example +0 -233
- package/templates/app-payload/collections/Company.ts.example +0 -125
- package/templates/app-payload/collections/Hero.ts.example +0 -62
- package/templates/app-payload/collections/Media.ts.example +0 -41
- package/templates/app-payload/collections/Products.ts.example +0 -115
- package/templates/app-payload/collections/Services.ts.example +0 -104
- package/templates/app-payload/collections/Testimonials.ts.example +0 -92
- package/templates/app-payload/collections/Users.ts.example +0 -35
- package/templates/app-payload/src/server.ts.example +0 -79
- package/templates/app-payload/tsconfig.json.example +0 -24
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Learn more https://docs.expo.dev/guides/customizing-metro
|
|
2
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const projectRoot = __dirname;
|
|
6
|
+
const workspaceRoot = path.resolve(projectRoot, '../..');
|
|
7
|
+
|
|
8
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
9
|
+
const config = getDefaultConfig(projectRoot);
|
|
10
|
+
|
|
11
|
+
// Watch workspace packages (not the entire root — avoids churning on unrelated changes)
|
|
12
|
+
config.watchFolders = [path.resolve(workspaceRoot, 'packages')];
|
|
13
|
+
|
|
14
|
+
// Let Metro resolve from both the app's own node_modules and the workspace root
|
|
15
|
+
config.resolver.nodeModulesDirs = [
|
|
16
|
+
path.resolve(projectRoot, 'node_modules'),
|
|
17
|
+
path.resolve(workspaceRoot, 'node_modules'),
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
module.exports = config;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "service_account",
|
|
3
|
+
"project_id": "{{YOUR_FIREBASE_PROJECT_ID}}",
|
|
4
|
+
"private_key_id": "your_private_key_id",
|
|
5
|
+
"private_key": "-----BEGIN PRIVATE KEY-----\nYour private key here\n-----END PRIVATE KEY-----\n",
|
|
6
|
+
"client_email": "firebase-adminsdk-xxxxx@{{YOUR_FIREBASE_PROJECT_ID}}.iam.gserviceaccount.com",
|
|
7
|
+
"client_id": "your_client_id",
|
|
8
|
+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
9
|
+
"token_uri": "https://oauth2.googleapis.com/token",
|
|
10
|
+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
|
11
|
+
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-xxxxx%40{{YOUR_FIREBASE_PROJECT_ID}}.iam.gserviceaccount.com"
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"strict": true,
|
|
5
|
+
"baseUrl": ".",
|
|
6
|
+
"paths": {
|
|
7
|
+
"@/*": ["./*"]
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"**/*.ts",
|
|
12
|
+
"**/*.tsx",
|
|
13
|
+
".expo/types/**/*.ts",
|
|
14
|
+
"expo-env.d.ts"
|
|
15
|
+
],
|
|
16
|
+
"exclude": [
|
|
17
|
+
"node_modules"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -36,7 +36,7 @@ NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
|
36
36
|
# =============================================================================
|
|
37
37
|
# Comma-separated list of enabled auth providers
|
|
38
38
|
# Available: github (required for framework), google, facebook, discord, twitter, microsoft, spotify, linkedin, reddit, twitch, yahoo, apple
|
|
39
|
-
# Uncomment when
|
|
39
|
+
# Uncomment when your backend is configured
|
|
40
40
|
# NEXT_PUBLIC_AUTH_PARTNERS=google,github
|
|
41
41
|
|
|
42
42
|
# Comma-separated list of enabled OAuth partners for API access
|
|
@@ -49,38 +49,9 @@ NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
|
49
49
|
# NEXT_PUBLIC_SPOTIFY_CLIENT_ID=your_spotify_client_id
|
|
50
50
|
|
|
51
51
|
# =============================================================================
|
|
52
|
-
#
|
|
52
|
+
# Backend-specific vars are appended below by your backend choice
|
|
53
|
+
# (Firebase, Supabase, etc.) — see overlay templates
|
|
53
54
|
# =============================================================================
|
|
54
|
-
# Get these values from your Firebase project settings
|
|
55
|
-
# Run `dndev firebase:setup` to auto-populate, or copy from Firebase Console
|
|
56
|
-
NEXT_PUBLIC_FIREBASE_API_KEY=
|
|
57
|
-
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
|
|
58
|
-
# Copy from Firebase Console. Framework uses APP_URL hostname in production automatically.
|
|
59
|
-
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
|
|
60
|
-
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
|
|
61
|
-
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
|
|
62
|
-
NEXT_PUBLIC_FIREBASE_APP_ID=
|
|
63
|
-
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=
|
|
64
|
-
NEXT_PUBLIC_FIREBASE_FUNCTIONS_REGION=
|
|
65
|
-
|
|
66
|
-
# =============================================================================
|
|
67
|
-
# Firebase Emulator (Development only)
|
|
68
|
-
# =============================================================================
|
|
69
|
-
# Set to true to use Firebase emulators instead of production services
|
|
70
|
-
NEXT_PUBLIC_USE_FIREBASE_EMULATOR=false
|
|
71
|
-
NEXT_PUBLIC_FIREBASE_EMULATOR_HOST=localhost
|
|
72
|
-
NEXT_PUBLIC_FIREBASE_EMULATOR_PORT=9099
|
|
73
|
-
NEXT_PUBLIC_FIREBASE_AUTH_EMULATOR_HOST=http://localhost:9099
|
|
74
|
-
NEXT_PUBLIC_FIREBASE_FIRESTORE_EMULATOR_HOST=localhost:8080
|
|
75
|
-
NEXT_PUBLIC_FIREBASE_FUNCTIONS_EMULATOR_PORT=5001
|
|
76
|
-
|
|
77
|
-
# =============================================================================
|
|
78
|
-
# Firebase App Check (Abuse Protection)
|
|
79
|
-
# =============================================================================
|
|
80
|
-
# reCAPTCHA v3 site key for App Check
|
|
81
|
-
# NEXT_PUBLIC_RECAPTCHA_SITE_KEY=6LcXXXX...
|
|
82
|
-
# Optional: Debug token for localhost testing
|
|
83
|
-
# NEXT_PUBLIC_APPCHECK_DEBUG_TOKEN=XXXX-XXXX-XXXX
|
|
84
55
|
|
|
85
56
|
# =============================================================================
|
|
86
57
|
# Stripe Configuration (if using billing)
|
|
@@ -91,4 +62,4 @@ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
|
|
|
91
62
|
# Sentry (optional - auto-enabled if SENTRY_DSN is set)
|
|
92
63
|
# =============================================================================
|
|
93
64
|
# Framework automatically initializes Sentry if this variable is set
|
|
94
|
-
NEXT_PUBLIC_SENTRY_DSN=
|
|
65
|
+
NEXT_PUBLIC_SENTRY_DSN=
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
|
+
|
|
3
|
+
import { FontPreloadLinks } from '@donotdev/ui/next';
|
|
4
|
+
|
|
2
5
|
import '../globals.css';
|
|
3
6
|
import { ClientLayout } from './ClientLayout';
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
|
-
* Framework fonts are loaded via CSS @font-face rules in dndev.css
|
|
7
|
-
*
|
|
8
|
-
* The framework CSS includes optimized @font-face declarations for Inter
|
|
9
|
-
* (default) and Roboto (optional) with proper unicode-range subsetting for performance.
|
|
10
|
-
* Fonts are copied from framework to public/fonts/ by AssetDiscovery during build.
|
|
9
|
+
* Framework fonts are loaded via CSS @font-face rules in dndev.css (bundled).
|
|
10
|
+
* Font preload links are injected at build time; FontPreloadLinks reads the manifest for SSR.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export const metadata: Metadata = {
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Root layout for Next.js App Router
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* Theme detection happens client-side via ClientLayout to avoid
|
|
22
22
|
* Next.js 16 + Turbopack race condition with async layouts.
|
|
23
23
|
* Brief FOUC possible on first load, but prevents build-manifest.json errors.
|
|
@@ -35,6 +35,7 @@ export default function RootLayout({
|
|
|
35
35
|
>
|
|
36
36
|
<head>
|
|
37
37
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
38
|
+
<FontPreloadLinks />
|
|
38
39
|
</head>
|
|
39
40
|
<body className="light">
|
|
40
41
|
<ClientLayout>{children}</ClientLayout>
|
|
@@ -4,15 +4,6 @@
|
|
|
4
4
|
@import './themes.css';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Font
|
|
8
|
-
*
|
|
9
|
-
* Framework defaults to Inter (defined in @donotdev/components/styles/variables.css).
|
|
10
|
-
* Fonts are loaded via CSS @font-face rules in @donotdev/ui/assets/fonts/fonts.css
|
|
11
|
-
* and copied to public/fonts/ by AssetDiscovery during build.
|
|
12
|
-
*
|
|
13
|
-
* To override, uncomment and customize:
|
|
14
|
-
* :root {
|
|
15
|
-
* --font-sans: 'YourFont', sans-serif;
|
|
16
|
-
* --font-family: var(--font-sans);
|
|
17
|
-
* }
|
|
7
|
+
* Font choices (--font-family, --font-sans, etc.) belong in themes.css.
|
|
8
|
+
* Fonts (Inter, Space Grotesk, Playfair, Roboto) are bundled via @donotdev/ui; no external fetch, no public/fonts required.
|
|
18
9
|
*/
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/themes.css — SSOT for essence and theme variables. Import in globals.css only.
|
|
3
|
+
* Default = SaaS (Inter). Optional .brutalist and .luxury do not apply until class is set on <html>.
|
|
4
|
+
*/
|
|
1
5
|
/* src/themes.css */
|
|
2
6
|
|
|
3
7
|
/* ===========================
|
|
4
8
|
APP-WIDE SETTINGS
|
|
5
|
-
Spacing, radius, shadows, animations - apply to all themes
|
|
6
9
|
=========================== */
|
|
7
10
|
:root {
|
|
8
11
|
/* Routing animations (fade | slide | none) */
|
|
@@ -115,17 +118,11 @@
|
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
/* ===========================
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
OPTIONAL ESSENCES (do not apply by default; set <html class="brutalist"> or class="luxury" to use)
|
|
122
|
+
See guides/dndev/essences_reference.css for full .brutalist and .luxury blocks.
|
|
120
123
|
=========================== */
|
|
121
124
|
|
|
122
|
-
/*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
--theme-is-dark: 0;
|
|
127
|
-
--background: #your-color;
|
|
128
|
-
--foreground: #your-color;
|
|
129
|
-
...
|
|
130
|
-
}
|
|
131
|
-
*/
|
|
125
|
+
/* ===========================
|
|
126
|
+
CUSTOM THEMES
|
|
127
|
+
=========================== */
|
|
128
|
+
/* Example: .brand { --theme-icon: 'Zap'; --theme-label: 'Brand'; --theme-is-dark: 0; ... } */
|
|
@@ -21,7 +21,7 @@ VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
|
21
21
|
# =============================================================================
|
|
22
22
|
# Comma-separated list of enabled auth providers
|
|
23
23
|
# Available: github (required for framework), google, facebook, discord, twitter, microsoft, spotify, linkedin, reddit, twitch, yahoo, apple
|
|
24
|
-
# Uncomment when
|
|
24
|
+
# Uncomment when your backend is configured
|
|
25
25
|
# VITE_AUTH_PARTNERS=github
|
|
26
26
|
|
|
27
27
|
# Comma-separated list of enabled OAuth partners for API access
|
|
@@ -34,38 +34,9 @@ VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
|
|
|
34
34
|
# VITE_SPOTIFY_CLIENT_ID=your_spotify_client_id
|
|
35
35
|
|
|
36
36
|
# =============================================================================
|
|
37
|
-
#
|
|
37
|
+
# Backend-specific vars are appended below by your backend choice
|
|
38
|
+
# (Firebase, Supabase, etc.) — see overlay templates
|
|
38
39
|
# =============================================================================
|
|
39
|
-
# Get these values from your Firebase project settings
|
|
40
|
-
# Run `dndev firebase:setup` to auto-populate, or copy from Firebase Console
|
|
41
|
-
VITE_FIREBASE_API_KEY=
|
|
42
|
-
VITE_FIREBASE_PROJECT_ID=
|
|
43
|
-
# Copy from Firebase Console. Framework uses APP_URL hostname in production automatically.
|
|
44
|
-
VITE_FIREBASE_AUTH_DOMAIN=
|
|
45
|
-
VITE_FIREBASE_STORAGE_BUCKET=
|
|
46
|
-
VITE_FIREBASE_MESSAGING_SENDER_ID=
|
|
47
|
-
VITE_FIREBASE_APP_ID=
|
|
48
|
-
VITE_FIREBASE_MEASUREMENT_ID=
|
|
49
|
-
VITE_FIREBASE_FUNCTIONS_REGION=
|
|
50
|
-
|
|
51
|
-
# =============================================================================
|
|
52
|
-
# Firebase Emulator (Development only)
|
|
53
|
-
# =============================================================================
|
|
54
|
-
# Set to true to use Firebase emulators instead of production services
|
|
55
|
-
VITE_USE_FIREBASE_EMULATOR=false
|
|
56
|
-
VITE_FIREBASE_EMULATOR_HOST=localhost
|
|
57
|
-
VITE_FIREBASE_EMULATOR_PORT=9099
|
|
58
|
-
VITE_FIREBASE_AUTH_EMULATOR_HOST=http://localhost:9099
|
|
59
|
-
VITE_FIREBASE_FIRESTORE_EMULATOR_HOST=localhost:8080
|
|
60
|
-
VITE_FIREBASE_FUNCTIONS_EMULATOR_PORT=5001
|
|
61
|
-
|
|
62
|
-
# =============================================================================
|
|
63
|
-
# Firebase App Check (Abuse Protection)
|
|
64
|
-
# =============================================================================
|
|
65
|
-
# reCAPTCHA v3 site key for App Check
|
|
66
|
-
# VITE_RECAPTCHA_SITE_KEY=6LcXXXX...
|
|
67
|
-
# Optional: Debug token for localhost testing
|
|
68
|
-
# VITE_APPCHECK_DEBUG_TOKEN=XXXX-XXXX-XXXX
|
|
69
40
|
|
|
70
41
|
# =============================================================================
|
|
71
42
|
# Stripe Configuration (if using billing)
|
|
@@ -16,13 +16,8 @@
|
|
|
16
16
|
<!-- ✅ PWA: Manifest link (if exists) -->
|
|
17
17
|
<link rel="manifest" href="/manifest.json" />
|
|
18
18
|
|
|
19
|
-
<!--
|
|
20
|
-
|
|
21
|
-
<link rel="preload" href="/fonts/Roboto-400-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
22
|
-
|
|
23
|
-
<!-- ✅ PERFORMANCE: Load extended font subsets async (non-blocking) -->
|
|
24
|
-
<link rel="stylesheet" href="/fonts/fonts.css" media="print" onload="this.media='all'">
|
|
25
|
-
<noscript><link rel="stylesheet" href="/fonts/fonts.css"></noscript>
|
|
19
|
+
<!-- Fonts: Inter, Space Grotesk, Playfair, Roboto loaded via @donotdev/ui/dndev.css (bundled). -->
|
|
20
|
+
<!-- DNDEV_FONT_PRELOADS -->
|
|
26
21
|
|
|
27
22
|
<!-- ✅ PERFORMANCE: Preconnect to external domains (OAuth providers) -->
|
|
28
23
|
<!-- GitHub OAuth -->
|
|
@@ -41,23 +36,6 @@
|
|
|
41
36
|
|
|
42
37
|
<!-- ✅ PERFORMANCE: Critical CSS inlined here by build -->
|
|
43
38
|
<style>
|
|
44
|
-
/* Critical @font-face declarations - must be inline for preloaded fonts to work */
|
|
45
|
-
@font-face {
|
|
46
|
-
font-family: Inter;
|
|
47
|
-
font-style: normal;
|
|
48
|
-
font-weight: 400 700;
|
|
49
|
-
font-display: swap;
|
|
50
|
-
src: url('/fonts/Inter-latin.woff2') format('woff2');
|
|
51
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
52
|
-
}
|
|
53
|
-
@font-face {
|
|
54
|
-
font-family: Roboto;
|
|
55
|
-
font-style: normal;
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
font-display: swap;
|
|
58
|
-
src: url('/fonts/Roboto-400-latin.woff2') format('woff2');
|
|
59
|
-
unicode-range: U+0000-00FF;
|
|
60
|
-
}
|
|
61
39
|
/* Critical above-the-fold styles */
|
|
62
40
|
html, body {
|
|
63
41
|
margin: 0;
|
|
@@ -4,16 +4,6 @@
|
|
|
4
4
|
@import './themes.css';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Font
|
|
8
|
-
*
|
|
9
|
-
* Framework defaults to Inter (defined in @donotdev/components/styles/variables.css).
|
|
10
|
-
* Fonts are loaded via CSS @font-face rules in @donotdev/ui/assets/fonts/fonts.css
|
|
11
|
-
* and copied to public/fonts/ by AssetDiscovery during build.
|
|
12
|
-
*
|
|
13
|
-
* To override, uncomment and customize:
|
|
14
|
-
* :root {
|
|
15
|
-
* --font-sans: 'YourFont', sans-serif;
|
|
16
|
-
* --font-mono: 'YourMonoFont', monospace;
|
|
17
|
-
* --font-family: var(--font-sans);
|
|
18
|
-
* }
|
|
7
|
+
* Font choices (--font-family, --font-sans, etc.) belong in themes.css.
|
|
8
|
+
* Fonts (Inter, Space Grotesk, Playfair, Roboto) are bundled via @donotdev/ui; no external fetch, no public/fonts required.
|
|
19
9
|
*/
|
|
@@ -54,8 +54,7 @@ export default function ProductPage() {
|
|
|
54
54
|
const isNew = id === 'new';
|
|
55
55
|
|
|
56
56
|
// useCrud provides CRUD operations with optimistic updates
|
|
57
|
-
|
|
58
|
-
const { get, add, update, error } = useCrud(productEntity, { backend: 'functions' });
|
|
57
|
+
const { get, add, update, error } = useCrud(productEntity);
|
|
59
58
|
const [formData, setFormData] = useState<any>(null);
|
|
60
59
|
|
|
61
60
|
// ==========================================================================
|
|
@@ -176,7 +176,7 @@ export default function HomePage() {
|
|
|
176
176
|
{/* ================================================================ */}
|
|
177
177
|
|
|
178
178
|
<Section title="Start Building" tone="muted" align="center">
|
|
179
|
-
<Stack align="center"
|
|
179
|
+
<Stack align="center">
|
|
180
180
|
<Text level="body">
|
|
181
181
|
Once setup is complete, use WAI-WAY to build your app:
|
|
182
182
|
</Text>
|
|
@@ -1,64 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* src/themes.css — SSOT for visual essence and theme variables.
|
|
3
|
+
* Import this in globals.css; do not set font/color overrides in globals (themes.css only).
|
|
4
|
+
*
|
|
5
|
+
* Default essence = SaaS (Inter, neutral). No class on <html> = SaaS.
|
|
6
|
+
* Optional essences below (.brutalist, .luxury) do NOT apply by default.
|
|
7
|
+
* To use one: set the class on the document root (e.g. document.documentElement.className = 'brutalist')
|
|
8
|
+
* or use the framework theme switcher if your app exposes it.
|
|
9
|
+
*/
|
|
2
10
|
|
|
3
11
|
/* ===========================
|
|
4
|
-
|
|
5
|
-
Spacing, radius, shadows, animations - apply to all themes
|
|
6
|
-
=========================== */
|
|
7
|
-
:root {
|
|
8
|
-
/* Routing animations (fade | slide | none) */
|
|
9
|
-
/* --routing-animation: fade; */
|
|
10
|
-
/* --routing-default-duration: var(--dur-normal); */
|
|
11
|
-
|
|
12
|
-
/* Spacing scale */
|
|
13
|
-
/* --gap-sm: 0.5rem; */
|
|
14
|
-
/* --gap-md: 1rem; */
|
|
15
|
-
/* --gap-lg: 2rem; */
|
|
16
|
-
|
|
17
|
-
/* Border radius */
|
|
18
|
-
/* --radius-interactive: var(--radius-none); */
|
|
19
|
-
/* --radius-surface: var(--radius-md); */
|
|
20
|
-
/* --radius-floating: var(--radius-none); */
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* ===========================
|
|
24
|
-
LIGHT THEME
|
|
25
|
-
Zinc-based neutral palette
|
|
12
|
+
LIGHT THEME (SaaS default)
|
|
26
13
|
=========================== */
|
|
27
14
|
:root.light {
|
|
28
15
|
--theme-icon: 'Sun';
|
|
29
16
|
--theme-label: 'Light';
|
|
30
17
|
--theme-is-dark: 0;
|
|
31
18
|
|
|
32
|
-
/* Core colors */
|
|
33
19
|
--background: #ffffff;
|
|
34
20
|
--foreground: #09090b;
|
|
35
|
-
|
|
36
|
-
/* Surfaces */
|
|
37
|
-
--card: #ffffff;
|
|
38
|
-
--card-foreground: #09090b;
|
|
39
|
-
--popover: #ffffff;
|
|
40
|
-
--popover-foreground: #09090b;
|
|
41
|
-
|
|
42
|
-
/* Muted (zinc-100 / zinc-500) */
|
|
43
|
-
--muted: #f4f4f5;
|
|
44
|
-
--muted-foreground: #71717a;
|
|
45
|
-
|
|
46
|
-
/* Border & input (zinc-200) */
|
|
47
|
-
--border: #e4e4e7;
|
|
48
|
-
--input: #e4e4e7;
|
|
49
|
-
--ring: var(--primary);
|
|
50
|
-
|
|
51
|
-
/* Brand colors - customize these */
|
|
52
21
|
--primary: #0284c7;
|
|
53
22
|
--primary-foreground: #ffffff;
|
|
54
|
-
|
|
55
23
|
--secondary: #f4f4f5;
|
|
56
24
|
--secondary-foreground: #18181b;
|
|
57
|
-
|
|
58
25
|
--accent: #ea580c;
|
|
59
26
|
--accent-foreground: #ffffff;
|
|
60
|
-
|
|
61
|
-
|
|
27
|
+
--muted: #f4f4f5;
|
|
28
|
+
--muted-foreground: #71717a;
|
|
29
|
+
--border: #e4e4e7;
|
|
30
|
+
--input: #e4e4e7;
|
|
31
|
+
--ring: var(--primary);
|
|
32
|
+
--card: #ffffff;
|
|
33
|
+
--card-foreground: #09090b;
|
|
34
|
+
--popover: #ffffff;
|
|
35
|
+
--popover-foreground: #09090b;
|
|
62
36
|
--destructive: #dc2626;
|
|
63
37
|
--destructive-foreground: #ffffff;
|
|
64
38
|
--success: #16a34a;
|
|
@@ -68,44 +42,30 @@
|
|
|
68
42
|
}
|
|
69
43
|
|
|
70
44
|
/* ===========================
|
|
71
|
-
DARK THEME
|
|
72
|
-
Zinc-based dark palette
|
|
45
|
+
DARK THEME (SaaS default)
|
|
73
46
|
=========================== */
|
|
74
47
|
:root.dark {
|
|
75
48
|
--theme-icon: 'Moon';
|
|
76
49
|
--theme-label: 'Dark';
|
|
77
50
|
--theme-is-dark: 1;
|
|
78
51
|
|
|
79
|
-
/* Core colors */
|
|
80
52
|
--background: #09090b;
|
|
81
53
|
--foreground: #fafafa;
|
|
82
|
-
|
|
83
|
-
/* Surfaces */
|
|
84
|
-
--card: #09090b;
|
|
85
|
-
--card-foreground: #fafafa;
|
|
86
|
-
--popover: #18181b;
|
|
87
|
-
--popover-foreground: #fafafa;
|
|
88
|
-
|
|
89
|
-
/* Muted (zinc-800 / zinc-400) */
|
|
90
|
-
--muted: #27272a;
|
|
91
|
-
--muted-foreground: #a1a1aa;
|
|
92
|
-
|
|
93
|
-
/* Border & input (zinc-800) */
|
|
94
|
-
--border: #27272a;
|
|
95
|
-
--input: #27272a;
|
|
96
|
-
--ring: var(--primary);
|
|
97
|
-
|
|
98
|
-
/* Brand colors - customize these */
|
|
99
54
|
--primary: #0ea5e9;
|
|
100
55
|
--primary-foreground: #ffffff;
|
|
101
|
-
|
|
102
56
|
--secondary: #27272a;
|
|
103
57
|
--secondary-foreground: #fafafa;
|
|
104
|
-
|
|
105
58
|
--accent: #f97316;
|
|
106
59
|
--accent-foreground: #ffffff;
|
|
107
|
-
|
|
108
|
-
|
|
60
|
+
--muted: #27272a;
|
|
61
|
+
--muted-foreground: #a1a1aa;
|
|
62
|
+
--border: #27272a;
|
|
63
|
+
--input: #27272a;
|
|
64
|
+
--ring: var(--primary);
|
|
65
|
+
--card: #09090b;
|
|
66
|
+
--card-foreground: #fafafa;
|
|
67
|
+
--popover: #18181b;
|
|
68
|
+
--popover-foreground: #fafafa;
|
|
109
69
|
--destructive: #dc2626;
|
|
110
70
|
--destructive-foreground: #ffffff;
|
|
111
71
|
--success: #16a34a;
|
|
@@ -115,17 +75,87 @@
|
|
|
115
75
|
}
|
|
116
76
|
|
|
117
77
|
/* ===========================
|
|
118
|
-
|
|
119
|
-
|
|
78
|
+
OPTIONAL ESSENCES
|
|
79
|
+
Do not apply by default. Apply by setting class on <html> (e.g. class="brutalist").
|
|
80
|
+
Fonts: Space Grotesk (Brutalist), Playfair Display (Luxury) are in @donotdev/ui.
|
|
120
81
|
=========================== */
|
|
121
82
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
--theme-icon: '
|
|
125
|
-
--theme-label: '
|
|
83
|
+
/** Brutalist — Industrial, grid, Space Grotesk, orange/black. Does not apply by default. */
|
|
84
|
+
.brutalist {
|
|
85
|
+
--theme-icon: 'Construction';
|
|
86
|
+
--theme-label: 'Brutalist';
|
|
87
|
+
--theme-is-dark: 1;
|
|
88
|
+
--background: #000000;
|
|
89
|
+
--foreground: #ffffff;
|
|
90
|
+
--primary: #f97316;
|
|
91
|
+
--secondary: #1a1a1a;
|
|
92
|
+
--accent: #f97316;
|
|
93
|
+
--muted: #111111;
|
|
94
|
+
--muted-foreground: #888888;
|
|
95
|
+
--border: #ffffff;
|
|
96
|
+
--input: #111111;
|
|
97
|
+
--ring: #f97316;
|
|
98
|
+
--card: #000000;
|
|
99
|
+
--card-foreground: #ffffff;
|
|
100
|
+
--popover: #000000;
|
|
101
|
+
--popover-foreground: #ffffff;
|
|
102
|
+
--primary-foreground: #ffffff;
|
|
103
|
+
--secondary-foreground: #ffffff;
|
|
104
|
+
--accent-foreground: #ffffff;
|
|
105
|
+
--success: #22c55e;
|
|
106
|
+
--warning: #f97316;
|
|
107
|
+
--destructive: #dc2626;
|
|
108
|
+
--success-foreground: #ffffff;
|
|
109
|
+
--warning-foreground: #ffffff;
|
|
110
|
+
--destructive-foreground: #ffffff;
|
|
111
|
+
--radius-interactive: 0;
|
|
112
|
+
--radius-surface: 0;
|
|
113
|
+
--radius-floating: 0;
|
|
114
|
+
--font-family: 'Space Grotesk', var(--font-sans);
|
|
115
|
+
--font-headline: 'Space Grotesk', var(--font-sans);
|
|
116
|
+
--border-width: 2px;
|
|
117
|
+
--border-huge: 4px;
|
|
118
|
+
--shadow-sm: 4px 4px 0px 0px var(--primary);
|
|
119
|
+
--shadow-md: 8px 8px 0px 0px var(--primary);
|
|
120
|
+
--shadow-xl: 12px 12px 0px 0px var(--primary);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Luxury — Serif headlines (Playfair), gold/cream/dark. Does not apply by default. */
|
|
124
|
+
.luxury {
|
|
125
|
+
--theme-icon: 'Gem';
|
|
126
|
+
--theme-label: 'Luxury';
|
|
126
127
|
--theme-is-dark: 0;
|
|
127
|
-
--background: #
|
|
128
|
-
--foreground: #
|
|
129
|
-
|
|
128
|
+
--background: #faf8f5;
|
|
129
|
+
--foreground: #1c1917;
|
|
130
|
+
--primary: #b45309;
|
|
131
|
+
--secondary: #fef3c7;
|
|
132
|
+
--accent: #92400e;
|
|
133
|
+
--muted: #fef9c3;
|
|
134
|
+
--muted-foreground: #78716c;
|
|
135
|
+
--border: #e7e5e4;
|
|
136
|
+
--input: #ffffff;
|
|
137
|
+
--ring: #b45309;
|
|
138
|
+
--card: #ffffff;
|
|
139
|
+
--card-foreground: #1c1917;
|
|
140
|
+
--popover: #ffffff;
|
|
141
|
+
--popover-foreground: #1c1917;
|
|
142
|
+
--primary-foreground: #ffffff;
|
|
143
|
+
--secondary-foreground: #1c1917;
|
|
144
|
+
--accent-foreground: #ffffff;
|
|
145
|
+
--success: #15803d;
|
|
146
|
+
--warning: #b45309;
|
|
147
|
+
--destructive: #b91c1c;
|
|
148
|
+
--success-foreground: #ffffff;
|
|
149
|
+
--warning-foreground: #1c1917;
|
|
150
|
+
--destructive-foreground: #ffffff;
|
|
151
|
+
--font-family: var(--font-sans);
|
|
152
|
+
--font-headline: 'Playfair Display', var(--font-serif);
|
|
153
|
+
--radius-interactive: 0.375rem;
|
|
154
|
+
--radius-surface: 0.5rem;
|
|
155
|
+
--radius-floating: 0.5rem;
|
|
130
156
|
}
|
|
131
|
-
|
|
157
|
+
|
|
158
|
+
/* ===========================
|
|
159
|
+
CUSTOM THEMES
|
|
160
|
+
Add your brand themes below (same pattern: class + --theme-label, --theme-icon, --theme-is-dark).
|
|
161
|
+
=========================== */
|