-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.cursorrules
2616 lines (2230 loc) · 79 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Agent ONE
I am Agent ONE. I am AI Engineer for ONE https://one.ie. I build AI agents, websites and apps 1000x faster, with 1000x more accuracy than humans.
I use Zod for data validation. I use Shadcn/UI for component library. I use TailwindCSS for styling. I use MDX for rich content. I use Astro for SSR. I use React for interactive islands. I use TypeScript for static typing. I use Vercecl AI SDK, Eliza OS and Typescript for build AI agents.
ALWAYS USE PNPM
DON'T Confuse class with is for regular Astro pages and className which is for React
## 1. Project Foundation
- Technology Stack:
- Astro 5.2+
- React 18+ (Interactive Islands)
- TypeScript 5.4+
- Zod (Data Validation)
- Shadcn/UI (Component Library)
- TailwindCSS (Styling)
- MDX (Rich Content)
- Vercel AI SDK
- Eliza OS (LLM Integration)
## 2. Project Structure
src/
├── components/ # UI Components
│ ├── ui/ # Shadcn/UI components
│ ├── chat/ # Chat-related components
│ └── magicui/ # Enhanced UI components
│
├── content/ # Content Collections
│ ├── blog/ # Blog posts
│ ├── docs/ # Documentation
│ └── prompts/ # AI prompts
│
├── hooks/ # React hooks
│ ├── use-mobile.tsx
│ ├── use-theme.ts
│ └── use-toast.ts
│
├── layouts/ # Page layouts
│ ├── Blog.astro
│ ├── Docs.astro
│ ├── Layout.astro
│ └── LeftRight.astro
│
├── lib/ # Utility functions
│ ├── utils.ts
│ └── icons.ts
│
├── pages/ # Routes and pages
│ ├── api/ # API endpoints
│ ├── blog/ # Blog routes
│ ├── docs/ # Documentation routes
│ └── index.astro # Homepage
│
├── schema/ # Data schemas
│ └── chat.ts # Chat-related schemas
│
├── stores/ # State management
│ └── layout.ts # Layout state
│
├── styles/ # Global styles
│ └── global.css # Global CSS
│
└── types/ # TypeScript types
└── env.d.ts # Environment types
## 3. Zod as Single Source of Truth
I use Zod as the single source of truth for all data validation and typing in my projects. This ensures:
1. **Schema Definition:**
```typescript
import { z } from 'zod';
// Define schema once, use everywhere
const configSchema = z.object({
title: z.string(),
version: z.number(),
features: z.array(z.string()),
settings: z.object({
theme: z.enum(['light', 'dark']),
language: z.string(),
}),
});
// TypeScript type is automatically inferred
type Config = z.infer<typeof configSchema>;
```
2. **Runtime Validation:**
```typescript
// Validate data at runtime
const validateConfig = (data: unknown) => {
return configSchema.parse(data);
};
```
3. **Type Safety:**
```typescript
// TypeScript knows the exact shape
const config: Config = validateConfig(data);
```
**Key Benefits:**
- Single schema definition for both runtime validation and TypeScript types
- Automatic type inference eliminates type duplication
- Runtime type checking catches invalid data early
- Excellent IDE support and type hints
- Composable and reusable schemas
**Best Practices:**
- Define schemas in dedicated type files (src/types/*)
- Use schema composition for complex types
- Leverage Zod's rich validation features
- Export both schema and inferred type
- Add JSDoc comments for better documentation
### Expert Focus
I am an expert in JavaScript, TypeScript, and Astro framework for scalable web development.
### Key Principles
- Write concise, technical responses with accurate Astro examples
- Leverage Astro's partial hydration and multi-framework support effectively
- Prioritize static generation and minimal JavaScript for optimal performance
- Use descriptive variable names and follow Astro's naming conventions
- Organize files using Astro's file-based routing system
Add a Shadcn UI Component
Shadcn UI provides an excellent set of components that are an opinionated implementation of Radix UI React components. Space Madness includes a few of these components as an efficient way to include high quality, accessible components with minimal development overhead.
You can add more components to your site via the Shadcn UI CLI . Your site comes preconfigured with the config file at site-astro/src/components.json, so adding a new component is relatively easy. There are a few gotchas when working with Astro. We'll cover those in a later section.
Add a basic component
Let's add a new component to our site and render it. We'll use the Table component as an example.
Open your terminal of choice and navigate to the site-astro directory.
Add a new component.
Copy to Clipboard
npx shadcn-ui@latest add table
A new table.tsx file has been created for us. Let's see it in action. Open your homepage index.astro and add in the following code.
site-astro/src/pages/index.astro
Copy to Clipboard
---
import Layout from "../layouts/Layout.astro";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
const invoices = [
{
invoice: "INV001",
paymentStatus: "Paid",
totalAmount: "$250.00",
paymentMethod: "Credit Card",
},
{
invoice: "INV002",
paymentStatus: "Pending",
totalAmount: "$150.00",
paymentMethod: "PayPal",
},
{
invoice: "INV003",
paymentStatus: "Unpaid",
totalAmount: "$350.00",
paymentMethod: "Bank Transfer",
},
{
invoice: "INV004",
paymentStatus: "Paid",
totalAmount: "$450.00",
paymentMethod: "Credit Card",
},
{
invoice: "INV005",
paymentStatus: "Paid",
totalAmount: "$550.00",
paymentMethod: "PayPal",
},
{
invoice: "INV006",
paymentStatus: "Pending",
totalAmount: "$200.00",
paymentMethod: "Bank Transfer",
},
{
invoice: "INV007",
paymentStatus: "Unpaid",
totalAmount: "$300.00",
paymentMethod: "Credit Card",
},
];
---
<Layout>
<main>
<h1>Welcome to SiteName</h1>
<Table>
<TableCaption>A list of your recent invoices.</TableCaption>
<TableHeader>
<TableRow>
<TableHead className="w-[100px]">Invoice</TableHead>
<TableHead>Status</TableHead>
<TableHead>Method</TableHead>
<TableHead className="text-right">Amount</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{
invoices.map((invoice) => (
<TableRow key={invoice.invoice}>
<TableCell className="font-medium">{invoice.invoice}</TableCell>
<TableCell>{invoice.paymentStatus}</TableCell>
<TableCell>{invoice.paymentMethod}</TableCell>
<TableCell className="text-right">
{invoice.totalAmount}
</TableCell>
</TableRow>
))
}
</TableBody>
</Table>
</main>
</Layout>
This code is taken directly from the example on the Shadcn site. For our Astro site, the only differences are:
All of the JS code is moved into the header between the opening and closing ---
The JSX code is not wrapped in an exported function, we can delete those lines and use what is in the return statement.
Load up your homepage and test it out. Looks good!
Update the styles
The component code is configured in a few places. components.json specifies a color scheme. tailwind.config.mjs extends tailwind theme colors, borders, fonts, and animations. global.css is where most of our style variables are configured.
All style variables use HSL color input values.
An easy way to edit these values in global.css is to wrap your values in hsl(). Then you can use the built in color picker to modify your values.
Where you make your changes depends on how much control you want over the resulting code.
In general, if you want to keep to the Tailwind styles as closely as possible, make edits to the CSS variables in global.css.
If you want to get fancy with the spices, edit tailwind.config.mjs or write your own CSS using the Tailwind @extends directive.
One tool you might find helpful is this theme generation tool for shadcn/ui.
Working with Interactive Components
The table component does not require any client side JS for interactivity. This makes it an ideal starting place to work with components. Now let's see what happens when we add an interactive component. Let's add an Accordion.
Copy to Clipboard
npx shadcn-ui@latest add accordion
Following the pattern from before, let's import the example to our index page.
site-astro/src/pages/index.astro
Copy to Clipboard
---
import Layout from "../layouts/Layout.astro";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
---
<Layout>
<main>
<h1>Welcome to SiteName</h1>
<Accordion type="single" collapsible className="w-full">
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>
Yes. It adheres to the WAI-ARIA design pattern.
</AccordionContent>
</AccordionItem>
<AccordionItem value="item-2">
<AccordionTrigger>Is it styled?</AccordionTrigger>
<AccordionContent>
Yes. It comes with default styles that matches the other
components' aesthetic.
</AccordionContent>
</AccordionItem>
<AccordionItem value="item-3">
<AccordionTrigger>Is it animated?</AccordionTrigger>
<AccordionContent>
Yes. It's animated by default, but you can disable it if you
prefer.
</AccordionContent>
</AccordionItem>
</Accordion>
</main>
</Layout>
- Understand the structure and usage of all Shadcn UI components available for Svelte
- Know how to import and use components from "$lib/components/ui"
- Recognize the importance of using Tailwind CSS classes for styling and customization
- Implement theming using Shadcn UI's theme provider
- Utilize CSS variables for dynamic theming
- Implement dark mode using Tailwind's dark: variant and Shadcn UI's theme switching capabilities
- Ensure all Shadcn UI components are used in an accessible manner
- Implement forms using Shadcn UI's form components
- Use Shadcn UI's layout components for consistent page structure
- Utilize the Lucide icon set, which is integrated with Shadcn UI
### Radio Group
Use for single selection from a group.
```svelte
<script>
import * as RadioGroup from "$lib/components/ui/radio-group";
import { Label } from "$lib/components/ui/label";
</script>
<RadioGroup.Root value="option1">
<div class="flex items-center space-x-2">
<RadioGroup.Item value="option1" id="r1" />
<Label for="r1">Option 1</Label>
</div>
<div class="flex items-center space-x-2">
<RadioGroup.Item value="option2" id="r2" />
<Label for="r2">Option 2</Label>
</div>
</RadioGroup.Root>
### Deployment and CI/CD
- Implement automated deployment pipelines using GitHub Actions
- Configure environment-specific build processes
- Set up proper error monitoring and logging
- Implement automated backup procedures
- Configure CDN and caching strategies
### Advanced Testing Strategies
- Implement E2E testing using Playwright or Cypress
- Set up visual regression testing
- Implement performance testing and monitoring
- Configure automated accessibility testing
- Set up load testing for critical paths
### Production Optimization
- Implement proper caching strategies
- Configure service workers for offline functionality
- Optimize critical rendering paths
- Implement proper error boundaries
- Set up monitoring and analytics
### Collaboration Guidelines
- Follow conventional commit messages
- Implement proper code review processes
- Maintain comprehensive documentation
- Set up proper branching strategies
- Configure automated code quality checks
### Maintenance and Updates
- Regular dependency updates
- Security patch management
- Performance monitoring and optimization
- Regular backup procedures
- Documentation updates
```
### ScrollArea
Use for custom scrollbars.
```svelte
<script>
import * as ScrollArea from "$lib/components/ui/scroll-area";
</script>
<ScrollArea.Root className="h-[200px] w-[350px] rounded-md border p-4">
<div style="height: 1000px;">
<p>Long content here...</p>
</div>
</ScrollArea.Root>
```
### Select
Use for dropdown selections.
```svelte
<script>
import * as Select from "$lib/components/ui/select";
</script>
<Select.Root>
<Select.Trigger>
<Select.Value placeholder="Select an option" />
</Select.Trigger>
<Select.Content>
<Select.Item value="1">Option 1</Select.Item>
<Select.Item value="2">Option 2</Select.Item>
</Select.Content>
</Select.Root>
```
### Separator
Use for visual separation of content.
```svelte
<script>
import { Separator } from "$lib/components/ui/separator";
</script>
<Separator />
```
### Sheet
Use for slide-in side panels.
```svelte
<script>
import * as Sheet from "$lib/components/ui/sheet";
</script>
<Sheet.Root>
<Sheet.Trigger>Open</Sheet.Trigger>
<Sheet.Content>
<Sheet.Header>
<Sheet.Title>Are you sure?</Sheet.Title>
<Sheet.Description>This action cannot be undone.</Sheet.Description>
</Sheet.Header>
<Sheet.Footer>
<Sheet.Close>Close</Sheet.Close>
</Sheet.Footer>
</Sheet.Content>
</Sheet.Root>
```
### Skeleton
Use for loading placeholders.
```svelte
<script>
import { Skeleton } from "$lib/components/ui/skeleton";
</script>
<Skeleton class="w-[100px] h-[20px] rounded-full" />
```
### Slider
Use for selecting a value from a range.
```svelte
<script>
import { Slider } from "$lib/components/ui/slider";
</script>
<Slider value={[33]} max={100} step={1} />
```
### Switch
Use for toggling between two states.
```svelte
<script>
import { Switch } from "$lib/components/ui/switch";
</script>
<Switch />
```
### Table
Use for displaying tabular data.
```svelte
<script>
import * as Table from "$lib/components/ui/table";
</script>
<Table.Root>
<Table.Header>
<Table.Row>
<Table.Head>Name</Table.Head>
<Table.Head>Email</Table.Head>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>Alice</Table.Cell>
<Table.Cell>[email protected]</Table.Cell>
</Table.Row>
</Table.Body>
</Table.Root>
```
### Tabs
Use for organizing content into different views.
```svelte
<script>
import * as Tabs from "$lib/components/ui/tabs";
</script>
<Tabs.Root value="tab1">
<Tabs.List>
<Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
<Tabs.Trigger value="tab2">Tab 2</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="tab1">Content for Tab 1</Tabs.Content>
<Tabs.Content value="tab2">Content for Tab 2</Tabs.Content>
</Tabs.Root>
```
### Textarea
Use for multi-line text input.
```svelte
<script>
import { Textarea } from "$lib/components/ui/textarea";
</script>
<Textarea placeholder="Type your message here." />
```
### Toast
Use for temporary notifications.
```svelte
<script>
import { toast } from "$lib/components/ui/toast";
</script>
<button on:click={() => toast({ title: "Success", description: "Your action was successful." })}>
Show Toast
</button>
```
### Toggle
Use for a binary on/off input.
```svelte
<script>
import { Toggle } from "$lib/components/ui/toggle";
</script>
<Toggle>Toggle me</Toggle>
```
### Tooltip
Use for displaying additional information on hover.
```svelte
<script>
import * as Tooltip from "$lib/components/ui/tooltip";
</script>
<Tooltip.Root>
<Tooltip.Trigger>Hover me</Tooltip.Trigger>
<Tooltip.Content>
<p>Tooltip content</p>
</Tooltip.Content>
</Tooltip.Root>
```
## Final Instructions and Best Practices
1. Component Composition: Combine Shadcn UI components to create more complex UI elements. For example, you might use a Card component with a Form inside for a login interface.
2. Consistent Styling: Maintain consistency in your use of Tailwind CSS classes. Consider creating custom utility classes for frequently used combinations.
3. State Management: For more complex applications, consider using Svelte stores for global state management. Implement stores in a separate file and import them where needed.
4. Error Handling: Implement comprehensive error handling, including user-friendly error messages and logging for debugging purposes.
5. Internationalization: If your application requires multiple languages, implement i18n using a library like svelte-i18n.
6. Performance Monitoring: Implement performance monitoring and analytics to identify and address any performance issues.
7. Code Organization: Keep your code modular and well-organized. Extract reusable logic into separate functions or components.
8. Documentation: Maintain clear and up-to-date documentation for your components and pages. Include usage examples and prop definitions.
9. Accessibility Testing: Regularly test your components and pages for accessibility using tools like axe-core or manual testing with screen readers.
10. Responsive Design: Always design and implement with responsiveness in mind, testing on various device sizes and orientations.
11. Version Control: Use meaningful commit messages and consider using conventional commits for better changelog generation.
12. Code Review: If working in a team, implement a code review process to ensure code quality and knowledge sharing.
Remember, the key to successful development with SvelteKit and Shadcn UI is to leverage the strengths of both technologies while adhering to web development best practices. Always prioritize user experience, performance, and accessibility in your implementations.
---
import Layout from "../layouts/Layout.astro";
import { Button } from "@/components/ui/button";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Card } from "@/components/ui/card";
import { ChatConfigSchema } from '../schema/chat';
import {
GitHubLogoIcon,
CodeIcon,
DownloadIcon,
CheckIcon,
} from '@radix-ui/react-icons';
import FaqAccordion from "../components/FaqAccordion";
// Import license content
import License from '../../LICENSE?raw';
// GitHub repository details and stats
const GITHUB_REPO = "one-ie/one";
const GITHUB_URL = `https://github.com/${GITHUB_REPO}`;
// Fetch GitHub stats
const getGitHubStats = async () => {
try {
const response = await fetch(`https://api.github.com/repos/${GITHUB_REPO}`);
const data = await response.json();
return {
stars: data.stargazers_count,
forks: data.forks_count
};
} catch (error) {
console.error('Error fetching GitHub stats:', error);
return { stars: '14.2k', forks: '3.1k' }; // Fallback values
}
};
const stats = await getGitHubStats();
const SYSTEM_REQUIREMENTS = [
"Node.js 18.x or higher",
"pnpm package manager",
"Modern web browser (Chrome, Firefox, Safari, Edge)",
"Any modern operating system (Windows, macOS, Linux)",
"Deploy on Vercel, Netlify, AWS or any Node.js server",
];
const INSTALLATION_STEPS = [
{
title: "Download the Source",
description: "Download the ZIP file or clone the repository using Git",
},
{
title: "Install Dependencies",
description: "Run 'pnpm install' to install required packages",
},
{
title: "Configuration",
description: "Set up your environment variables following the .env.example",
},
{
title: "Start Development",
description: "Run 'pnpm dev' to start the development server",
},
];
const faqs = [
// Core Features
{
question: "What can I build with ONE?",
answer: "ONE enables you to build complete AI-powered businesses. Key features include: 1) AI Sales Agents that engage customers and close deals 24/7 2) Multi-channel Content Generation for blogs, social media, and marketing 3) Full E-commerce with crypto and traditional payments 4) Custom AI training for your specific business needs."
},
// Token System
{
question: "How does the token system work?",
answer: "ONE uses a token-based system for accessing premium features: \n• 100 ONE - Full white-label for single project\n• 1,000 ONE - Unlimited white-label for multiple domains\n• 10,000 ONE - Unlimited rights across projects\n• 50,000+ ONE - Enterprise features with strategy and training\n\nTokens can be purchased on supported exchanges and used immediately for unlocking features."
},
// Payments
{
question: "What payment methods are supported?",
answer: "ONE offers comprehensive payment support:\n• Cryptocurrencies: BTC, ETH, SOL with QR codes\n• Credit Cards & Bank Transfers\n• Digital Wallets: Apple Pay, Google Pay\n• Global Options: Alipay, Klarna, SEPA\n• Real-time payment verification\n• Automatic currency conversion"
},
// AI Agents
{
question: "How powerful are the AI agents?",
answer: "ONE's AI agents are enterprise-grade and can:\n• Handle complete sales cycles\n• Generate and optimize content\n• Process transactions autonomously\n• Learn from customer interactions\n• Operate in multiple languages\n• Integrate with external systems\n• Maintain context across sessions"
},
// Content Generation
{
question: "What type of content can be automated?",
answer: "The content automation system handles:\n• Blog posts & articles\n• Social media content\n• Product descriptions\n• Marketing materials\n• Documentation & guides\n• Email campaigns\n• Video scripts & podcasts\n\nAll content is SEO-optimized and maintains your brand voice."
},
// Technical
{
question: "What's the technical architecture?",
answer: "ONE is built on modern technology:\n• Astro & React for frontend\n• Edge-optimized runtime\n• Vercel AI SDK integration\n• WebSocket for real-time features\n• TypeScript support\n• Shadcn/UI components\n• API-first architecture"
},
// Getting Started
{
question: "How do I get started?",
answer: "Getting started is straightforward:\n1. Download and install using pnpm\n2. Connect your AI provider (OpenAI, Anthropic, etc.)\n3. Set up payment processing\n4. Configure your first AI agent\n5. Deploy to your preferred platform\n\nVisit https://one.ie/docs/quickstart for step-by-step guidance."
},
// Customization
{
question: "Can I customize everything?",
answer: "Yes, ONE is fully customizable:\n• Create custom AI agents\n• Design unique workflows\n• Build custom UI components\n• Set up custom payment flows\n• Define business rules\n• Create specialized content templates\n• Implement custom authentication"
}
];
// You can override any default values here
const chatConfig = ChatConfigSchema.parse({
systemPrompt: [{
type: "text" as const,
text: `You are ONE's lead AI advocate, helping users understand how to build AI-powered businesses with our framework. Your role is to guide visitors through our comprehensive platform that combines AI agents, crypto payments, and content automation.
Core Capabilities:
1. AI Agents & Automation
• Autonomous sales agents 24/7
• Content generation & optimization
• Social media management
• Customer interaction handling
• Multi-language support
• Context-aware responses
• Custom training options
2. Payment Integration
• Cryptocurrency (BTC, ETH, SOL)
• Traditional payments (Credit Cards)
• Digital wallets (Apple Pay, Google Pay)
• Global options (Alipay, Klarna)
• Real-time verification
• QR code support
• Automatic conversion
3. Token System
• 100 ONE - Single project white-label
• 1,000 ONE - Multiple domains
• 10,000 ONE - Unlimited rights
• 50,000+ ONE - Enterprise features
• Instant feature unlocking
• Token staking benefits
• Trading flexibility
4. Content Automation
• Blog post generation
• Social media content
• Product descriptions
• Marketing materials
• Documentation
• Email campaigns
• SEO optimization
Technical Foundation:
• Modern Stack
- Astro & React
- Edge Runtime
- TypeScript
- Vercel AI SDK
- WebSocket
- Shadcn/UI
- API-first
• Enterprise Features
- Custom AI training
- Business logic integration
- Workflow automation
- Multi-channel deployment
- Analytics & tracking
- Security measures
- Scalability options
Communication Style:
• Be solution-focused
• Highlight practical applications
• Explain token benefits clearly
• Share specific examples
• Provide implementation steps
• Address technical & business needs
• Maintain professional enthusiasm
Key Points to Emphasize:
• Complete business solution
• Token-based white-labeling
• Comprehensive payment options
• AI agent capabilities
• Content automation power
• Easy implementation
• Scalable architecture
Your goal is to help users understand how ONE can transform their business with AI agents, automated content, and integrated payments while explaining our token-based system for accessing premium features.`
}],
welcome: {
message: "👋 Welcome! I'm here to show you how ONE can transform your business with AI agents, automated content, and crypto payments. What would you like to learn about?",
avatar: "/icon.svg",
suggestions: [
{
label: "🤖 AI Agents",
prompt: "Tell me about ONE's AI agent capabilities for sales and automation"
},
{
label: "💳 Payment Options",
prompt: "What payment methods does ONE support, including crypto?"
},
{
label: "🪙 Token System",
prompt: "How do ONE tokens work for white-labeling and premium features?"
},
{
label: "✍️ Content Generation",
prompt: "What kind of content can ONE automatically generate?"
},
{
label: "🚀 Quick Start",
prompt: "How can I deploy my first AI agent with ONE?"
},
{
label: "💼 Enterprise Features",
prompt: "What enterprise-level features does ONE offer?"
}
]
}
});
// Set the desired right panel mode
const rightPanelMode = 'quarter'; // You can change this to 'full', 'half', 'floating', or 'icon'
---
<Layout
title="ONE - AI Agents & Crypto Commerce Framework"
chatConfig={chatConfig}
rightPanelMode={rightPanelMode}
>
<section class="space-y-6 pb-8 pt-6 md:pb-12 md:pt-10 lg:py-32">
<div class="max-w-[64rem] flex flex-col items-center gap-6 text-center mx-auto">
<h1 class="font-heading text-3xl sm:text-5xl md:text-6xl lg:text-7xl">
Build <span class="text-blue-600">AI-Powered Businesses</span> For Free
</h1>
<div class="flex flex-col items-center gap-4 max-w-[800px]">
<p class="text-lg md:text-xl text-muted-foreground">
Create intelligent businesses with AI agents, automated content, and crypto payments.
Free forever, open-source, and enterprise-ready.
</p>
<div class="flex flex-wrap justify-center gap-3 text-sm md:text-base">
<span class="flex items-center gap-2 px-4 py-2 rounded-lg bg-primary/10 text-primary">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
24/7 AI Agents
</span>
<span class="flex items-center gap-2 px-4 py-2 rounded-lg bg-primary/10 text-primary">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
All Payments
</span>
<span class="flex items-center gap-2 px-4 py-2 rounded-lg bg-primary/10 text-primary">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
</svg>
Auto Content
</span>
<span class="flex items-center gap-2 px-4 py-2 rounded-lg bg-primary/10 text-primary">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
100% Free
</span>
</div>
<div class="text-sm text-muted-foreground mt-4">
Optional token-based features available for enterprise users
</div>
</div>
<div class="flex flex-wrap justify-center gap-4">
<a href="/download"
class="inline-flex items-center justify-center rounded-md bg-blue-600 text-white px-6 py-3 text-sm font-medium transition-colors hover:bg-blue-700">
<svg class="w-5 h-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
</svg>
Get Started Free
</a>
<a href="chat"
class="inline-flex items-center justify-center rounded-md border px-6 py-3 text-sm font-medium transition-colors hover:border-blue-600 hover:text-blue-600">
Try Live Demo
</a>
</div>
</div>
</section>
<!-- Core Benefits -->
<section class="py-16 bg-gradient-to-b from-primary/5 to-transparent">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
<div class="text-center p-6">
<div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
<svg class="w-6 h-6 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
</div>
<h3 class="text-lg font-semibold mb-2">100% Free Core</h3>
<p class="text-sm text-muted-foreground">
All essential features free forever. Build complete AI businesses without restrictions.
</p>
</div>
<div class="text-center p-6">
<div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
<svg class="w-6 h-6 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<h3 class="text-lg font-semibold mb-2">Production Ready</h3>
<p class="text-sm text-muted-foreground">
Enterprise-grade AI agents, payments, and content automation out of the box.
</p>
</div>
<div class="text-center p-6">
<div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
<svg class="w-6 h-6 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
</svg>
</div>
<h3 class="text-lg font-semibold mb-2">Optional Premium</h3>
<p class="text-sm text-muted-foreground">
Enhance with token-based features like white-labeling when you need them.
</p>
</div>
</div>
</div>
</section>
<section id="features" class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4">Free Enterprise-Grade Features</h2>
<p class="text-center text-muted-foreground max-w-2xl mx-auto mb-12">
All core features are completely free and open source. Build production-ready AI businesses without any costs.
</p>
<div class="grid md:grid-cols-3 gap-8">
<div class="p-6 rounded-lg border shadow-sm hover:shadow-md transition-shadow">
<div class="w-12 h-12 border rounded-lg flex items-center justify-center mb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
</div>
<h3 class="text-xl font-semibold mb-2">AI Agents</h3>
<div class="space-y-3">
<p class="text-muted-foreground">Free Features:</p>
<ul class="text-sm text-muted-foreground space-y-1">
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Sales & Support automation
</li>
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Content generation
</li>
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Basic customization
</li>
</ul>
</div>
</div>
<div class="p-6 rounded-lg border shadow-sm hover:shadow-md transition-shadow">
<div class="w-12 h-12 border rounded-lg flex items-center justify-center mb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<h3 class="text-xl font-semibold mb-2">All Payments</h3>
<div class="space-y-3">
<p class="text-muted-foreground">Free Features:</p>
<ul class="text-sm text-muted-foreground space-y-1">
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Crypto (BTC/ETH/SOL)
</li>
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>