2025-04-22 10:39:32 +05:30
|
|
|
//TODO: research into having signatures somehow?
|
|
|
|
|
//TODO research: **each message sent should not be able to be spoofed**
|
|
|
|
|
/**
|
|
|
|
|
* Reference:
|
|
|
|
|
* https://www.notion.so/Logos-Forum-PoC-Waku-Powered-Opchan-1968f96fb65c8078b343c43429d66d0a#1968f96fb65c8025a929c2c9255a57c4
|
|
|
|
|
* Also note that for UX purposes, **we should not ask a user to sign with their Bitcoin wallet for every action.**
|
2025-08-30 18:34:50 +05:30
|
|
|
*
|
2025-04-22 10:39:32 +05:30
|
|
|
* Instead, a key delegation system should be developed.
|
2025-08-30 18:34:50 +05:30
|
|
|
*
|
2025-04-22 10:39:32 +05:30
|
|
|
* - User sign an in-browser key with their wallet and broadcast it
|
|
|
|
|
* - Browser uses in-browser key to sign messages moving forward
|
|
|
|
|
*/
|
2025-04-15 16:28:03 +05:30
|
|
|
|
2025-08-30 18:34:50 +05:30
|
|
|
import { Toaster } from '@/components/ui/toaster';
|
|
|
|
|
import { Toaster as Sonner } from '@/components/ui/sonner';
|
|
|
|
|
import { TooltipProvider } from '@/components/ui/tooltip';
|
|
|
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
|
|
|
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
|
|
|
import { AuthProvider } from '@/contexts/AuthContext';
|
|
|
|
|
import { ForumProvider } from '@/contexts/ForumContext';
|
2025-09-05 17:03:24 +05:30
|
|
|
import { ModerationProvider } from '@/contexts/ModerationContext';
|
2025-08-30 18:34:50 +05:30
|
|
|
import CellPage from './pages/CellPage';
|
|
|
|
|
import PostPage from './pages/PostPage';
|
|
|
|
|
import NotFound from './pages/NotFound';
|
|
|
|
|
import Dashboard from './pages/Dashboard';
|
|
|
|
|
import Index from './pages/Index';
|
2025-09-05 12:53:15 +05:30
|
|
|
import ProfilePage from './pages/ProfilePage';
|
2025-09-05 17:24:29 +05:30
|
|
|
import BookmarksPage from './pages/BookmarksPage';
|
2025-09-02 10:48:49 +05:30
|
|
|
import { appkitConfig } from './lib/wallet/config';
|
2025-08-30 18:34:50 +05:30
|
|
|
import { WagmiProvider } from 'wagmi';
|
2025-09-02 10:48:49 +05:30
|
|
|
import { config } from './lib/wallet/config';
|
2025-08-30 18:34:50 +05:30
|
|
|
import { AppKitProvider } from '@reown/appkit/react';
|
2025-04-15 16:28:03 +05:30
|
|
|
|
|
|
|
|
// Create a client
|
|
|
|
|
const queryClient = new QueryClient();
|
|
|
|
|
|
|
|
|
|
const App = () => (
|
2025-08-05 10:51:21 +05:30
|
|
|
<WagmiProvider config={config}>
|
|
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
|
<AppKitProvider {...appkitConfig}>
|
|
|
|
|
<Router>
|
|
|
|
|
<AuthProvider>
|
|
|
|
|
<ForumProvider>
|
2025-09-05 17:03:24 +05:30
|
|
|
<ModerationProvider>
|
|
|
|
|
<TooltipProvider>
|
|
|
|
|
<Toaster />
|
|
|
|
|
<Sonner />
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Dashboard />} />
|
|
|
|
|
<Route path="/cells" element={<Index />} />
|
|
|
|
|
<Route path="/cell/:cellId" element={<CellPage />} />
|
|
|
|
|
<Route path="/post/:postId" element={<PostPage />} />
|
|
|
|
|
<Route path="/profile" element={<ProfilePage />} />
|
2025-09-05 17:24:29 +05:30
|
|
|
<Route path="/bookmarks" element={<BookmarksPage />} />
|
2025-09-05 17:03:24 +05:30
|
|
|
<Route path="*" element={<NotFound />} />
|
|
|
|
|
</Routes>
|
|
|
|
|
</TooltipProvider>
|
|
|
|
|
</ModerationProvider>
|
2025-08-05 10:51:21 +05:30
|
|
|
</ForumProvider>
|
|
|
|
|
</AuthProvider>
|
|
|
|
|
</Router>
|
|
|
|
|
</AppKitProvider>
|
|
|
|
|
</QueryClientProvider>
|
|
|
|
|
</WagmiProvider>
|
2025-04-15 16:28:03 +05:30
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default App;
|