diff --git a/app/FAQ/page.tsx b/app/FAQ/page.tsx new file mode 100644 index 000000000..19ae48c52 --- /dev/null +++ b/app/FAQ/page.tsx @@ -0,0 +1,170 @@ +'use client'; + +import { useState } from 'react'; +import { useTranslation } from '@/context/TranslationContext'; +import Link from 'next/link'; + +interface FAQItem { + question: string; + answer: string; +} + +export default function FAQ() { + const { t } = useTranslation(); + const [openIndex, setOpenIndex] = useState(null); + + const toggleFAQ = (index: number) => { + setOpenIndex(openIndex === index ? null : index); + }; + + const faqs: FAQItem[] = [ + { + question: t('faq.q1') || 'What is CommitPulse?', + answer: + t('faq.a1') || + 'CommitPulse is an intelligent AI-powered commit message generator that helps developers write clear, consistent, and professional commit messages following conventional commit standards.', + }, + { + question: t('faq.q2') || 'How does CommitPulse work?', + answer: + t('faq.a2') || + 'Simply paste your code changes or describe what you did, and our AI will generate multiple high-quality commit message options for you instantly.', + }, + { + question: t('faq.q3') || 'Is CommitPulse free to use?', + answer: + t('faq.a3') || + 'Yes! CommitPulse is completely free for personal and commercial use. We also offer optional premium features for power users in the future.', + }, + { + question: t('faq.q4') || 'What commit conventions does it support?', + answer: + t('faq.a4') || + 'We primarily follow the Conventional Commits specification (feat, fix, docs, style, refactor, perf, test, build, ci, chore, etc.) and also support Angular, Semantic Versioning, and Gitmoji conventions.', + }, + { + question: t('faq.q5') || 'Can I customize the generated messages?', + answer: + t('faq.a5') || + 'Absolutely! Go to the Customization page to set your preferred commit style, tone, emoji usage, length preferences, and more.', + }, + { + question: t('faq.q6') || 'Does it support multiple languages?', + answer: + t('faq.a6') || + 'Yes. CommitPulse supports commit messages in many languages including English, Spanish, French, German, Hindi, Portuguese, Chinese, and more.', + }, + { + question: t('faq.q7') || 'How accurate is the AI?', + answer: + t('faq.a7') || + 'Our AI is trained specifically on thousands of high-quality commits from popular open-source repositories. It produces context-aware, professional messages with very high accuracy.', + }, + { + question: t('faq.q8') || 'Can I use CommitPulse with VS Code?', + answer: + t('faq.a8') || + 'Yes! We provide a VS Code extension that brings CommitPulse directly into your editor. You can also copy messages and use them anywhere.', + }, + { + question: t('faq.q9') || 'Is my code/data private?', + answer: + t('faq.a9') || + 'Yes. We do not store your code or commit messages. Everything is processed securely and deleted immediately after generation.', + }, + { + question: t('faq.q10') || 'How can I contribute to the project?', + answer: + t('faq.a10') || + 'We welcome contributions! Check out our GitHub repository for issues, feature requests, and contribution guidelines.', + }, + ]; + + return ( +
+
+ {/* Header */} +
+

+ {t('faq.title') || 'Frequently Asked Questions'} +

+

+ {t('faq.subtitle') || 'Everything you need to know about CommitPulse'} +

+
+ + {/* FAQ Accordion */} +
+ {faqs.map((faq, index) => ( +
+ + +
+
+ {faq.answer} +
+
+
+ ))} +
+ + {/* Still have questions? */} +
+

+ {t('faq.still_question') || 'Still have questions?'} +

+

+ {t('faq.contact_us') || 'Our team is happy to help you.'} +

+ +
+ + Open GitHub Issue + + + + Join Discord Community + +
+
+ + {/* Back to Home */} +
+ + ← Back to Home + +
+
+
+ ); +} diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx index 42a23cab9..3d777f55b 100644 --- a/app/components/Footer.tsx +++ b/app/components/Footer.tsx @@ -67,6 +67,7 @@ export function Footer() { { label: t('footer.generator'), href: '/generator', isExternal: false }, { label: t('footer.compare'), href: '/compare', isExternal: false }, { label: t('footer.customization'), href: '/customize', isExternal: false }, + { label: t('footer.faq'), href: '/faq', isExternal: false }, { label: t('footer.contributors'), href: '/contributors', isExternal: false }, ]; @@ -128,7 +129,6 @@ export function Footer() { {/* Navigation Section */} -

{t('footer.navigation')} @@ -148,7 +148,6 @@ export function Footer() {

{/* Resources Section */} -

{t('footer.resources')} @@ -168,7 +167,6 @@ export function Footer() {

{/* Connect Section */} -

{t('footer.connect')} diff --git a/locales/en.json b/locales/en.json index 9f80e1218..f399a6edf 100644 --- a/locales/en.json +++ b/locales/en.json @@ -30,7 +30,8 @@ "discord": "Discord", "twitter": "Twitter", "linkedin": "LinkedIn", - "generator": "Generator" + "generator": "Generator", + "faq": "FAQ" }, "landing": { "empty_username_warning": "Please enter a GitHub username to copy your badge link.",