@donotdev/cli 0.0.19 → 0.0.21
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 +31 -0
- package/dependencies-matrix.json +205 -50
- package/dist/bin/commands/agent-setup.js +2 -2
- package/dist/bin/commands/build.js +6 -6
- package/dist/bin/commands/bump.js +495 -70
- package/dist/bin/commands/cacheout.js +6 -6
- package/dist/bin/commands/coach.js +6 -6
- package/dist/bin/commands/create-app.js +24 -16
- package/dist/bin/commands/create-project.js +114 -18
- package/dist/bin/commands/db.js +142136 -0
- package/dist/bin/commands/deploy.js +354 -126
- package/dist/bin/commands/dev.js +6 -6
- package/dist/bin/commands/doctor.js +140 -33
- package/dist/bin/commands/emu.js +6 -6
- package/dist/bin/commands/format.js +6 -6
- package/dist/bin/commands/get-demo.js +11 -6
- package/dist/bin/commands/make-admin.js +14210 -13770
- package/dist/bin/commands/preview.js +6 -6
- package/dist/bin/commands/seed.js +142426 -0
- package/dist/bin/commands/setup-cicd.js +8904 -0
- package/dist/bin/commands/setup.js +259 -212
- package/dist/bin/commands/staging.js +361 -127
- package/dist/bin/commands/sync-secrets.js +55 -33
- package/dist/bin/commands/type-check.js +16 -10
- package/dist/bin/commands/wai.js +6 -6
- package/dist/bin/dndev.js +194 -188
- package/dist/bin/donotdev.js +139 -189
- package/dist/index.js +468 -144
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -0
- package/templates/{root-consumer → app-demo}/entities/ExampleEntity.ts.example +15 -9
- package/templates/app-demo/index.html.example +1 -1
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/favicon.svg.example +1 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +3 -1
- package/templates/app-demo/src/config/app.ts.example +1 -0
- package/templates/app-demo/src/entities/booking.ts.example +75 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +160 -0
- package/templates/app-demo/src/entities/product.ts.example +12 -0
- package/templates/app-demo/src/entities/quote.ts.example +70 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +28 -1
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +88 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +355 -2
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +47 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +28 -1
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +2 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +22 -16
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +3 -1
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +147 -51
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +103 -21
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +139 -59
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +12 -1
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +10 -1
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +10 -1
- package/templates/app-demo/src/themes.css.example +289 -77
- package/templates/app-demo/stats.html.example +4949 -0
- package/templates/app-dndev/index.html.example +164 -0
- package/templates/app-dndev/public/logo.svg.example +1 -0
- package/templates/app-dndev/public/manifest.json.example +10 -0
- package/templates/app-dndev/src/App.tsx.example +35 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +181 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +209 -0
- package/templates/app-dndev/src/components/Kanban.css.example +385 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +32 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +68 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +228 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +714 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +49 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +107 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +352 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +126 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +147 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +115 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +366 -0
- package/templates/app-dndev/src/config/app.ts.example +103 -0
- package/templates/app-dndev/src/config/commands.ts.example +171 -0
- package/templates/app-dndev/src/config/legal.ts.example +170 -0
- package/templates/app-dndev/src/config/providers.ts.example +7 -0
- package/templates/app-dndev/src/globals.css.example +10 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +144 -0
- package/templates/app-dndev/src/main.tsx.example +21 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +640 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +658 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +347 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +137 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +64 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +386 -0
- package/templates/app-dndev/src/themes.css.example +161 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +341 -0
- package/templates/app-dndev/tsconfig.json.example +9 -0
- package/templates/app-dndev/vite.config.ts.example +24 -0
- package/templates/app-vite/index.html.example +1 -1
- package/templates/functions-supabase/supabase/functions/.env.example +0 -2
- package/templates/root-consumer/.claude/commands/grill.md.example +86 -8
- package/templates/root-consumer/.dndev.secrets.example +32 -0
- package/templates/root-consumer/.gitignore.example +3 -0
- package/templates/root-consumer/AI.md.example +4 -0
- package/templates/root-consumer/entities/index.ts.example +2 -5
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +4 -0
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +23 -20
- package/templates/root-consumer/guides/dndev/INDEX.md.example +1 -0
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +3 -7
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +115 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +41 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +13 -18
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +17 -12
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +185 -251
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +26 -8
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +66 -49
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +6 -5
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +9 -9
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +1 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +7 -6
- package/templates/root-consumer/guides/wai-way/context_map.json.example +51 -20
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +138 -0
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +103 -0
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +140 -0
- /package/templates/{root-consumer → app-demo}/entities/Contact.ts.example +0 -0
- /package/templates/{root-consumer → app-demo}/entities/demo.ts.example +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Application Configuration
|
|
3
|
+
*
|
|
4
|
+
* THIS FILE IS YOUR MAIN CONFIGURATION. Update the values below.
|
|
5
|
+
*
|
|
6
|
+
* QUICK START:
|
|
7
|
+
* 1. Set APP_NAME and APP_SHORT_NAME
|
|
8
|
+
* 2. Choose your preset (see guide below)
|
|
9
|
+
* 3. Configure footer links
|
|
10
|
+
* 4. Run `bun dev` - everything else is automatic
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { AppConfig } from '@donotdev/core';
|
|
14
|
+
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// APP IDENTITY - Update these values
|
|
17
|
+
// ============================================================================
|
|
18
|
+
|
|
19
|
+
export const APP_NAME = 'DoNotDev';
|
|
20
|
+
export const APP_SHORT_NAME = 'DnDev';
|
|
21
|
+
export const APP_DESCRIPTION = 'DoNotDev Development Environment';
|
|
22
|
+
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// MAIN CONFIGURATION
|
|
25
|
+
// ============================================================================
|
|
26
|
+
|
|
27
|
+
export const appConfig: AppConfig = {
|
|
28
|
+
app: {
|
|
29
|
+
name: APP_NAME,
|
|
30
|
+
shortName: APP_SHORT_NAME,
|
|
31
|
+
description: APP_DESCRIPTION,
|
|
32
|
+
// Note: URL comes from VITE_APP_URL in .env, not here
|
|
33
|
+
|
|
34
|
+
// Footer legal links - remove any you don't need
|
|
35
|
+
footer: {
|
|
36
|
+
legalLinks: [
|
|
37
|
+
{ path: '#cookie-settings', label: 'footer.legal.cookieSettings' },
|
|
38
|
+
{ path: '/legal/privacy', label: 'footer.legal.privacyPolicy' },
|
|
39
|
+
{ path: '/legal/terms', label: 'footer.legal.termsOfService' },
|
|
40
|
+
// { path: '/legal/notice', label: 'footer.legal.legalNotice' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// ==========================================================================
|
|
46
|
+
// PRESET GUIDE - Choose your layout
|
|
47
|
+
// ==========================================================================
|
|
48
|
+
//
|
|
49
|
+
// 'landing' → Marketing site. Full-width sections, centered content, no sidebar.
|
|
50
|
+
// Best for: Homepage, product pages, pricing, landing pages.
|
|
51
|
+
//
|
|
52
|
+
// 'admin' → Dashboard app. Collapsible sidebar, header with user menu.
|
|
53
|
+
// Best for: Admin panels, CRM, internal tools, CRUD apps.
|
|
54
|
+
//
|
|
55
|
+
// 'moolti' → Multi-panel. Left sidebar nav, optional right context sidebar.
|
|
56
|
+
// Best for: Complex apps with nested navigation, settings panels.
|
|
57
|
+
//
|
|
58
|
+
// 'docs' → Documentation. Left sidebar TOC, right sidebar on-page nav.
|
|
59
|
+
// Best for: Documentation sites, knowledge bases, help centers.
|
|
60
|
+
//
|
|
61
|
+
// 'blog' → Blog layout. Wide content area, optional category sidebar.
|
|
62
|
+
// Best for: Blog, news, articles, content-heavy sites.
|
|
63
|
+
//
|
|
64
|
+
// 'game' → Fullscreen. Minimal chrome, focus on content area.
|
|
65
|
+
// Best for: Games, immersive experiences, presentations.
|
|
66
|
+
//
|
|
67
|
+
// 'plain' → No layout. Just your pages, you handle everything.
|
|
68
|
+
// Best for: Custom layouts, embedded widgets, special cases.
|
|
69
|
+
//
|
|
70
|
+
preset: 'plain',
|
|
71
|
+
|
|
72
|
+
// ==========================================================================
|
|
73
|
+
// FEATURES - Uncomment to enable
|
|
74
|
+
// ==========================================================================
|
|
75
|
+
features: {
|
|
76
|
+
// debug: true, // Enable debug tools in development
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
// ==========================================================================
|
|
80
|
+
// AUTH CONFIG - Uncomment to customize
|
|
81
|
+
// ==========================================================================
|
|
82
|
+
// auth: {
|
|
83
|
+
// authRoute: '/signin', // Redirect when auth required
|
|
84
|
+
// roleRoute: '/403', // Redirect when role insufficient
|
|
85
|
+
// tierRoute: '/pricing', // Redirect when subscription required
|
|
86
|
+
// profilePath: '/profile', // Profile page path (undefined to hide)
|
|
87
|
+
// authMenuItems: [ // Custom menu items for logged-in users
|
|
88
|
+
// { path: '/dashboard', label: 'Dashboard' },
|
|
89
|
+
// ],
|
|
90
|
+
// },
|
|
91
|
+
|
|
92
|
+
// ==========================================================================
|
|
93
|
+
// QUERY CACHE - Uncomment to enable auto-refetch
|
|
94
|
+
// ==========================================================================
|
|
95
|
+
// Default: Infinite cache (cost-optimized, manual refresh)
|
|
96
|
+
// Uncomment for auto-refetch behavior:
|
|
97
|
+
// query: {
|
|
98
|
+
// staleTime: 1000 * 60 * 5, // 5 minutes
|
|
99
|
+
// refetchOnWindowFocus: true,
|
|
100
|
+
// refetchOnReconnect: true,
|
|
101
|
+
// },
|
|
102
|
+
};
|
|
103
|
+
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Command registry — quick actions for the cockpit
|
|
3
|
+
*
|
|
4
|
+
* Consumer defaults map to scaffolded skills (.claude/commands/*.md.example)
|
|
5
|
+
* and `dndev` CLI commands.
|
|
6
|
+
*
|
|
7
|
+
* Override API:
|
|
8
|
+
* setCommand('typecheck', 'dn tc');
|
|
9
|
+
* addAction({ id: 'lint', ... });
|
|
10
|
+
* removeAction('setup');
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
ClipboardList,
|
|
15
|
+
FileCode,
|
|
16
|
+
Flame,
|
|
17
|
+
Layers,
|
|
18
|
+
Lightbulb,
|
|
19
|
+
MonitorPlay,
|
|
20
|
+
Play,
|
|
21
|
+
Rocket,
|
|
22
|
+
Settings,
|
|
23
|
+
TestTube,
|
|
24
|
+
Wrench,
|
|
25
|
+
} from 'lucide-react';
|
|
26
|
+
|
|
27
|
+
import type { TabMode } from '../stores/dndevStore';
|
|
28
|
+
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// TYPES
|
|
31
|
+
// ============================================================================
|
|
32
|
+
|
|
33
|
+
export interface QuickAction {
|
|
34
|
+
/** Unique key */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Lucide icon component */
|
|
37
|
+
icon: typeof FileCode;
|
|
38
|
+
/** Short label (1-2 words) */
|
|
39
|
+
label: string;
|
|
40
|
+
/** One-sentence description of what this does */
|
|
41
|
+
description: string;
|
|
42
|
+
/** Shell command or /skill to execute */
|
|
43
|
+
command: string;
|
|
44
|
+
/** Where to run: shell tab or ai-agent */
|
|
45
|
+
target: TabMode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// CONSUMER DEFAULTS — WAI-WAY skills + operational commands
|
|
50
|
+
// ============================================================================
|
|
51
|
+
|
|
52
|
+
const registry = new Map<string, QuickAction>([
|
|
53
|
+
// ---- WAI-WAY Phase Skills ----
|
|
54
|
+
['brainstorm', {
|
|
55
|
+
id: 'brainstorm',
|
|
56
|
+
icon: Lightbulb,
|
|
57
|
+
label: 'Brainstorm',
|
|
58
|
+
description: 'Extract requirements, produce PRD/HLD/LLD.',
|
|
59
|
+
command: '/brainstorm',
|
|
60
|
+
target: 'ai-agent',
|
|
61
|
+
}],
|
|
62
|
+
['design', {
|
|
63
|
+
id: 'design',
|
|
64
|
+
icon: Layers,
|
|
65
|
+
label: 'Design',
|
|
66
|
+
description: 'Architecture and design from validated specs.',
|
|
67
|
+
command: '/design',
|
|
68
|
+
target: 'ai-agent',
|
|
69
|
+
}],
|
|
70
|
+
['build', {
|
|
71
|
+
id: 'build',
|
|
72
|
+
icon: Play,
|
|
73
|
+
label: 'Build',
|
|
74
|
+
description: 'Compose pages with framework components.',
|
|
75
|
+
command: '/build',
|
|
76
|
+
target: 'ai-agent',
|
|
77
|
+
}],
|
|
78
|
+
['polish', {
|
|
79
|
+
id: 'polish',
|
|
80
|
+
icon: Wrench,
|
|
81
|
+
label: 'Polish',
|
|
82
|
+
description: 'Tests, security rules, CI/CD, production config.',
|
|
83
|
+
command: '/polish',
|
|
84
|
+
target: 'ai-agent',
|
|
85
|
+
}],
|
|
86
|
+
|
|
87
|
+
// ---- Review & Quality ----
|
|
88
|
+
['grill', {
|
|
89
|
+
id: 'grill',
|
|
90
|
+
icon: Flame,
|
|
91
|
+
label: 'Grill',
|
|
92
|
+
description: 'Staff-engineer code review with security depth.',
|
|
93
|
+
command: '/grill',
|
|
94
|
+
target: 'ai-agent',
|
|
95
|
+
}],
|
|
96
|
+
['techdebt', {
|
|
97
|
+
id: 'techdebt',
|
|
98
|
+
icon: ClipboardList,
|
|
99
|
+
label: 'Tech Debt',
|
|
100
|
+
description: 'End-of-session tech debt sweep.',
|
|
101
|
+
command: '/techdebt',
|
|
102
|
+
target: 'ai-agent',
|
|
103
|
+
}],
|
|
104
|
+
|
|
105
|
+
// ---- Operational Commands ----
|
|
106
|
+
['typecheck', {
|
|
107
|
+
id: 'typecheck',
|
|
108
|
+
icon: FileCode,
|
|
109
|
+
label: 'Typecheck',
|
|
110
|
+
description: 'Validate TypeScript types across your project.',
|
|
111
|
+
command: 'dndev type-check',
|
|
112
|
+
target: 'shell',
|
|
113
|
+
}],
|
|
114
|
+
['test', {
|
|
115
|
+
id: 'test',
|
|
116
|
+
icon: TestTube,
|
|
117
|
+
label: 'Tests',
|
|
118
|
+
description: 'Run your test suites and report failures.',
|
|
119
|
+
command: 'dndev test',
|
|
120
|
+
target: 'shell',
|
|
121
|
+
}],
|
|
122
|
+
['dev', {
|
|
123
|
+
id: 'dev',
|
|
124
|
+
icon: MonitorPlay,
|
|
125
|
+
label: 'Dev',
|
|
126
|
+
description: 'Start the development server.',
|
|
127
|
+
command: 'dndev dev',
|
|
128
|
+
target: 'shell',
|
|
129
|
+
}],
|
|
130
|
+
['deploy', {
|
|
131
|
+
id: 'deploy',
|
|
132
|
+
icon: Rocket,
|
|
133
|
+
label: 'Deploy',
|
|
134
|
+
description: 'Ship to production.',
|
|
135
|
+
command: 'dndev deploy',
|
|
136
|
+
target: 'shell',
|
|
137
|
+
}],
|
|
138
|
+
['setup', {
|
|
139
|
+
id: 'setup',
|
|
140
|
+
icon: Settings,
|
|
141
|
+
label: 'Setup',
|
|
142
|
+
description: 'Configure environment and validate deps.',
|
|
143
|
+
command: 'dndev setup',
|
|
144
|
+
target: 'shell',
|
|
145
|
+
}],
|
|
146
|
+
]);
|
|
147
|
+
|
|
148
|
+
// ============================================================================
|
|
149
|
+
// API
|
|
150
|
+
// ============================================================================
|
|
151
|
+
|
|
152
|
+
/** Get all registered actions */
|
|
153
|
+
export function getActions(): QuickAction[] {
|
|
154
|
+
return [...registry.values()];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Override a default action's command */
|
|
158
|
+
export function setCommand(id: string, command: string): void {
|
|
159
|
+
const action = registry.get(id);
|
|
160
|
+
if (action) action.command = command;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Add a custom action */
|
|
164
|
+
export function addAction(action: QuickAction): void {
|
|
165
|
+
registry.set(action.id, action);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Remove an action */
|
|
169
|
+
export function removeAction(id: string): void {
|
|
170
|
+
registry.delete(id);
|
|
171
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// src/config/legal.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Legal Information Configuration
|
|
5
|
+
* @description Centralized legal information for Terms, Privacy, and Legal Notice pages
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: Configure your actual legal information here.
|
|
8
|
+
* This file is used by all legal pages (Terms of Service, Privacy Policy, Legal Notice).
|
|
9
|
+
*
|
|
10
|
+
* @version 0.0.1
|
|
11
|
+
* @since 0.0.1
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { LegalConfig } from '@donotdev/core';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Legal Configuration
|
|
18
|
+
*
|
|
19
|
+
* Fill in your actual company and legal information below.
|
|
20
|
+
* Remove any optional fields you don't need.
|
|
21
|
+
*
|
|
22
|
+
* For detailed documentation on each field, see the JSDoc in @donotdev/types or
|
|
23
|
+
* hover over any field in your IDE for inline documentation.
|
|
24
|
+
*/
|
|
25
|
+
export const legalConfig: LegalConfig = {
|
|
26
|
+
/**
|
|
27
|
+
* Company/Publisher Information
|
|
28
|
+
*/
|
|
29
|
+
company: {
|
|
30
|
+
name: 'Your Company Name', // Required - Full legal name
|
|
31
|
+
shortName: 'YCN', // Optional - Abbreviation
|
|
32
|
+
legalStatus: 'LLC', // Optional - e.g., "LLC", "SARL", "SAS", "GmbH", "Ltd"
|
|
33
|
+
registrationNumber: '123456789', // Optional but recommended - e.g., SIRET (France), Company Number (UK), EIN (USA)
|
|
34
|
+
vatNumber: 'XX123456789', // Optional - VAT/Tax ID, required for EU businesses
|
|
35
|
+
shareCapital: '10,000 USD', // Optional - Required in some jurisdictions like France
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Contact Information
|
|
40
|
+
*/
|
|
41
|
+
contact: {
|
|
42
|
+
address: '123 Main Street, City, State/Province, Postal Code, Country', // Required - Registered office address
|
|
43
|
+
email: 'legal@yourcompany.com', // Required - Legal contact email
|
|
44
|
+
phone: '+1 (555) 123-4567', // Optional but recommended
|
|
45
|
+
supportEmail: 'support@yourcompany.com', // Required - Customer support email
|
|
46
|
+
privacyEmail: 'privacy@yourcompany.com', // Required - Privacy inquiries
|
|
47
|
+
dpoEmail: 'dpo@yourcompany.com', // Required for GDPR compliance if processing significant personal data
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Publication Director
|
|
52
|
+
*
|
|
53
|
+
* The person legally responsible for the website's content.
|
|
54
|
+
* Required by law in France ("Directeur de la publication").
|
|
55
|
+
*/
|
|
56
|
+
director: {
|
|
57
|
+
name: 'John Doe', // Required - Full name of the responsible person
|
|
58
|
+
role: 'CEO', // Optional - Their title/role
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Hosting Provider
|
|
63
|
+
*
|
|
64
|
+
* Information about where your website is hosted.
|
|
65
|
+
* Required by law in many jurisdictions including France.
|
|
66
|
+
*/
|
|
67
|
+
hosting: {
|
|
68
|
+
provider: 'Firebase Hosting by Google', // Required - Hosting service name
|
|
69
|
+
address: 'Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA', // Optional - Hosting provider's address
|
|
70
|
+
contact: 'https://firebase.google.com/support', // Optional - Support URL or email
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Legal Jurisdiction
|
|
75
|
+
*
|
|
76
|
+
* Where your business operates and how disputes are resolved.
|
|
77
|
+
*/
|
|
78
|
+
jurisdiction: {
|
|
79
|
+
country: 'United States', // Required - Operating jurisdiction
|
|
80
|
+
arbitrationOrg: 'American Arbitration Association', // Optional - For dispute resolution
|
|
81
|
+
arbitrationLocation: 'New York, NY', // Optional - Where arbitration would occur
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Website Information
|
|
86
|
+
*/
|
|
87
|
+
website: {
|
|
88
|
+
url: 'https://yourcompany.com', // Required - Your main website URL
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Optional Sections Configuration
|
|
93
|
+
*
|
|
94
|
+
* Enable/disable specific sections in your legal pages.
|
|
95
|
+
* Set to true to include, false to exclude.
|
|
96
|
+
*/
|
|
97
|
+
sections: {
|
|
98
|
+
// Terms of Service sections
|
|
99
|
+
terms: {
|
|
100
|
+
children: false, // Include children-specific provisions (COPPA)
|
|
101
|
+
international: true, // Include international users provisions
|
|
102
|
+
california: false, // Include California-specific provisions (CCPA)
|
|
103
|
+
eu: true, // Include EU-specific provisions
|
|
104
|
+
},
|
|
105
|
+
// Privacy Policy sections
|
|
106
|
+
privacy: {
|
|
107
|
+
children: false, // Include children's privacy provisions (COPPA)
|
|
108
|
+
international: true, // Include international data transfer provisions
|
|
109
|
+
california: false, // Include California privacy rights (CCPA)
|
|
110
|
+
eu: true, // Include EU privacy provisions (GDPR)
|
|
111
|
+
},
|
|
112
|
+
// Legal Notice sections
|
|
113
|
+
legalNotice: {
|
|
114
|
+
intellectualProperty: true, // Include IP notice
|
|
115
|
+
personalData: true, // Include link to Privacy Policy
|
|
116
|
+
cookies: true, // Include cookies reference
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Type-safe access to legal config
|
|
123
|
+
*/
|
|
124
|
+
export type AppLegalConfig = typeof legalConfig;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* QUICK START CHECKLIST:
|
|
128
|
+
*
|
|
129
|
+
* 1. Company Information:
|
|
130
|
+
* - [ ] Update company.name with your legal entity name
|
|
131
|
+
* - [ ] Set company.legalStatus (SARL, LLC, GmbH, etc.)
|
|
132
|
+
* - [ ] Add company.registrationNumber (SIRET, EIN, Company Number)
|
|
133
|
+
* - [ ] Add company.vatNumber if you're in the EU or have VAT obligations
|
|
134
|
+
*
|
|
135
|
+
* 2. Contact Information:
|
|
136
|
+
* - [ ] Update contact.address with your registered office
|
|
137
|
+
* - [ ] Set contact.email for legal notices
|
|
138
|
+
* - [ ] Set contact.supportEmail for customer support
|
|
139
|
+
* - [ ] Set contact.privacyEmail for GDPR/privacy requests
|
|
140
|
+
* - [ ] Set contact.dpoEmail if you have a Data Protection Officer
|
|
141
|
+
*
|
|
142
|
+
* 3. Legal Responsibility:
|
|
143
|
+
* - [ ] Update director.name (person responsible for content)
|
|
144
|
+
* - [ ] Set director.role (CEO, Director, etc.)
|
|
145
|
+
*
|
|
146
|
+
* 4. Hosting:
|
|
147
|
+
* - [ ] Verify hosting.provider is correct
|
|
148
|
+
* - [ ] Update hosting.address and hosting.contact if needed
|
|
149
|
+
*
|
|
150
|
+
* 5. Jurisdiction:
|
|
151
|
+
* - [ ] Set jurisdiction.country where you operate
|
|
152
|
+
* - [ ] Configure arbitration details if needed
|
|
153
|
+
*
|
|
154
|
+
* 6. Optional Sections:
|
|
155
|
+
* - [ ] Review and enable/disable sections based on your needs
|
|
156
|
+
* - [ ] Enable sections.*.eu if you have EU users (GDPR)
|
|
157
|
+
* - [ ] Enable sections.*.california if you have California users (CCPA)
|
|
158
|
+
*
|
|
159
|
+
* LEGAL COMPLIANCE NOTES:
|
|
160
|
+
*
|
|
161
|
+
* - France: All fields with "Required" are mandatory for French websites
|
|
162
|
+
* - EU/GDPR: contact.dpoEmail is required if you process significant personal data
|
|
163
|
+
* - USA/California: Enable California sections if you have California users
|
|
164
|
+
* - International: Enable international sections for global audience
|
|
165
|
+
*
|
|
166
|
+
* For more information, consult your legal advisor or refer to:
|
|
167
|
+
* - https://docs.dndev.com/legal/configuration (framework docs)
|
|
168
|
+
* - Your local business registration authority
|
|
169
|
+
* - GDPR guidance: https://gdpr.eu
|
|
170
|
+
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/config/providers.ts — Provider bootstrap
|
|
2
|
+
// Auto-generated by DoNotDev scaffolding. Edit freely.
|
|
3
|
+
// When you add a backend (Firebase, Supabase), replace this file with the appropriate provider setup.
|
|
4
|
+
// See: guides/dndev/SETUP_PROVIDERS.md
|
|
5
|
+
|
|
6
|
+
// No backend configured — nothing to register.
|
|
7
|
+
// To add a backend later, run: dndev create-app (in an existing project, it merges)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* apps/dndev/src/globals.css */
|
|
2
|
+
@import '@donotdev/ui/dndev.css';
|
|
3
|
+
@import '@xterm/xterm/css/xterm.css';
|
|
4
|
+
|
|
5
|
+
@import './themes.css';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Font choices (--font-family, --font-sans, etc.) belong in themes.css.
|
|
9
|
+
* Fonts (Inter, Space Grotesk, Playfair, Roboto) are bundled via @donotdev/ui; no external fetch, no public/fonts required.
|
|
10
|
+
*/
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Generic hook for reading .dndev/ and project files via the file API.
|
|
3
|
+
*
|
|
4
|
+
* Fetches `GET /api/dndev/file?path=<filePath>` on mount.
|
|
5
|
+
* Auto-reloads when the file changes on disk (via HMR WebSocket).
|
|
6
|
+
* Companion `writeDndevFile` posts content back to the generic write endpoint.
|
|
7
|
+
*
|
|
8
|
+
* HMR-safe: all module-level state stored in import.meta.hot.data
|
|
9
|
+
* to survive Vite module re-evaluations without duplicating handlers.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
13
|
+
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// HMR-SAFE listener registry
|
|
16
|
+
// ============================================================================
|
|
17
|
+
|
|
18
|
+
type ListenerMap = Map<string, Set<() => void>>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get the shared listeners Map. Stored in import.meta.hot.data so it
|
|
22
|
+
* survives Vite HMR module re-evaluations.
|
|
23
|
+
*/
|
|
24
|
+
function getListeners(): ListenerMap {
|
|
25
|
+
if (import.meta.hot) {
|
|
26
|
+
if (!import.meta.hot.data.listeners) {
|
|
27
|
+
import.meta.hot.data.listeners = new Map<string, Set<() => void>>();
|
|
28
|
+
}
|
|
29
|
+
return import.meta.hot.data.listeners as ListenerMap;
|
|
30
|
+
}
|
|
31
|
+
return fallbackListeners;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Production fallback (no HMR) */
|
|
35
|
+
const fallbackListeners: ListenerMap = new Map();
|
|
36
|
+
|
|
37
|
+
// Register the HMR handler exactly once (flag in hot.data survives reloads)
|
|
38
|
+
if (import.meta.hot && !import.meta.hot.data.dndevFileHmr) {
|
|
39
|
+
import.meta.hot.data.dndevFileHmr = true;
|
|
40
|
+
import.meta.hot.on('dndev:file-changed', (event: { path: string }) => {
|
|
41
|
+
const listeners = getListeners();
|
|
42
|
+
const cbs = listeners.get(event.path);
|
|
43
|
+
if (cbs) for (const cb of cbs) cb();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function registerHmrListener(filePath: string, callback: () => void): () => void {
|
|
48
|
+
const listeners = getListeners();
|
|
49
|
+
if (!listeners.has(filePath)) listeners.set(filePath, new Set());
|
|
50
|
+
listeners.get(filePath)!.add(callback);
|
|
51
|
+
|
|
52
|
+
return () => {
|
|
53
|
+
const current = getListeners();
|
|
54
|
+
current.get(filePath)?.delete(callback);
|
|
55
|
+
if (current.get(filePath)?.size === 0) current.delete(filePath);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// HOOK
|
|
61
|
+
// ============================================================================
|
|
62
|
+
|
|
63
|
+
interface UseDndevFileResult<T> {
|
|
64
|
+
data: T | null;
|
|
65
|
+
loading: boolean;
|
|
66
|
+
error: string | null;
|
|
67
|
+
reload: () => Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function useDndevFile<T>(
|
|
71
|
+
filePath: string | null,
|
|
72
|
+
parser: (raw: unknown) => T,
|
|
73
|
+
options?: { fallback?: T },
|
|
74
|
+
): UseDndevFileResult<T> {
|
|
75
|
+
const fallbackRef = useRef(options?.fallback ?? null);
|
|
76
|
+
const parserRef = useRef(parser);
|
|
77
|
+
parserRef.current = parser;
|
|
78
|
+
const fetchingRef = useRef(false);
|
|
79
|
+
|
|
80
|
+
const [data, setData] = useState<T | null>(fallbackRef.current);
|
|
81
|
+
const [loading, setLoading] = useState(!!filePath);
|
|
82
|
+
const [error, setError] = useState<string | null>(null);
|
|
83
|
+
|
|
84
|
+
const reload = useCallback(async () => {
|
|
85
|
+
if (!filePath || fetchingRef.current) return;
|
|
86
|
+
fetchingRef.current = true;
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
const res = await fetch(
|
|
90
|
+
`/api/dndev/file?path=${encodeURIComponent(filePath)}`,
|
|
91
|
+
);
|
|
92
|
+
if (res.ok) {
|
|
93
|
+
const json = await res.json();
|
|
94
|
+
setData(parserRef.current(json.content));
|
|
95
|
+
setError(null);
|
|
96
|
+
} else if (res.status === 404) {
|
|
97
|
+
setData(fallbackRef.current);
|
|
98
|
+
setError(null);
|
|
99
|
+
} else {
|
|
100
|
+
setError(`HTTP ${res.status}`);
|
|
101
|
+
}
|
|
102
|
+
} catch (err) {
|
|
103
|
+
setError(String(err));
|
|
104
|
+
}
|
|
105
|
+
fetchingRef.current = false;
|
|
106
|
+
setLoading(false);
|
|
107
|
+
}, [filePath]);
|
|
108
|
+
|
|
109
|
+
// Fetch on mount / filePath change
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (!filePath) {
|
|
112
|
+
setData(fallbackRef.current);
|
|
113
|
+
setLoading(false);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
setLoading(true);
|
|
117
|
+
reload();
|
|
118
|
+
}, [filePath, reload]);
|
|
119
|
+
|
|
120
|
+
// HMR subscription
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (!filePath) return;
|
|
123
|
+
return registerHmrListener(filePath, reload);
|
|
124
|
+
}, [filePath, reload]);
|
|
125
|
+
|
|
126
|
+
return { data, loading, error, reload };
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// WRITE HELPER
|
|
131
|
+
// ============================================================================
|
|
132
|
+
|
|
133
|
+
export async function writeDndevFile(filePath: string, content: unknown): Promise<boolean> {
|
|
134
|
+
try {
|
|
135
|
+
const res = await fetch(`/api/dndev/file?path=${encodeURIComponent(filePath)}`, {
|
|
136
|
+
method: 'POST',
|
|
137
|
+
headers: { 'Content-Type': 'application/json' },
|
|
138
|
+
body: JSON.stringify({ content }),
|
|
139
|
+
});
|
|
140
|
+
return res.ok;
|
|
141
|
+
} catch {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './globals.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom/client';
|
|
4
|
+
import { App } from './App';
|
|
5
|
+
|
|
6
|
+
// ✅ SHELL LOADER: BaseStoresInitializer handles removal when stores are ready
|
|
7
|
+
// (removed early removal - BaseStoresInitializer has the knowledge of when stores are ready)
|
|
8
|
+
|
|
9
|
+
// Ensure the root element exists
|
|
10
|
+
const rootElement = document.getElementById('root');
|
|
11
|
+
if (!rootElement) {
|
|
12
|
+
throw new Error(
|
|
13
|
+
'Root element not found. Did you remove the root div from index.html?'
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ReactDOM.createRoot(rootElement).render(
|
|
18
|
+
<React.StrictMode>
|
|
19
|
+
<App />
|
|
20
|
+
</React.StrictMode>
|
|
21
|
+
);
|