How blackstocks/xelleratesai works
1. Purpose and principal workflow
Xellerates is a Next.js investment-readiness platform for startups, investors, and administrators, with fundraising, dealflow, portfolio, document, vault, reporting, and operational-workspace screens. A browser-based investor, startup user, or administrator initiates the principal workflow by requesting the web application; Next.js renders the root shell, establishes authenticated session state, and serves the selected dashboard or account route. Separately, an HTTP client can submit investor task-board data for an AI-generated task summary.
2. Components
Application composition and identity
• Browser-based platform user — Path: none. External startup, investor, or administrator who opens account and dashboard routes.
• Next.js App Router runtime — Path: none. External framework runtime that serves the filesystem-defined application and API routes.
• Root Application Shell — Path: app/layout.js. Globally loads styles, metadata identifying Xellerates as an investment-readiness platform, theme/auth providers, and toast rendering.
• Theme State Provider — Path: app/theme-provider.jsx. Provides the root-level visual-theme layer imported by the application shell; implementation was not sampled.
• Authentication Session Manager — Path: context/AuthContext.jsx. Maintains client user/loading/error state, signs users in and out through Supabase, rejects unapproved profiles, and persists session tokens in cookies.
• Supabase Client Adapter — Path: lib/supabaseclient.js. Creates the browser Supabase client from public environment credentials with persistent session and token refresh enabled.
• Supabase Auth and Profile Service — Path: none. External Supabase capability used for authentication and the profiles approval-status lookup.
• Browser Cookie Store — Path: none. External browser state used to persist/remove access, refresh, and legacy pitch-deck tokens.
• Account and onboarding routes — Path: app/(auth). Route group contains login, registration, password recovery/update, lock-screen, and investor-form screens.
Dashboard navigation and investment operations
• Dashboard Route Shell — Path: app/(dashboard)/layout.js. Layout boundary for all dashboard routes; its rendered composition was not included in the sample.
• Dashboard Chrome — Path: components/partials/header/index.jsx. Header assembles responsive navigation controls, theme switching, notifications, blog/task labels, profile access, and the search modal.
• Local Header Search — Path: components/partials/header/Tools/SearchModal.jsx. Provides a modal combobox with animated investment-tool placeholders, but filters only a hard-coded list and does not perform repository-backed search.
• Investment Dashboard — Path: app/(dashboard)/dashboard/page.jsx. Dashboard route with adjacent financial-data extraction scripts, suggesting a financial overview/extraction workspace; page behavior was not sampled.
• Fundraising Workspace — Path: app/(dashboard)/tools/fundraising. Route subsystem for fundraising, including separate debt and equity flows and investor subroutes.
• Curated Dealflow Workspace — Path: app/(dashboard)/tools/curated-dealflow. Route subsystem for curated investment dealflow.
• Portfolio Management Workspace — Path: app/(dashboard)/tools/portfolio-management/page.jsx. Investor-facing portfolio-management route.
• Document Management Workspace — Path: app/(dashboard)/tools/document-management. Route subsystem for document management, including an identifier-based detail route.
• Investment Vault — Path: app/(dashboard)/vault. Folder-oriented vault routes, including a dynamic folder-name view.
• Administrative Operations Console — Path: app/(dashboard)/admin. Administration route subsystem for startups, investors, startup documents, fundraising interest, hot deals, meetings, wallets, revenue, blogs, and role-specific tools.
• Reporting Workspace — Path: app/(dashboard)/report/page.jsx. Dedicated dashboard reporting route.
Collaborative work and client state
• Operational Work Apps — Path: app/(dashboard)/(app). Route group for calendar, chat, email, kanban, projects, and todo interfaces.
• Selected Document State — Path: context/DocumentContext.jsx. Exposes React context for an in-memory selected-document array and setter; no provider placement or consumer was sampled.
• Redux Application Store — Path: store/index.js. Configures a Redux Toolkit store around an unprovided root reducer, with serializability checking disabled; provider wiring and state domains were not sampled.
AI task summarization
• Task Summary API — Path: pages/api/generateTaskSummary.js. POST endpoint serializing submitted kanban-style columns and tasks into a constrained prompt, calling Gemini Flash, and returning a JSON summary or HTTP error.
• Task-summary HTTP Client — Path: none. External/unknown caller expected by the API endpoint to POST a tasks payload.
• Google Gemini Generative AI — Path: none. External model service invoked with gemini-1.5-flash and a task-summarizer system instruction.
3. Relationships
• Browser-based platform user -> Next.js App Router runtime: requests web routes; browser initiation and the repository’s Next.js application structure establish this entry flow.
• Next.js App Router runtime -> Root Application Shell: renders the root layout for application routes; the root layout is the App Router global layout entry.
• Root Application Shell -> Theme State Provider: wraps all rendered children in theme state; direct import and JSX composition.
• Root Application Shell -> Authentication Session Manager: wraps all rendered children in authentication state; direct import and JSX composition.
• Root Application Shell -> Account and onboarding routes: renders selected account-route children; root children composition plus route hierarchy.
• Root Application Shell -> Dashboard Route Shell: renders selected dashboard-route children; root children composition plus nested dashboard layout hierarchy.
• Dashboard Route Shell -> Investment Dashboard: hosts this selected dashboard route; App Router nesting establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Fundraising Workspace: hosts this selected tool route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Curated Dealflow Workspace: hosts this selected tool route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Portfolio Management Workspace: hosts this selected tool route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Document Management Workspace: hosts this selected tool route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Investment Vault: hosts this selected vault route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Administrative Operations Console: hosts this selected administration route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Route Shell -> Reporting Workspace: hosts this selected reporting route; route hierarchy establishes it as an alternative dashboard destination.
• Dashboard Chrome -> Local Header Search: embeds the search modal; direct import and JSX use.
• Authentication Session Manager -> Supabase Client Adapter: invokes the exported client for user retrieval, auth-state subscription, password login/logout, and profile lookup; direct import.
• Supabase Client Adapter -> Supabase Auth and Profile Service: creates the SDK client used for authentication and database access; createClient construction.
• Authentication Session Manager -> Browser Cookie Store: writes/removes access and refresh tokens around auth-state changes and login/logout; direct cookie calls.
• Task-summary HTTP Client -> Task Summary API: submits POST task data; endpoint explicitly accepts POST and reads req.body.tasks.
• Task Summary API -> Google Gemini Generative AI: sends the constructed task prompt to Gemini Flash; direct SDK model creation and generateContent call.
• Task Summary API -> Task-summary HTTP Client: returns {summary} on success or HTTP errors on failure/method rejection; direct response calls.
4. Coverage limits
The sampled source does not establish the contents of most route pages, dashboard-layout composition, authorization middleware, Supabase table schemas beyond profiles, actual document upload/storage behavior, Redux reducers/provider wiring, or a frontend call site connecting the kanban UI to the task-summary API. The repository tree shows many additional template-style UI, chart, form, map, email, and widget screens, but their product use and data integrations cannot be confirmed from the excerpts.
Main entry points: (dashboard)/layout.js Dashboard Route Shell · app/layout.js Root Application Shell · AuthContext.jsx Authentication Session Manager · generateTaskSummary.js Task Summary API
Components 24
Application Identity
Application shell, authentication, and account access.
- Root Application Shell
app/layout.js - Theme State Provider
app/theme-provider.jsx - Authentication Session Manager
context/AuthContext.jsx - Supabase Client Adapter
lib/supabaseclient.js - Account and Onboarding Routes
app/(auth)
Dashboard Operations
Dashboard navigation and investment workflows.
- Dashboard Route Shell
app/(dashboard)/layout.js - Dashboard Chrome
components/partials/header/index.jsx - Local Header Search
components/partials/header/Tools/SearchModal.jsx - Investment Dashboard
app/(dashboard)/dashboard/page.jsx - Fundraising Workspace
app/(dashboard)/tools/fundraising - Curated Dealflow Workspace
app/(dashboard)/tools/curated-dealflow - Portfolio Management Workspace
app/(dashboard)/tools/portfolio-management/page.jsx - Document Management Workspace
app/(dashboard)/tools/document-management - Investment Vault
app/(dashboard)/vault - Administrative Operations Console
app/(dashboard)/admin - Reporting Workspace
app/(dashboard)/report/page.jsx
AI Task Summarization
Task summary API and model integration.
- Task Summary API
pages/api/generateTaskSummary.js
External Services
Browser, Supabase, and Gemini dependencies.
- Platform User · Startup, investor, or administrator using the browser platform.
- Next.js App Router · Serves filesystem-defined application and API routes.
- Supabase Auth and Profile Service · Provides authentication and profiles approval-status lookup.
- Browser Cookie Store · Persists and removes authentication tokens.
- Task-summary HTTP Client · Caller that submits kanban task data.
- Google Gemini Generative AI · Gemini 1.5 Flash task summarization service.
Connections 21
- Platform User → Next.js App Router: requests routes · Browser initiation of web routes.
- Next.js App Router → Root Application Shell: renders shell · Global App Router layout entry.
- Root Application Shell → Theme State Provider: wraps children · Direct theme provider composition.
- Root Application Shell → Authentication Session Manager: wraps children · Direct authentication provider composition.
- Root Application Shell → Account and Onboarding Routes: renders account routes · Root children composition and route hierarchy.
- Root Application Shell → Dashboard Route Shell: renders dashboard routes · Root children composition and nested dashboard layout hierarchy.
- Dashboard Route Shell → Investment Dashboard: hosts dashboard · Alternative dashboard destination.
- Dashboard Route Shell → Fundraising Workspace: hosts fundraising · Alternative dashboard destination.
- Dashboard Route Shell → Curated Dealflow Workspace: hosts dealflow · Alternative dashboard destination.
- Dashboard Route Shell → Portfolio Management Workspace: hosts portfolio · Alternative dashboard destination.
- Dashboard Route Shell → Document Management Workspace: hosts documents · Alternative dashboard destination.
- Dashboard Route Shell → Investment Vault: hosts vault · Alternative dashboard destination.
- Dashboard Route Shell → Administrative Operations Console: hosts administration · Alternative dashboard destination.
- Dashboard Route Shell → Reporting Workspace: hosts reporting · Alternative dashboard destination.
- Dashboard Chrome → Local Header Search: embeds search · Direct import and JSX use.
- Authentication Session Manager → Supabase Client Adapter: invokes client · User retrieval, auth state, login/logout, and profile lookup.
- Supabase Client Adapter → Supabase Auth and Profile Service: creates SDK client · SDK client for authentication and database access.
- Authentication Session Manager → Browser Cookie Store: stores tokens · Writes and removes access and refresh tokens.
- Task-summary HTTP Client → Task Summary API: submits task data · POST request containing a tasks payload.
- Task Summary API → Google Gemini Generative AI: generates summary · Sends the constructed prompt to Gemini Flash.
- Task Summary API → Task-summary HTTP Client: returns summary · Returns summary JSON or HTTP errors.