Skip to content

Commit 9a46045

Browse files
committed
add faq
1 parent c00275b commit 9a46045

File tree

5 files changed

+139
-0
lines changed

5 files changed

+139
-0
lines changed

apps/www/app/(home)/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Hero } from "@/components/ui/hero";
2+
import { GeneralFAQ } from "@/components/ui/general-faq";
23

34
export default function HomePage() {
45
return (
56
<main className="flex flex-1 flex-col">
67
<Hero />
8+
<GeneralFAQ />
79
</main>
810
);
911
}

apps/www/components/ui/accordion.tsx

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
5+
import { ChevronDown } from "lucide-react"
6+
7+
import { cn } from "@/lib/utils"
8+
9+
const Accordion = AccordionPrimitive.Root
10+
11+
const AccordionItem = React.forwardRef<
12+
React.ElementRef<typeof AccordionPrimitive.Item>,
13+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
14+
>(({ className, ...props }, ref) => (
15+
<AccordionPrimitive.Item
16+
ref={ref}
17+
className={cn("border-b", className)}
18+
{...props}
19+
/>
20+
))
21+
AccordionItem.displayName = "AccordionItem"
22+
23+
const AccordionTrigger = React.forwardRef<
24+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
25+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
26+
>(({ className, children, ...props }, ref) => (
27+
<AccordionPrimitive.Header className="flex">
28+
<AccordionPrimitive.Trigger
29+
ref={ref}
30+
className={cn(
31+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
32+
className
33+
)}
34+
{...props}
35+
>
36+
{children}
37+
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
38+
</AccordionPrimitive.Trigger>
39+
</AccordionPrimitive.Header>
40+
))
41+
AccordionTrigger.displayName = "AccordionTrigger"
42+
43+
const AccordionContent = React.forwardRef<
44+
React.ElementRef<typeof AccordionPrimitive.Content>,
45+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
46+
>(({ className, children, ...props }, ref) => (
47+
<AccordionPrimitive.Content
48+
ref={ref}
49+
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
50+
{...props}
51+
>
52+
<div className={cn("pb-4 pt-0", className)}>{children}</div>
53+
</AccordionPrimitive.Content>
54+
))
55+
AccordionContent.displayName = "AccordionContent"
56+
57+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
"use client";
2+
3+
import {
4+
Accordion,
5+
AccordionContent,
6+
AccordionItem,
7+
AccordionTrigger,
8+
} from "@/components/ui/accordion";
9+
import Link from "next/link";
10+
11+
const faqItems = [
12+
{
13+
question: "What is Amical?",
14+
answer: "Amical is an open-source speech-to-text application powered by Gen AI. It allows you to type 10x faster without using a keyboard, offering fast, accurate, context-aware, and private transcription."
15+
},
16+
{
17+
question: "How does Amical work?",
18+
answer: "Amical combines advanced speech-to-text AI models, such as Whisper, with a context-aware approach to deliver accurate real-time transcriptions. By processing your voice input and analyzing the context of the application you're using through local desktop APIs, it generates precise transcriptions that are seamlessly integrated across various applications."
19+
},
20+
{
21+
question: "Is Amical free to use?",
22+
answer: (
23+
<>
24+
Yes, Amical is completely free and open-source. You can find the source code on{" "}
25+
<Link
26+
href="https://github.com/amicalhq/amical"
27+
target="_blank"
28+
rel="noopener noreferrer"
29+
className="text-indigo-500 hover:underline"
30+
>
31+
GitHub
32+
</Link>
33+
.
34+
</>
35+
)
36+
},
37+
{
38+
question: "How accurate is the transcription?",
39+
answer: "Amical uses state-of-the-art AI models to provide highly accurate transcriptions. The accuracy is enhanced by context awareness and continuous learning from user interactions."
40+
},
41+
{
42+
question: "Is my data private?",
43+
answer: (
44+
<>
45+
Yes, Amical is 100% open-source and you can build and use the app directly from our{" "}
46+
<Link
47+
href="https://github.com/amicalhq/amical"
48+
target="_blank"
49+
rel="noopener noreferrer"
50+
className="text-indigo-500 hover:underline"
51+
>
52+
source repo
53+
</Link>
54+
. You can bring your own keys/AI models, including support for local models.
55+
</>
56+
)
57+
}
58+
];
59+
60+
export function GeneralFAQ() {
61+
return (
62+
<div className="w-full max-w-4xl mx-auto px-4 py-16">
63+
<h2 className="text-3xl font-bold text-center mb-8">Frequently Asked Questions</h2>
64+
<Accordion type="single" collapsible className="w-full">
65+
{faqItems.map((item, index) => (
66+
<AccordionItem key={index} value={`item-${index + 1}`}>
67+
<AccordionTrigger>{item.question}</AccordionTrigger>
68+
<AccordionContent className="text-gray-400">
69+
{item.answer}
70+
</AccordionContent>
71+
</AccordionItem>
72+
))}
73+
</Accordion>
74+
</div>
75+
);
76+
}

apps/www/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@next/third-parties": "^15.3.2",
14+
"@radix-ui/react-accordion": "^1.2.10",
1415
"@radix-ui/react-checkbox": "^1.3.1",
1516
"@radix-ui/react-dialog": "^1.1.13",
1617
"@radix-ui/react-label": "^2.1.6",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)