@donotdev/cli 0.0.36 → 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/LICENSE.md +21 -48
- package/dependencies-matrix.json +24 -24
- package/dist/bin/commands/agent-setup.js +6965 -125
- package/dist/bin/commands/build.js +6 -3
- package/dist/bin/commands/bump.js +35 -15
- package/dist/bin/commands/cacheout.js +19 -3
- package/dist/bin/commands/coach.js +6 -3
- package/dist/bin/commands/create-app.js +18 -4
- package/dist/bin/commands/create-project.js +19 -5
- package/dist/bin/commands/db.js +1700 -3786
- package/dist/bin/commands/deploy.js +144 -98
- package/dist/bin/commands/dev.js +8 -7
- package/dist/bin/commands/doctor.js +6 -3
- package/dist/bin/commands/emu.js +8 -7
- package/dist/bin/commands/format.js +7 -5
- package/dist/bin/commands/get-demo.js +18 -4
- package/dist/bin/commands/make-admin.js +1809 -179
- package/dist/bin/commands/preview.js +8 -7
- package/dist/bin/commands/seed.js +1700 -3786
- package/dist/bin/commands/setup-cicd.js +6 -3
- package/dist/bin/commands/setup.js +23 -20
- package/dist/bin/commands/staging.js +144 -98
- package/dist/bin/commands/sync-secrets.js +6 -3
- package/dist/bin/commands/type-check.js +6 -3
- package/dist/bin/commands/wai.js +6 -3
- package/dist/bin/dndev.js +21 -1
- package/dist/bin/donotdev.js +21 -1
- package/dist/index.js +172 -107
- package/package.json +2 -2
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/functions-supabase/supabase/functions/.env.example +12 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +7 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +189 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +84 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +243 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +283 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +128 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +167 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +187 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +244 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +268 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +228 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +237 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +192 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +399 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +195 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +270 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +204 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +191 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +292 -0
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +28 -0
- package/templates/root-consumer/.claude/commands/design.md.example +31 -0
- package/templates/root-consumer/.claude/commands/grill.md.example +33 -6
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +16 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +50 -0
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +17 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +11 -5
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +2 -1
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// {{appName}} - Home Page
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Zap,
|
|
6
|
+
Shield,
|
|
7
|
+
Rocket,
|
|
8
|
+
Home,
|
|
9
|
+
UserPlus,
|
|
10
|
+
Settings,
|
|
11
|
+
Play,
|
|
12
|
+
Quote,
|
|
13
|
+
Check,
|
|
14
|
+
} from 'lucide-react';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
Badge,
|
|
18
|
+
BADGE_VARIANT,
|
|
19
|
+
Button,
|
|
20
|
+
BUTTON_VARIANT,
|
|
21
|
+
CallToAction,
|
|
22
|
+
Card,
|
|
23
|
+
CARD_VARIANT,
|
|
24
|
+
HeroSection,
|
|
25
|
+
Marquee,
|
|
26
|
+
Roadmap,
|
|
27
|
+
Section,
|
|
28
|
+
Stack,
|
|
29
|
+
Text,
|
|
30
|
+
} from '@donotdev/components';
|
|
31
|
+
import { useTranslation } from '@donotdev/core';
|
|
32
|
+
import { FeatureCard, Link, PageContainer } from '@donotdev/ui';
|
|
33
|
+
|
|
34
|
+
import type { PageMeta, RoadmapStep } from '@donotdev/core';
|
|
35
|
+
|
|
36
|
+
export const NAMESPACE = 'home';
|
|
37
|
+
|
|
38
|
+
export const meta: PageMeta = {
|
|
39
|
+
namespace: NAMESPACE,
|
|
40
|
+
icon: <Home />,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const testimonials = [
|
|
44
|
+
{
|
|
45
|
+
name: 'Sarah K.',
|
|
46
|
+
role: 'CTO @ Fintech',
|
|
47
|
+
text: 'We shipped our MVP in under a month. Authentication, billing, CRUD - everything just worked.',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Marco R.',
|
|
51
|
+
role: 'Solo Founder',
|
|
52
|
+
text: 'I replaced an entire stack of tools with one platform. Best decision I made this year.',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Priya N.',
|
|
56
|
+
role: 'Engineering Lead',
|
|
57
|
+
text: 'The developer experience is outstanding. Our team onboarding time dropped by 60%.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'James L.',
|
|
61
|
+
role: 'Agency Director',
|
|
62
|
+
text: 'We deliver client projects in days now, not weeks. The ROI is impossible to ignore.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Yuki T.',
|
|
66
|
+
role: 'Indie Hacker',
|
|
67
|
+
text: 'Dark mode, i18n, accessibility - all handled. I just focus on my product.',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Elena M.',
|
|
71
|
+
role: 'Staff Engineer',
|
|
72
|
+
text: 'Finally a platform that scales with the team instead of against it.',
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
const pricingTiers = [
|
|
77
|
+
{
|
|
78
|
+
name: 'Starter',
|
|
79
|
+
price: 'Free',
|
|
80
|
+
description: 'For individuals and side projects',
|
|
81
|
+
features: ['1 project', 'Community support', 'Basic analytics', '1 GB storage'],
|
|
82
|
+
variant: CARD_VARIANT.DEFAULT,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Pro',
|
|
86
|
+
price: '$29/mo',
|
|
87
|
+
description: 'For growing teams and startups',
|
|
88
|
+
features: ['Unlimited projects', 'Priority support', 'Advanced analytics', '50 GB storage', 'Custom domain', 'Team collaboration'],
|
|
89
|
+
variant: CARD_VARIANT.ACCENT,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'Enterprise',
|
|
93
|
+
price: 'Custom',
|
|
94
|
+
description: 'For organizations at scale',
|
|
95
|
+
features: ['Everything in Pro', 'Dedicated support', 'SSO & SAML', 'Unlimited storage', 'SLA guarantee', 'On-premise option'],
|
|
96
|
+
variant: CARD_VARIANT.DEFAULT,
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
export default function HomePage() {
|
|
101
|
+
const { t } = useTranslation(NAMESPACE);
|
|
102
|
+
|
|
103
|
+
const featureCards = [
|
|
104
|
+
{
|
|
105
|
+
icon: Zap,
|
|
106
|
+
title: t('home.features.speed.title', 'Lightning Fast'),
|
|
107
|
+
subtitle: t('home.features.speed.subtitle', 'Built for performance'),
|
|
108
|
+
content: [
|
|
109
|
+
'Sub-second page loads',
|
|
110
|
+
'Optimized asset delivery',
|
|
111
|
+
'Edge-first architecture',
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
icon: Shield,
|
|
116
|
+
title: t('home.features.security.title', 'Enterprise Security'),
|
|
117
|
+
subtitle: t('home.features.security.subtitle', 'Security built in'),
|
|
118
|
+
content: [
|
|
119
|
+
'End-to-end encryption',
|
|
120
|
+
'Role-based access control',
|
|
121
|
+
'SOC 2 compliant infrastructure',
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
icon: Rocket,
|
|
126
|
+
title: t('home.features.scale.title', 'Scales With You'),
|
|
127
|
+
subtitle: t('home.features.scale.subtitle', 'From MVP to enterprise'),
|
|
128
|
+
content: [
|
|
129
|
+
'Auto-scaling infrastructure',
|
|
130
|
+
'Global CDN distribution',
|
|
131
|
+
'Zero-downtime deployments',
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
const steps: RoadmapStep[] = [
|
|
137
|
+
{
|
|
138
|
+
phase: t('home.howItWorks.step1.phase', 'Step 1'),
|
|
139
|
+
icon: UserPlus,
|
|
140
|
+
title: t('home.howItWorks.step1.title', 'Create Your Account'),
|
|
141
|
+
subtitle: t('home.howItWorks.step1.description', 'Sign up in seconds. No credit card required.'),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
phase: t('home.howItWorks.step2.phase', 'Step 2'),
|
|
145
|
+
icon: Settings,
|
|
146
|
+
title: t('home.howItWorks.step2.title', 'Configure Your Project'),
|
|
147
|
+
subtitle: t('home.howItWorks.step2.description', 'Set up your workspace, invite your team, and connect your tools.'),
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
phase: t('home.howItWorks.step3.phase', 'Step 3'),
|
|
151
|
+
icon: Play,
|
|
152
|
+
title: t('home.howItWorks.step3.title', 'Launch & Grow'),
|
|
153
|
+
subtitle: t('home.howItWorks.step3.description', 'Go live in minutes. Monitor, iterate, and scale with confidence.'),
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
<PageContainer>
|
|
159
|
+
<HeroSection
|
|
160
|
+
badge={t('home.hero.badge', 'Now in Public Beta')}
|
|
161
|
+
title={t('home.hero.title', 'Build Better Products with {{appShortName}}')}
|
|
162
|
+
subtitle={t('home.hero.subtitle', 'The all-in-one platform that helps teams ship faster, collaborate smarter, and scale without friction.')}
|
|
163
|
+
/>
|
|
164
|
+
|
|
165
|
+
<Section
|
|
166
|
+
title={t('home.features.title', 'Why {{appShortName}}?')}
|
|
167
|
+
gridCols={[1, 1, 3, 3]}
|
|
168
|
+
>
|
|
169
|
+
{featureCards.map((f) => (
|
|
170
|
+
<FeatureCard
|
|
171
|
+
key={f.title}
|
|
172
|
+
variant={CARD_VARIANT.GLASS}
|
|
173
|
+
icon={f.icon}
|
|
174
|
+
title={f.title}
|
|
175
|
+
subtitle={f.subtitle}
|
|
176
|
+
content={f.content}
|
|
177
|
+
/>
|
|
178
|
+
))}
|
|
179
|
+
</Section>
|
|
180
|
+
|
|
181
|
+
<Section title={t('home.howItWorks.title', 'How It Works')} tone="ghost">
|
|
182
|
+
<Roadmap steps={steps} />
|
|
183
|
+
</Section>
|
|
184
|
+
|
|
185
|
+
<Section title={t('home.pricing.title', 'Simple, Transparent Pricing')} tone="muted">
|
|
186
|
+
<Stack gap="medium" direction="row" wrap justify="center">
|
|
187
|
+
{pricingTiers.map((tier) => (
|
|
188
|
+
<Card
|
|
189
|
+
key={tier.name}
|
|
190
|
+
variant={tier.variant}
|
|
191
|
+
title={tier.name}
|
|
192
|
+
subtitle={tier.description}
|
|
193
|
+
content={tier.features}
|
|
194
|
+
footer={
|
|
195
|
+
<Stack gap="tight" align="center">
|
|
196
|
+
<Text level="h3" variant={tier.variant === CARD_VARIANT.ACCENT ? 'accent' : 'default'}>
|
|
197
|
+
{tier.price}
|
|
198
|
+
</Text>
|
|
199
|
+
<Button
|
|
200
|
+
variant={tier.variant === CARD_VARIANT.ACCENT ? BUTTON_VARIANT.PRIMARY : BUTTON_VARIANT.OUTLINE}
|
|
201
|
+
fullWidth
|
|
202
|
+
>
|
|
203
|
+
{tier.price === 'Custom'
|
|
204
|
+
? t('home.pricing.contact', 'Contact Sales')
|
|
205
|
+
: t('home.pricing.getStarted', 'Get Started')}
|
|
206
|
+
</Button>
|
|
207
|
+
</Stack>
|
|
208
|
+
}
|
|
209
|
+
/>
|
|
210
|
+
))}
|
|
211
|
+
</Stack>
|
|
212
|
+
</Section>
|
|
213
|
+
|
|
214
|
+
<Section title={t('home.testimonials.title', 'Trusted by Developers')} tone="ghost">
|
|
215
|
+
<Marquee
|
|
216
|
+
items={testimonials}
|
|
217
|
+
renderItem={(_item) => {
|
|
218
|
+
const item = _item as (typeof testimonials)[number];
|
|
219
|
+
return (
|
|
220
|
+
<Card style={{ minWidth: 280, maxWidth: 340 }}>
|
|
221
|
+
<Stack gap="tight" style={{ padding: 'var(--gap-md)' }}>
|
|
222
|
+
<Quote
|
|
223
|
+
style={{
|
|
224
|
+
width: 'var(--icon-sm)',
|
|
225
|
+
height: 'var(--icon-sm)',
|
|
226
|
+
color: 'var(--muted-foreground)',
|
|
227
|
+
opacity: 0.5,
|
|
228
|
+
}}
|
|
229
|
+
/>
|
|
230
|
+
<Text level="small" italic>
|
|
231
|
+
“{item.text}”
|
|
232
|
+
</Text>
|
|
233
|
+
<Stack gap="none">
|
|
234
|
+
<Text level="small" weight="semibold">
|
|
235
|
+
{item.name}
|
|
236
|
+
</Text>
|
|
237
|
+
<Text level="caption" variant="muted">
|
|
238
|
+
{item.role}
|
|
239
|
+
</Text>
|
|
240
|
+
</Stack>
|
|
241
|
+
</Stack>
|
|
242
|
+
</Card>
|
|
243
|
+
);
|
|
244
|
+
}}
|
|
245
|
+
speed={300}
|
|
246
|
+
pauseOnHover
|
|
247
|
+
gap="medium"
|
|
248
|
+
behavior="infinite"
|
|
249
|
+
ariaLabel={t('home.testimonials.ariaLabel', 'Customer testimonials')}
|
|
250
|
+
/>
|
|
251
|
+
</Section>
|
|
252
|
+
|
|
253
|
+
<CallToAction
|
|
254
|
+
tone="accent"
|
|
255
|
+
title={t('home.cta.title', 'Ready to Get Started?')}
|
|
256
|
+
subtitle={t('home.cta.subtitle', 'Join thousands of teams already building with {{appShortName}}. Free to start, no credit card required.')}
|
|
257
|
+
primaryAction={
|
|
258
|
+
<Button variant={BUTTON_VARIANT.PRIMARY}>
|
|
259
|
+
{t('home.cta.primary', 'Start Free Trial')}
|
|
260
|
+
</Button>
|
|
261
|
+
}
|
|
262
|
+
secondaryAction={
|
|
263
|
+
<Button variant={BUTTON_VARIANT.OUTLINE}>
|
|
264
|
+
{t('home.cta.secondary', 'Book a Demo')}
|
|
265
|
+
</Button>
|
|
266
|
+
}
|
|
267
|
+
/>
|
|
268
|
+
</PageContainer>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// {{appName}} - Pricing Page
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CreditCard,
|
|
6
|
+
Check,
|
|
7
|
+
Zap,
|
|
8
|
+
Building2,
|
|
9
|
+
Sparkles,
|
|
10
|
+
} from 'lucide-react';
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
Accordion,
|
|
14
|
+
Badge,
|
|
15
|
+
BADGE_VARIANT,
|
|
16
|
+
Button,
|
|
17
|
+
BUTTON_VARIANT,
|
|
18
|
+
Card,
|
|
19
|
+
CARD_VARIANT,
|
|
20
|
+
Grid,
|
|
21
|
+
HeroSection,
|
|
22
|
+
List,
|
|
23
|
+
Section,
|
|
24
|
+
Stack,
|
|
25
|
+
Text,
|
|
26
|
+
} from '@donotdev/components';
|
|
27
|
+
import { useTranslation } from '@donotdev/core';
|
|
28
|
+
import { PageContainer } from '@donotdev/ui';
|
|
29
|
+
|
|
30
|
+
import type { PageMeta } from '@donotdev/core';
|
|
31
|
+
|
|
32
|
+
export const NAMESPACE = 'pricing';
|
|
33
|
+
|
|
34
|
+
export const meta: PageMeta = {
|
|
35
|
+
namespace: NAMESPACE,
|
|
36
|
+
icon: <CreditCard />,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const plans = [
|
|
40
|
+
{
|
|
41
|
+
name: 'Free',
|
|
42
|
+
icon: Sparkles,
|
|
43
|
+
price: '$0',
|
|
44
|
+
period: 'forever',
|
|
45
|
+
description: 'Perfect for getting started and personal projects.',
|
|
46
|
+
features: [
|
|
47
|
+
'1 project',
|
|
48
|
+
'500 monthly active users',
|
|
49
|
+
'Community support',
|
|
50
|
+
'Basic analytics',
|
|
51
|
+
'1 GB storage',
|
|
52
|
+
'Standard API access',
|
|
53
|
+
],
|
|
54
|
+
cta: 'getStarted',
|
|
55
|
+
variant: CARD_VARIANT.DEFAULT,
|
|
56
|
+
buttonVariant: BUTTON_VARIANT.OUTLINE,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Pro',
|
|
60
|
+
icon: Zap,
|
|
61
|
+
price: '$29',
|
|
62
|
+
period: '/month',
|
|
63
|
+
description: 'For growing teams that need more power and flexibility.',
|
|
64
|
+
features: [
|
|
65
|
+
'Unlimited projects',
|
|
66
|
+
'10,000 monthly active users',
|
|
67
|
+
'Priority email support',
|
|
68
|
+
'Advanced analytics & reports',
|
|
69
|
+
'50 GB storage',
|
|
70
|
+
'Custom domain',
|
|
71
|
+
'Team collaboration (up to 10)',
|
|
72
|
+
'Webhook integrations',
|
|
73
|
+
'API rate limit: 10k/min',
|
|
74
|
+
],
|
|
75
|
+
cta: 'startTrial',
|
|
76
|
+
variant: CARD_VARIANT.ACCENT,
|
|
77
|
+
buttonVariant: BUTTON_VARIANT.PRIMARY,
|
|
78
|
+
popular: true,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Enterprise',
|
|
82
|
+
icon: Building2,
|
|
83
|
+
price: 'Custom',
|
|
84
|
+
period: '',
|
|
85
|
+
description: 'For organizations that need enterprise-grade features and support.',
|
|
86
|
+
features: [
|
|
87
|
+
'Everything in Pro',
|
|
88
|
+
'Unlimited active users',
|
|
89
|
+
'Dedicated account manager',
|
|
90
|
+
'Custom analytics & dashboards',
|
|
91
|
+
'Unlimited storage',
|
|
92
|
+
'SSO & SAML authentication',
|
|
93
|
+
'Unlimited team members',
|
|
94
|
+
'SLA guarantee (99.99%)',
|
|
95
|
+
'On-premise deployment option',
|
|
96
|
+
'Custom integrations',
|
|
97
|
+
],
|
|
98
|
+
cta: 'contactSales',
|
|
99
|
+
variant: CARD_VARIANT.DEFAULT,
|
|
100
|
+
buttonVariant: BUTTON_VARIANT.SECONDARY,
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
const faqItems = [
|
|
105
|
+
{
|
|
106
|
+
title: 'Can I switch plans at any time?',
|
|
107
|
+
content: 'Yes. You can upgrade or downgrade your plan at any time. Changes take effect immediately, and we prorate the billing accordingly.',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
title: 'Is there a free trial for the Pro plan?',
|
|
111
|
+
content: 'Yes, the Pro plan comes with a 14-day free trial. No credit card required to start. You can explore all Pro features before committing.',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: 'What payment methods do you accept?',
|
|
115
|
+
content: 'We accept all major credit cards (Visa, Mastercard, American Express), as well as PayPal and bank transfers for annual Enterprise plans.',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
title: 'What happens when I exceed my usage limits?',
|
|
119
|
+
content: 'We will notify you when you reach 80% of your plan limits. If you exceed them, your service continues uninterrupted and we will suggest an upgrade. We never cut access without warning.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
title: 'Do you offer discounts for annual billing?',
|
|
123
|
+
content: 'Yes. Annual billing saves you 20% compared to monthly billing. Contact us for Enterprise annual pricing.',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'Can I cancel at any time?',
|
|
127
|
+
content: 'Absolutely. There are no long-term contracts or cancellation fees. You can cancel your subscription at any time from your account settings.',
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
export default function PricingPage() {
|
|
132
|
+
const { t } = useTranslation(NAMESPACE);
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<PageContainer>
|
|
136
|
+
<HeroSection
|
|
137
|
+
badge={t('pricing.hero.badge', 'Pricing')}
|
|
138
|
+
title={t('pricing.hero.title', 'Plans That Grow With You')}
|
|
139
|
+
subtitle={t('pricing.hero.subtitle', 'Start free, scale as you grow. No hidden fees, no surprises.')}
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<Section title={t('pricing.plans.title', 'Choose Your Plan')}>
|
|
143
|
+
<Grid cols={[1, 1, 3, 3]} gap="medium">
|
|
144
|
+
{plans.map((plan) => (
|
|
145
|
+
<Card
|
|
146
|
+
key={plan.name}
|
|
147
|
+
variant={plan.variant}
|
|
148
|
+
icon={plan.icon}
|
|
149
|
+
title={
|
|
150
|
+
<Stack direction="row" align="center" gap="tight">
|
|
151
|
+
<Text level="h4">{plan.name}</Text>
|
|
152
|
+
{plan.popular && (
|
|
153
|
+
<Badge variant={BADGE_VARIANT.ACCENT}>
|
|
154
|
+
{t('pricing.popular', 'Most Popular')}
|
|
155
|
+
</Badge>
|
|
156
|
+
)}
|
|
157
|
+
</Stack>
|
|
158
|
+
}
|
|
159
|
+
subtitle={plan.description}
|
|
160
|
+
content={
|
|
161
|
+
<Stack gap="medium">
|
|
162
|
+
<Stack direction="row" align="end" gap="tight">
|
|
163
|
+
<Text level="h2">{plan.price}</Text>
|
|
164
|
+
{plan.period && (
|
|
165
|
+
<Text level="body" variant="muted">{plan.period}</Text>
|
|
166
|
+
)}
|
|
167
|
+
</Stack>
|
|
168
|
+
<List
|
|
169
|
+
items={plan.features}
|
|
170
|
+
icon={Check}
|
|
171
|
+
gap="tight"
|
|
172
|
+
density="compact"
|
|
173
|
+
/>
|
|
174
|
+
</Stack>
|
|
175
|
+
}
|
|
176
|
+
footer={
|
|
177
|
+
<Button variant={plan.buttonVariant} fullWidth>
|
|
178
|
+
{plan.cta === 'getStarted' && t('pricing.cta.getStarted', 'Get Started Free')}
|
|
179
|
+
{plan.cta === 'startTrial' && t('pricing.cta.startTrial', 'Start 14-Day Trial')}
|
|
180
|
+
{plan.cta === 'contactSales' && t('pricing.cta.contactSales', 'Contact Sales')}
|
|
181
|
+
</Button>
|
|
182
|
+
}
|
|
183
|
+
/>
|
|
184
|
+
))}
|
|
185
|
+
</Grid>
|
|
186
|
+
</Section>
|
|
187
|
+
|
|
188
|
+
<Section title={t('pricing.faq.title', 'Frequently Asked Questions')} tone="muted">
|
|
189
|
+
<Accordion
|
|
190
|
+
items={faqItems.map((item) => ({
|
|
191
|
+
title: t(`pricing.faq.${item.title}`, item.title),
|
|
192
|
+
content: (
|
|
193
|
+
<Text level="body" variant="muted">
|
|
194
|
+
{t(`pricing.faq.${item.title}.answer`, item.content)}
|
|
195
|
+
</Text>
|
|
196
|
+
),
|
|
197
|
+
}))}
|
|
198
|
+
type="single"
|
|
199
|
+
collapsible
|
|
200
|
+
/>
|
|
201
|
+
</Section>
|
|
202
|
+
</PageContainer>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// {{appName}} - Profile Page
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
User,
|
|
6
|
+
Mail,
|
|
7
|
+
Calendar,
|
|
8
|
+
CreditCard,
|
|
9
|
+
Crown,
|
|
10
|
+
ExternalLink,
|
|
11
|
+
} from 'lucide-react';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
Avatar,
|
|
15
|
+
Badge,
|
|
16
|
+
BADGE_VARIANT,
|
|
17
|
+
Button,
|
|
18
|
+
BUTTON_VARIANT,
|
|
19
|
+
Card,
|
|
20
|
+
CARD_VARIANT,
|
|
21
|
+
Grid,
|
|
22
|
+
List,
|
|
23
|
+
Progress,
|
|
24
|
+
Section,
|
|
25
|
+
Separator,
|
|
26
|
+
Stack,
|
|
27
|
+
Text,
|
|
28
|
+
} from '@donotdev/components';
|
|
29
|
+
import { useTranslation } from '@donotdev/core';
|
|
30
|
+
import { Link, PageContainer } from '@donotdev/ui';
|
|
31
|
+
import { useAuth } from '@donotdev/auth';
|
|
32
|
+
|
|
33
|
+
import type { PageMeta } from '@donotdev/core';
|
|
34
|
+
|
|
35
|
+
export const NAMESPACE = 'profile';
|
|
36
|
+
|
|
37
|
+
export const meta: PageMeta = {
|
|
38
|
+
namespace: NAMESPACE,
|
|
39
|
+
icon: <User />,
|
|
40
|
+
auth: true,
|
|
41
|
+
hideFromMenu: true,
|
|
42
|
+
route: '/profile',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default function ProfilePage() {
|
|
46
|
+
const { t } = useTranslation(NAMESPACE);
|
|
47
|
+
const user = useAuth('user');
|
|
48
|
+
|
|
49
|
+
const displayName = user?.displayName ?? t('profile.defaultName', 'User');
|
|
50
|
+
const email = user?.email ?? t('profile.defaultEmail', 'user@example.com');
|
|
51
|
+
const photoURL = user?.photoURL ?? undefined;
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<PageContainer variant="narrow">
|
|
55
|
+
<Section title={t('profile.title', 'My Profile')}>
|
|
56
|
+
<Stack gap="large">
|
|
57
|
+
<Card
|
|
58
|
+
content={
|
|
59
|
+
<Stack align="center" gap="medium" style={{ padding: 'var(--gap-lg)' }}>
|
|
60
|
+
<Avatar
|
|
61
|
+
src={photoURL}
|
|
62
|
+
fallback={displayName.charAt(0).toUpperCase()}
|
|
63
|
+
/>
|
|
64
|
+
<Stack align="center" gap="none">
|
|
65
|
+
<Text level="h3">{displayName}</Text>
|
|
66
|
+
<Text level="body" variant="muted">{email}</Text>
|
|
67
|
+
</Stack>
|
|
68
|
+
<Badge variant={BADGE_VARIANT.ACCENT}>
|
|
69
|
+
{t('profile.plan.pro', 'Pro Plan')}
|
|
70
|
+
</Badge>
|
|
71
|
+
<Link path="/settings">
|
|
72
|
+
<Button variant={BUTTON_VARIANT.OUTLINE}>
|
|
73
|
+
{t('profile.editProfile', 'Edit Profile')}
|
|
74
|
+
</Button>
|
|
75
|
+
</Link>
|
|
76
|
+
</Stack>
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<Grid cols={[1, 1, 2, 2]} gap="medium">
|
|
81
|
+
<Card
|
|
82
|
+
title={t('profile.account.title', 'Account Details')}
|
|
83
|
+
icon={User}
|
|
84
|
+
content={
|
|
85
|
+
<Stack gap="medium">
|
|
86
|
+
<Stack direction="row" justify="space-between" align="center">
|
|
87
|
+
<Stack direction="row" align="center" gap="tight">
|
|
88
|
+
<Mail style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
89
|
+
<Text level="small" variant="muted">
|
|
90
|
+
{t('profile.account.email', 'Email')}
|
|
91
|
+
</Text>
|
|
92
|
+
</Stack>
|
|
93
|
+
<Text level="small">{email}</Text>
|
|
94
|
+
</Stack>
|
|
95
|
+
|
|
96
|
+
<Separator />
|
|
97
|
+
|
|
98
|
+
<Stack direction="row" justify="space-between" align="center">
|
|
99
|
+
<Stack direction="row" align="center" gap="tight">
|
|
100
|
+
<Calendar style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
101
|
+
<Text level="small" variant="muted">
|
|
102
|
+
{t('profile.account.memberSince', 'Member since')}
|
|
103
|
+
</Text>
|
|
104
|
+
</Stack>
|
|
105
|
+
<Text level="small">
|
|
106
|
+
{t('profile.account.memberDate', 'January 2024')}
|
|
107
|
+
</Text>
|
|
108
|
+
</Stack>
|
|
109
|
+
|
|
110
|
+
<Separator />
|
|
111
|
+
|
|
112
|
+
<Stack direction="row" justify="space-between" align="center">
|
|
113
|
+
<Stack direction="row" align="center" gap="tight">
|
|
114
|
+
<Crown style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
115
|
+
<Text level="small" variant="muted">
|
|
116
|
+
{t('profile.account.role', 'Role')}
|
|
117
|
+
</Text>
|
|
118
|
+
</Stack>
|
|
119
|
+
<Badge variant={BADGE_VARIANT.DEFAULT}>
|
|
120
|
+
{t('profile.account.roleValue', 'Admin')}
|
|
121
|
+
</Badge>
|
|
122
|
+
</Stack>
|
|
123
|
+
</Stack>
|
|
124
|
+
}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<Card
|
|
128
|
+
title={t('profile.subscription.title', 'Subscription')}
|
|
129
|
+
icon={CreditCard}
|
|
130
|
+
variant={CARD_VARIANT.ACCENT}
|
|
131
|
+
content={
|
|
132
|
+
<Stack gap="medium">
|
|
133
|
+
<Stack direction="row" justify="space-between" align="center">
|
|
134
|
+
<Text level="body" weight="medium">
|
|
135
|
+
{t('profile.subscription.plan', 'Pro Plan')}
|
|
136
|
+
</Text>
|
|
137
|
+
<Text level="h4" variant="accent">$29/mo</Text>
|
|
138
|
+
</Stack>
|
|
139
|
+
|
|
140
|
+
<Separator />
|
|
141
|
+
|
|
142
|
+
<Stack gap="tight">
|
|
143
|
+
<Stack direction="row" justify="space-between">
|
|
144
|
+
<Text level="small" variant="muted">
|
|
145
|
+
{t('profile.subscription.nextBilling', 'Next billing date')}
|
|
146
|
+
</Text>
|
|
147
|
+
<Text level="small">
|
|
148
|
+
{t('profile.subscription.nextDate', 'April 15, 2024')}
|
|
149
|
+
</Text>
|
|
150
|
+
</Stack>
|
|
151
|
+
<Stack direction="row" justify="space-between">
|
|
152
|
+
<Text level="small" variant="muted">
|
|
153
|
+
{t('profile.subscription.paymentMethod', 'Payment method')}
|
|
154
|
+
</Text>
|
|
155
|
+
<Text level="small">
|
|
156
|
+
{t('profile.subscription.cardEnding', 'Visa ending in 4242')}
|
|
157
|
+
</Text>
|
|
158
|
+
</Stack>
|
|
159
|
+
</Stack>
|
|
160
|
+
|
|
161
|
+
<Separator />
|
|
162
|
+
|
|
163
|
+
<Stack gap="tight">
|
|
164
|
+
<Stack direction="row" justify="space-between">
|
|
165
|
+
<Text level="small" variant="muted">
|
|
166
|
+
{t('profile.subscription.usage', 'Usage this month')}
|
|
167
|
+
</Text>
|
|
168
|
+
<Text level="small">
|
|
169
|
+
{t('profile.subscription.usageValue', '3,240 / 10,000 users')}
|
|
170
|
+
</Text>
|
|
171
|
+
</Stack>
|
|
172
|
+
<Progress value={32} />
|
|
173
|
+
</Stack>
|
|
174
|
+
</Stack>
|
|
175
|
+
}
|
|
176
|
+
footer={
|
|
177
|
+
<Stack direction="row" gap="medium" justify="end">
|
|
178
|
+
<Link path="/pricing">
|
|
179
|
+
<Button variant={BUTTON_VARIANT.OUTLINE} icon={ExternalLink}>
|
|
180
|
+
{t('profile.subscription.managePlan', 'Manage Plan')}
|
|
181
|
+
</Button>
|
|
182
|
+
</Link>
|
|
183
|
+
</Stack>
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
</Grid>
|
|
187
|
+
</Stack>
|
|
188
|
+
</Section>
|
|
189
|
+
</PageContainer>
|
|
190
|
+
);
|
|
191
|
+
}
|