How antony-jacob817/echoweave works
1. Repository shape
- EchoWeave is a TypeScript frontend app with a small serverless/API layer.
- The main client is built with Vite/Bun and organized around TanStack Router route files under src/routes.
- The repo also includes Cloudflare-style deployment config (wrangler.jsonc) and two API handlers in api/.
2. Primary user-facing surfaces
- There are two major app areas: a public marketing site and an authenticated dashboard.
- Public pages are composed from src/components/landing/* plus shared header/footer/navigation.
- The authenticated area centers on src/routes/dashboard.tsx and dashboard-specific components like MindMap and VoiceRecorder.
3. Routing and page composition
- Routing is file-based/route-generated, with src/routeTree.gen.ts and src/router.tsx wiring the app shell.
- src/routes/__root.tsx likely provides the top-level layout and providers.
- login.tsx, signup.tsx, index.tsx, and dashboard.tsx define the main entry points and page boundaries.
4. Authentication boundary
- Auth concerns are isolated in src/lib/auth.tsx, src/services/authService.ts, and src/store/useAuthStore.ts.
- src/components/auth/ProtectedRoute.tsx guards the dashboard boundary.
- AuthLayout.tsx and SocialButtons.tsx indicate a dedicated auth flow for login/signup, with social sign-in supported through Supabase.
5. Data/backend dependency
- Supabase is the primary external backend dependency, surfaced through src/lib/supabase.ts and typed in src/types/supabase.ts.
- The app appears to rely on Supabase for authentication and likely user/session persistence, rather than a custom backend in this repo.
6. Core product workflow
- The dashboard seems to support recording a voice note, processing it into AI-generated outputs, and presenting a mind map.
- VoiceRecorder.tsx is the capture/input boundary.
- MindMap.tsx is the visualization/output boundary.
- This suggests a pipeline from user speech input to structured insight/mind-map generation.
7. Service layer and orchestration
- Business logic is separated from components in src/services/*.
- voiceNoteService.ts, projectService.ts, and mindmapService.ts likely coordinate persistence and transformation of user content.
- aiService.ts is the abstraction point for model-backed generation, keeping AI calls out of UI components.
8. Serverless AI endpoints
- api/generateInsight.ts and api/generateMindmap.ts are the backend generation endpoints.
- These are the key integration points for AI inference or prompt-based transformation.
- The frontend service layer likely calls these endpoints to turn recordings or notes into structured insight and mind map data.
9. Client state management
- Local app state is split into focused stores under src/store.
- useAuthStore.ts tracks session/auth state.
- useProjectStore.ts likely tracks project/session content and generated artifacts.
- useRecordingStore.ts handles recorder state and audio capture lifecycle.
10. Shared UI system
- Most primitives come from a component library under src/components/ui, matching a shadcn-style design system.
- This provides reusable building blocks such as dialogs, forms, tables, tabs, tooltips, and sidebars.
- Higher-level app components are composed on top of these primitives, keeping visual and behavioral concerns separated.
11. Landing/marketing subsystem
- The landing page is broken into sections: Hero, Features, HowItWorks, Testimonials, Pricing, and FinalCTA.
- These components indicate a conversion-oriented public funnel before authentication.
- Navbar, Logo, and Footer provide shared branding/navigation across the public site.
12. Error handling and environment
- src/lib/error-capture.ts and src/lib/error-page.ts suggest centralized error reporting and fallback UI.
- src/server.ts and src/start.ts indicate a runtime entry structure beyond just static client rendering.
- public/ and src/styles.css contain the static assets and global presentation layer.
13. Architecture boundaries to show in a diagram
- Boundary 1: public marketing pages vs authenticated dashboard.
- Boundary 2: UI components vs service logic vs state stores.
- Boundary 3: client app vs external Supabase auth/backend.
- Boundary 4: client app vs serverless AI endpoints in api/.
14. Operational/deployment model
- The repo is set up for modern TypeScript frontend delivery with Bun/npm tooling, Vite bundling, and Cloudflare-compatible deployment.
- wrangler.jsonc and bun.lock are the strongest signals of the execution/deploy target and package/runtime choices.
Main entry points: aiService.ts Services · AuthLayout.tsx Auth UI · button.tsx UI kit · VoiceRecorder.tsx Dashboard UI
Components 21
Public site
Marketing pages and shared public-facing chrome.
- Home page · Public entry page for the marketing funnel.
src/routes/index.tsx - Public chrome · Shared header, logo, and footer used across marketing pages.
src/components/Navbar.tsx - Landing sections · Hero, features, how-it-works, testimonials, pricing, and CTA sections.
src/components/landing/Hero.tsx
Auth boundary
Login, signup, and route protection for authenticated access.
- Login page · Authentication entry for existing users.
src/routes/login.tsx - Signup page · Registration entry for new users.
src/routes/signup.tsx - Auth UI · Auth layout, social sign-in, and protected route guard.
src/components/auth/AuthLayout.tsx
Dashboard
Voice capture and generated mind map workflow.
- Dashboard page · Authenticated product workspace entry.
src/routes/dashboard.tsx - Dashboard UI · Voice recorder and mind map presentation components.
src/components/dashboard/VoiceRecorder.tsx
App core
Routing, providers, services, state, and shared libraries.
- Root layout · Top-level route layout and app-wide providers.
src/routes/__root.tsx - Router · Router setup and generated route tree integration.
src/router.tsx - Route tree · File-based route manifest generated from route files.
src/routeTree.gen.ts - UI kit · Reusable primitive component library used throughout the app.
src/components/ui/button.tsx - Auth layer · Supabase-backed auth helpers and session plumbing.
src/lib/auth.tsx - Client state · Focused app stores for auth, projects, and recording lifecycle.
src/store/useAuthStore.ts - Services · Orchestration layer for auth, voice notes, projects, AI, and mind maps.
src/services/aiService.ts
Backend edge
Serverless AI handlers and deployment/runtime entrypoints.
- Insight API · Endpoint that generates structured insights from user content.
api/generateInsight.ts - Mindmap API · Endpoint that generates mind map structures for the dashboard.
api/generateMindmap.ts - Runtime entry · Application startup and server-side runtime hooks.
src/start.ts - Server bridge · Server-facing entry used alongside the client app.
src/server.ts - Deployment · Cloudflare-compatible deployment configuration.
wrangler.jsonc
Other components
- Supabase · Primary authentication and backend dependency.
src/lib/supabase.ts
Connections 22
- Router → Route tree: loads · Router consumes the generated route manifest.
- Root layout → Router: hosts · Root layout wraps the routed app shell.
- Home page → Public chrome: uses · Public page composes shared branding/navigation.
- Home page → Landing sections: renders · Landing page is built from marketing sections.
- Login page → Auth UI: uses · Login flow is wrapped by auth-specific UI.
- Signup page → Auth UI: uses · Signup flow is wrapped by auth-specific UI.
- Dashboard page → Auth UI: guards · Dashboard access is protected by auth boundary components.
- Dashboard page → Dashboard UI: renders · Dashboard page centers on capture and visualization UI.
- Auth UI → Auth layer: checks · Auth boundary consults auth helpers and session state.
- Auth layer → Supabase: integrates · Authentication is backed by Supabase.
- Client state → Auth layer: stores · Stores persist auth/session state.
- Client state → Services: drives · Stores coordinate app content and workflow state.
- Services → Insight API: calls · Service layer invokes insight generation endpoint.
- Services → Mindmap API: calls · Service layer invokes mind map generation endpoint.
- Services → Supabase: persists · Services rely on Supabase for backend data and auth context.
- Dashboard UI → Services: requests · Recorder and mind map UI depend on orchestration services.
- Public chrome → UI kit: composes · Shared chrome is assembled from UI primitives.
- Landing sections → UI kit: composes · Landing sections are built on the common UI kit.
- Auth UI → UI kit: composes · Auth screens use the shared component library.
- Dashboard UI → UI kit: composes · Dashboard visuals are built from shared primitives.
- Server bridge → Runtime entry: boots · Server entry hooks into runtime startup.
- Server bridge → Deployment: targets · Deployment config defines the runtime environment.