Skip to content

Commit a67c2f0

Browse files
authored
Merge pull request #347 from Nacho1499/feat/CLI-tool
feat: Implement interactive SDK CLI for developer testing
2 parents be58d30 + 7a894b1 commit a67c2f0

33 files changed

Lines changed: 748 additions & 10666 deletions

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package-lock.json
2-
.claude/
3-
CLAUDE.md
4-
sdk/docs/
1+
node_modules/
2+
dist/
3+
.env
4+
*.log

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"lucide-react": "^0.544.0",
2525
"react": "^19.2.0",
2626
"react-dom": "^19.2.0",
27-
"react-router-dom": "^7.9.2",
27+
"react-router-dom": "^7.13.2",
2828
"recharts": "^3.8.1",
2929
"sonner": "^2.0.7",
3030
"swiper": "^11.2.10",

client/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Transparency from "./pages/Transparency";
1010
import Settings from "./pages/Settings";
1111
import RafflePage from "./pages/RafflePage";
1212
import OracleAdmin from "./pages/OracleAdmin";
13-
13+
import FAQPage from './pages/FAQ/FAQPage'; // Imported FAQ
1414
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
1515
import RaffleDetails from "./pages/RaffleDetails";
1616
import Support from "./pages/Support";
@@ -57,6 +57,8 @@ function App() {
5757
<Route path="settings" element={<Settings />} />
5858
<Route path="support" element={<Support />} />
5959
<Route path="transparency" element={<Transparency />} />
60+
{/* Issue #192: FAQ Route Added Here */}
61+
<Route path="faq" element={<FAQPage />} />
6062
<Route path="admin/oracle" element={<OracleAdmin />} />
6163
</Route>
6264
</Routes>

client/src/components/landing/Footer.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ const Footer = () => {
113113
Community
114114
</a>
115115
</li>
116+
<li >
117+
<a href="/faq" className="hover:text-white">
118+
FAQ
119+
</a>
120+
</li>
116121
</ul>
117122
</nav>
118123

client/src/pages/FAQ/FAQContent.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export const faqData = [
2+
{
3+
id: "how-to-buy",
4+
question: "How do I buy a ticket?",
5+
answer: "To buy a ticket, connect your Stellar-compatible wallet (like Albedo or Rabbit), select the lottery you wish to enter, and click 'Purchase'. You will need a small amount of XLM for the transaction fee."
6+
},
7+
{
8+
id: "how-to-create",
9+
question: "How do I create a lottery?",
10+
answer: "Navigate to the 'Create' dashboard. Fill in the prize pool details, ticket price, and end date. Once submitted, you will sign a transaction to deploy the Soroban smart contract."
11+
},
12+
{
13+
id: "what-is-vrf",
14+
question: "What is VRF?",
15+
answer: "VRF stands for Verifiable Random Function. It is a cryptographic primitive used to ensure that the winner selection process is 100% fair, transparent, and cannot be manipulated by the developers or other users."
16+
},
17+
{
18+
id: "wallet-support",
19+
question: "Which wallets are supported?",
20+
answer: "Currently, we support Albedo, Freighter, and any wallet compatible with the Stellar wallet-connect standard."
21+
}
22+
];

client/src/pages/FAQ/FAQPage.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import React, { useState } from 'react';
2+
import { faqData } from './FAQContent';
3+
4+
const FAQItem = ({ question, answer, id }: { question: string, answer: string, id: string }) => {
5+
const [isOpen, setIsOpen] = useState(false);
6+
7+
return (
8+
<div className="border-b border-gray-200 dark:border-gray-700">
9+
<h3>
10+
<button
11+
type="button"
12+
id={`accordion-control-${id}`}
13+
aria-expanded={isOpen}
14+
aria-controls={`accordion-section-${id}`}
15+
onClick={() => setIsOpen(!isOpen)}
16+
className="flex w-full items-center justify-between py-5 text-left font-medium text-gray-900 dark:text-white transition-all hover:text-blue-600"
17+
>
18+
<span>{question}</span>
19+
<svg
20+
className={`w-4 h-4 shrink-0 transition-transform ${isOpen ? 'rotate-180' : ''}`}
21+
fill="none"
22+
viewBox="0 0 24 24"
23+
stroke="currentColor"
24+
>
25+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
26+
</svg>
27+
</button>
28+
</h3>
29+
<div
30+
id={`accordion-section-${id}`}
31+
role="region"
32+
aria-labelledby={`accordion-control-${id}`}
33+
className={`overflow-hidden transition-all duration-300 ${isOpen ? 'max-h-96 pb-5' : 'max-h-0'}`}
34+
>
35+
<p className="text-gray-600 dark:text-gray-400 leading-relaxed">
36+
{answer}
37+
</p>
38+
</div>
39+
</div>
40+
);
41+
};
42+
43+
const FAQPage = () => {
44+
return (
45+
<div className="max-w-3xl mx-auto px-4 py-12">
46+
<header className="mb-12 text-center">
47+
<h1 className="text-4xl font-bold text-gray-900 dark:text-white mb-4">Help & FAQ</h1>
48+
<p className="text-lg text-gray-600 dark:text-gray-400">
49+
Everything you need to know about Tikka and the Stellar ecosystem.
50+
</p>
51+
</header>
52+
53+
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 p-6 md:p-8">
54+
{faqData.map((item) => (
55+
<FAQItem key={item.id} {...item} />
56+
))}
57+
</div>
58+
59+
<footer className="mt-12 text-center text-sm text-gray-500">
60+
Still have questions? <a href="mailto:support@tikka.com" className="text-blue-600 hover:underline">Contact Support</a>
61+
</footer>
62+
</div>
63+
);
64+
};
65+
66+
export default FAQPage;

client/tsconfig.app.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,35 @@
1010
],
1111
"module": "ESNext",
1212
"skipLibCheck": true,
13+
1314
/* Bundler mode */
1415
"moduleResolution": "bundler",
1516
"allowImportingTsExtensions": true,
1617
"verbatimModuleSyntax": true,
1718
"moduleDetection": "force",
1819
"noEmit": true,
1920
"jsx": "react-jsx",
21+
2022
/* Linting */
2123
"strict": true,
2224
"noUnusedLocals": true,
2325
"noUnusedParameters": true,
2426
"erasableSyntaxOnly": true,
2527
"noFallthroughCasesInSwitch": true,
2628
"noUncheckedSideEffectImports": true,
29+
30+
/* RELEVANT FIXES BELOW */
31+
"allowSyntheticDefaultImports": true,
32+
"esModuleInterop": true,
2733
"types": [
28-
"vite/client"
34+
"vite/client",
35+
"node"
2936
]
37+
3038
},
3139
"include": [
32-
"src"
40+
"src",
41+
"src/**/*.ts",
42+
"src/**/*.tsx"
3343
]
3444
}

0 commit comments

Comments
 (0)