frontend/
frontend/
React single-page app, routed and stored client-side.
The app boots the theme and the session, then splits into public routes (landing, login, signup, legal) and guarded routes inside the main layout. Every server call flows through a service module built on the shared axios factory; everything live flows through the socket service into Redux slices.
What it owns
- Route table: public landing/auth plus guarded app screens
- Redux store: one slice per feature area
- Service modules: one typed client per API area
- Socket client: rooms, chat events, presence, live notifications
Files
File list and purposes from the folder README.
| File | Purpose |
|---|---|
src/App.jsx | Routes, OAuth token pickup, theme, auth bootstrap. |
src/main.jsx | React bootstrap with store provider. |
src/pages/ | One screen per route. |
src/components/ | Shared UI, layout, and feature widgets. |
src/services/ | API clients plus the socket service. |
src/store/ | Store setup and nine slices. |
src/hooks/ | Swipe gesture hook. |
src/lib/ | Class merge helper. |
src/utils/ | Login redirect helper. |
Dependencies
| Library | Version range | Why it is used here |
|---|---|---|
| React | ^19.0.0 | All pages and components under src/. |
| React DOM | ^19.0.0 | Bootstrap in main.jsx. |
| React Router | ^7.5.3 | Route table and guards in App.jsx. |
| Radix Avatar | ^1.1.7 | Avatars in chat, posts, and profile components. |
| Radix Label | ^2.1.4 | Auth and profile forms. |
| Radix Scroll Area | ^1.2.6 | Chat and message lists. |
| Radix Slot | ^1.2.0 | The button primitive in src/components/ui/. |
| Tailwind Vite plugin | ^4.1.4 | Plugin entry in vite.config.js. |
| class-variance-authority | ^0.7.1 | Variant definitions in src/components/ui/. |
| clsx | ^2.1.1 | The cn helper in src/lib/utils.js. |
| Lucide | ^0.503.0 | Icons in pages like ChatPage and SignupPage. |
| prism-react-renderer | ^2.4.1 | Code blocks in components/posts/PostCard.jsx. |
| React Icons | ^5.5.0 | GitHub and LinkedIn marks on profile pages. |
| tailwind-merge | ^3.2.0 | The cn helper in src/lib/utils.js. |
| Tailwind CSS | ^4.1.4 | Classes in every component; theme tokens in CSS. |
| Redux Toolkit | ^2.7.0 | Store and nine slices in src/store/. |
| React Redux | ^9.2.0 | Hooks in pages plus the store provider in main.jsx. |
| Socket.io client | ^4.8.1 | Connection, rooms, and event wiring in services/socketService.js. |
| better-authDeclared but not used in source | ^1.6.23 | Declared in both manifests but never imported in any source file; authentication is JWT plus bcrypt. |
| axios | ^1.9.0 | Token-attaching factory in services/apiClient.js. |
| date-fns | ^4.1.0 | Date formatting in ChatPage. |
Development and tooling (11)
| Library | Version range | Why it is used here |
|---|---|---|
| @types/node | ^22.15.3 | Type declarations for Node.js built-ins. |
| @types/react | ^19.0.10 | Type declarations for React. |
| @types/react-dom | ^19.0.4 | Type declarations for React DOM. |
| Vite React plugin | ^4.3.4 | Plugin entry in vite.config.js. |
| Vite | ^6.3.1 | Dev, build, and preview scripts. |
| tw-animate-css | ^1.2.8 | Enter and transition classes in the stylesheet. |
| ESLint JS config | ^9.22.0 | Base rules in eslint.config.js. |
| ESLint | ^9.22.0 | Lint script and flat config in eslint.config.js. |
| eslint-plugin-react-hooks | ^5.2.0 | Hook rules in eslint.config.js. |
| eslint-plugin-react-refresh | ^0.4.19 | Refresh rules in eslint.config.js. |
| globals | ^16.0.0 | Browser and node globals in eslint.config.js. |
Dependencies as of commit cdef8af.
Laying out Frontend overview…
BrowserAPIRealtimeCacheDatabaseShareddurableephemeral
Talks to
Sources: frontend/src/App.jsx, frontend/src/main.jsx, frontend/vite.config.js (documented at commit cdef8af)