How sharvesh-g/ai-startup-builder works
Purpose and Entry Points
A React-based strategy analysis workspace for creating ventures/strategies, evaluating opportunities, modeling finances, compiling evidence, and exporting executive deliverables. Client startup is src/main.tsx, with top-level application composition in src/App.tsx; server.ts is the server-side entry point. The app is run locally through the Vite-based development flow indicated by vite.config.ts.
Application Shell and Navigation
The application shell coordinates the major workspaces and persistent navigation: src/App.tsx, src/components/Sidebar.tsx, and src/components/Header.tsx. View-level modules separate the product’s primary modes—home, dashboard, strategies, reports, history, settings, and exports—rather than exposing a single linear wizard. This makes the app a client-side operational console with workflow state shared at the application level.
Strategy Creation and Analysis Workflow
Venture/strategy input begins in onboarding and creation surfaces such as src/components/NewStrategyWizard.tsx, src/components/StartupForm.tsx, and src/components/NewVentureModal.tsx. Submitted business context feeds analysis-oriented views including src/components/AnalysisProgressView.tsx and src/components/AgentSupervisorProgress.tsx. The boundary is between user-provided assumptions/questions and generated or computed strategy artifacts.
Domain, Opportunity, and Quality Logic
Core business interpretation is concentrated in the library layer: src/lib/domainEngine.ts, src/lib/opportunityModel.ts, and src/lib/qualityGate.ts. These modules likely transform venture inputs into structured strategy assessments, opportunity scoring, and validation/readiness checks. Canonicalized strategy data in src/lib/canonicalStrategy.ts provides a stable internal representation for downstream views, reports, and exports.
Evidence, Agents, and AI Integration
Evidence and source traceability are represented by src/lib/evidenceRegistry.ts and displayed through src/components/CitationsList.tsx. Agent-oriented progress and user interaction are surfaced in src/components/AgentsView.tsx and src/components/CopilotChatPanel.tsx. The required GEMINI_API_KEY indicates Gemini is the material external AI service; server.ts is the likely trust boundary for API-backed operations, rather than exposing provider credentials directly from UI components.
Decision Views and Financial Outputs
Decision support is rendered as specialized presentation modules: src/components/CompetitorMatrix.tsx, src/components/RiskMatrixView.tsx, and src/components/FinancialDashboard.tsx. Financial calculations are isolated in src/lib/financialEngine.ts, separating computation from visualization. Additional views such as roadmap, personas, executive brief, and opportunity scorecards consume the strategy/analysis model to present distinct stakeholder-oriented outputs.
Persistence, History, and Export Boundary
Local strategy/history persistence is encapsulated by src/lib/historyStorage.ts and surfaced through src/components/HistorySidebar.tsx and src/components/HistoryView.tsx. Export is a separate finalization stage: src/components/ExportCenterView.tsx, src/lib/pdfGenerator.ts, and src/lib/pptGenerator.ts convert prepared report data into distributable formats. src/lib/professionalReportData.ts is the likely adapter that assembles canonical analysis into report-ready content.
Main entry points: canonicalStrategy.ts Canonical strategy · App.tsx Application shell · ExportCenterView.tsx Export center · server.ts Server entry
Components 22
Client workspace
- Client entry
src/main.tsx - Application shell · Owns shared workflow state and primary views.
src/App.tsx - Persistent navigation
src/components/Sidebar.tsx - Workspace header
src/components/Header.tsx - Strategy creation · Captures venture context and assumptions.
src/components/NewStrategyWizard.tsx - Analysis progress
src/components/AnalysisProgressView.tsx - Agents and copilot
src/components/AgentsView.tsx
Strategy analysis
- Canonical strategy · Stable representation used by downstream consumers.
src/lib/canonicalStrategy.ts - Domain engine
src/lib/domainEngine.ts - Opportunity model
src/lib/opportunityModel.ts - Quality gate
src/lib/qualityGate.ts - Evidence registry
src/lib/evidenceRegistry.ts - Financial engine
src/lib/financialEngine.ts - History storage
src/lib/historyStorage.ts
Decision outputs
- Decision dashboards · Competitor, risk, and financial decision views.
src/components/FinancialDashboard.tsx - Report data adapter
src/lib/professionalReportData.ts - Export center
src/components/ExportCenterView.tsx - PDF generator
src/lib/pdfGenerator.ts - PowerPoint generator
src/lib/pptGenerator.ts
Other components
- Vite dev flow
vite.config.ts - Server entry · Keeps Gemini API access outside the client.
server.ts - Gemini
Connections 23
- Vite dev flow → Client entry: runs
- Client entry → Application shell: mounts
- Application shell → Persistent navigation: renders
- Application shell → Workspace header: renders
- Application shell → Strategy creation: opens
- Strategy creation → Domain engine: submits context
- Domain engine → Opportunity model: structures assessment
- Opportunity model → Quality gate: evaluates
- Quality gate → Canonical strategy: validates
- Canonical strategy → Analysis progress: drives
- Canonical strategy → Evidence registry: links evidence
- Canonical strategy → Financial engine: supplies assumptions
- Canonical strategy → History storage: persists
- Canonical strategy → Decision dashboards: feeds
- Financial engine → Decision dashboards: provides metrics
- Canonical strategy → Report data adapter: assembles
- Evidence registry → Report data adapter: includes citations
- Report data adapter → Export center: prepares
- Export center → PDF generator: generates
- Export center → PowerPoint generator: generates
- Agents and copilot → Server entry: requests AI work
- Server entry → Gemini: uses API key
- Server entry → Evidence registry: returns sourced results