Skip to content

codewithsupra/founder-os

Repository files navigation

FounderOS

FounderOS

The AI-powered operating system for startup founders.

Live Demo License: MIT Next.js TypeScript GPT-4o Stripe

Think Notion + Linear + ChatGPT — purpose-built for founders who move fast.

Live Demo · Report Bug · Request Feature


Demo

30-second walkthrough — AI Chief of Staff, task management, KPI tracking, competitor intel, and Stripe billing all in one workspace.

Watch the FounderOS Demo

What the demo shows:

  1. Creating a project and setting stage/goals
  2. AI Chief of Staff responding with context-aware, memory-grounded advice
  3. Task board + AI Priority engine surfacing the top 5 leverage tasks
  4. KPI dashboard with Recharts trend lines
  5. Competitor Intel + AI gap analysis
  6. Stripe billing — plan selection and upgrade flow

What Is FounderOS?

FounderOS is a full-stack SaaS application that gives startup founders a single, context-aware workspace to run their company. Instead of context-switching between a task manager, a spreadsheet, a chat interface, and a dozen other tabs, founders get one system that knows their project, tracks their KPIs, watches their competitors, and acts as an always-on AI Chief of Staff.

The AI layer is not a generic chatbot. Every prompt is injected with the founder's actual project context — active tasks, current metrics, competitor updates, growth experiments, past decisions, and the last weekly review — so every response is specific, actionable, and grounded in reality. The system also maintains a Founder Memory store that auto-captures decisions, milestones, and pivots from user actions throughout the app, then ranks them by relevance and injects the top-10 into every AI conversation.


Features

🤖 AI Chief of Staff

A streaming chat interface backed by GPT-4o via OpenRouter. Every conversation is hydrated with the full project context window: tasks, KPIs, competitors, active experiments, weekly reviews, and the top-10 ranked founder memories. The AI always ends with three concrete, time-bound action items. Conversation history is persisted to PostgreSQL and displayed in a sidebar for continuity across sessions.

🧠 Founder Memory System

Automatically captures decisions, milestones, pivots, wins, goals, and lessons from user actions throughout the app. Memories are ranked by a relevance score and the top-10 are injected into every AI prompt. The system also detects explicit agreement phrases in chat ("let's do it", "agreed", "sounds good") and auto-saves the corresponding AI recommendation as a decision memory — creating a persistent, queryable record of how the company evolved over time.

✅ Task Management

Full CRUD task board with list and board views. Tasks carry status (todo, in_progress, done, blocked), priority (low, medium, high, critical), category (product, marketing, sales, ops, engineering), and due dates. The AI Priority engine analyzes the current backlog and suggests the five highest-leverage tasks to work on next — tagged with category and priority, insertable in one click. Completing a task automatically saves a milestone memory.

📊 KPI Tracking

Log any metric by name and date. The dashboard KPI widget deduplicates by metric name to show the latest value for each tracked KPI, with week-over-week comparison. The AI roadmap engine generates a forward-looking product roadmap grounded in current metrics and project stage. Recharts renders trend lines across time.

🕵️ Competitor Intel

Track competitors with full profiles: description, pricing notes, strengths, and weaknesses. Log updates by type (pricing, feature, launch, news) with source URLs. The AI competitor analysis endpoint sends the full dataset to GPT-4o and returns a structured breakdown — market gaps to exploit, threats to watch, and near-term opportunities — rendered in a dedicated analysis card.

🧪 Growth Lab

Channel-specific growth experiments with a full status lifecycle: idea → running → completed / failed. Each experiment carries a goal, estimated cost, expected outcome, and success metric. Steps are stored as structured JSONB. The AI growth engine suggests new experiments based on current stage, metrics, and what has already been tried, so you never repeat failed channels.

📋 Weekly Review

The AI compiles the week's wins, losses, risks, and opportunities into a structured review backed by live data from tasks, KPIs, experiments, and memories. Action plans are stored as ordered JSONB arrays with deadlines and priority levels. The most recent weekly review is injected into every AI Chief of Staff conversation for continuity.

💳 Stripe Billing

Four subscription tiers enforced at the API layer. Stripe Checkout creates subscriptions, the Customer Portal handles upgrades and downgrades, and HMAC-verified webhooks keep the database in sync with Stripe in real time. Feature access and usage limits are checked server-side before every AI call — plan limits cannot be bypassed from the client.


Tech Stack

Layer Technology
Framework Next.js 16 + React 19
Language TypeScript 5
Database PostgreSQL via InsForge BaaS (RLS, SSR auth, admin client)
AI GPT-4o via OpenRouter — streaming + 3-attempt exponential backoff
Payments Stripe Checkout · Customer Portal · HMAC Webhooks
State Zustand with persist middleware + hydration guard
Validation Zod v4
UI shadcn/ui · Radix UI · Tailwind CSS v3.4 · Lucide Icons
Charts Recharts
Notifications Sonner
Date utils date-fns v4

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        Browser (React 19)                        │
│  ┌─────────┐ ┌───────────┐ ┌────────────┐ ┌──────────────────┐ │
│  │ Sidebar │ │  Dashboard │ │  AI Chat   │ │  Billing / Plans │ │
│  │(Zustand)│ │  Widgets   │ │ (streaming)│ │ (Stripe Portal)  │ │
│  └─────────┘ └───────────┘ └────────────┘ └──────────────────┘ │
└───────────────────────────┬─────────────────────────────────────┘
                            │ Next.js App Router
┌───────────────────────────▼─────────────────────────────────────┐
│                     Next.js API Routes                           │
│  /api/ai/chat         → build context → stream GPT-4o           │
│  /api/ai/priorities   → suggest tasks (rate-limited by plan)    │
│  /api/ai/growth       → suggest experiments                     │
│  /api/ai/review       → compile weekly review                   │
│  /api/ai/competitors  → gap analysis                            │
│  /api/ai/roadmap      → product roadmap                         │
│  /api/memory/save     → upsert founder_memories                 │
│  /api/stripe/checkout → create Stripe Checkout session          │
│  /api/stripe/portal   → create Customer Portal session          │
│  /api/stripe/webhooks → HMAC verify → update profiles           │
│  /api/auth/callback   → InsForge OAuth callback                 │
└───────────┬─────────────────────────────────┬───────────────────┘
            │                                 │
┌───────────▼──────────┐        ┌─────────────▼────────────────┐
│   InsForge (BaaS)    │        │    OpenRouter / GPT-4o       │
│  PostgreSQL + RLS    │        │  (OpenAI SDK, baseURL swap)  │
│  Auth (SSR + anon)   │        └──────────────────────────────┘
│  10 tables, RLS      │
│  policies per table  │        ┌──────────────────────────────┐
└──────────────────────┘        │          Stripe              │
                                │  Checkout · Portal · Webhooks│
                                └──────────────────────────────┘

Key design decisions:

  • SSR auth via InsForge middleware — session cookies are validated server-side in layout.tsx. Protected routes never render for unauthenticated users.
  • Admin client for AI routes — AI API routes use the InsForge service-role client (insforgeAdmin) to read cross-table data for context building, bypassing RLS safely on the server.
  • ReadableStream.tee() for zero-latency persistence — the chat route tees the GPT-4o stream: one branch goes to the client for instant streaming, the other asynchronously saves the conversation and auto-detected decision memories.
  • Relevance-ranked memory injectionfounder_memories rows carry a relevance_score float; the top 10 are injected into every AI prompt.

Getting Started

Prerequisites

1. Clone and install

git clone https://github.com/codewithsupra/founder-os.git
cd founder-os
npm install

2. Configure environment variables

cp .env.example .env.local
Variable Description
NEXT_PUBLIC_INSFORGE_URL InsForge backend URL
NEXT_PUBLIC_INSFORGE_ANON_KEY InsForge anonymous (public) key
INSFORGE_API_KEY InsForge service-role key — server-side only
OPENAI_API_KEY OpenRouter API key (sk-or-v1-...)
STRIPE_SECRET_KEY Stripe secret key
STRIPE_WEBHOOK_SECRET Stripe webhook signing secret
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY Stripe publishable key
STRIPE_PRICE_STARTER Price ID for $19/mo Starter plan
STRIPE_PRICE_PRO Price ID for $49/mo Pro plan
STRIPE_PRICE_TEAM Price ID for $99/mo Team plan
NEXT_PUBLIC_APP_URL Your app's public URL

3. Run database migrations

npx @insforge/cli db run ./migrations/20260621084748_create-founderos-schema.sql

4. Start the development server

npm run dev

5. Configure Stripe webhooks (local)

stripe listen --forward-to localhost:3000/api/stripe/webhooks

Pricing

Free Starter Pro Team
Price $0 $19/mo $49/mo $99/mo
Projects 1 3 10 Unlimited
Tasks per project 50 Unlimited Unlimited Unlimited
AI requests/day 5 50 Unlimited Unlimited
KPI tracking
Weekly reviews
Competitor intel
Growth Lab
Priority support

Plan limits are enforced server-side in src/lib/stripe/gate.ts — not just in the UI.


Roadmap

  • Team collaboration — invite co-founders, assign tasks, role-based access
  • Investor updates — AI-generated monthly investor update drafts from KPIs and weekly reviews
  • Slack integration — notifications for competitor alerts and task due dates
  • Linear sync — import existing tasks from Linear into FounderOS projects
  • Mobile app — React Native companion for AI chat and task management on the go
  • Custom AI personas — configure the Chief of Staff's domain focus per project
  • Metrics integrations — pull live numbers from Stripe, Mixpanel, or Google Analytics

Project Structure

src/
├── app/
│   ├── (auth)/           # Login, signup pages
│   ├── (dashboard)/      # All authenticated routes
│   │   ├── ai-chat/      # AI Chief of Staff chat
│   │   ├── billing/      # Stripe subscription management
│   │   ├── competitors/  # Competitor tracking + AI analysis
│   │   ├── dashboard/    # Overview with 6 live widgets
│   │   ├── growth-lab/   # Growth experiments lifecycle
│   │   ├── kpis/         # KPI logging + Recharts visualisation
│   │   ├── projects/     # Project management + stage editing
│   │   ├── tasks/        # Task board + AI priorities
│   │   └── weekly-review/# AI-compiled weekly review
│   └── api/
│       ├── ai/           # chat, priorities, roadmap, growth, review, competitors
│       ├── auth/         # callback, refresh
│       ├── memory/       # save (authenticated server endpoint)
│       └── stripe/       # checkout, portal, webhooks
├── components/
│   ├── dashboard/        # Widget components
│   ├── layout/           # Sidebar, header, mobile nav
│   └── ui/               # shadcn/ui component library
├── hooks/                # use-auth, use-tasks, use-kpis, use-project
├── lib/
│   ├── ai/               # client (OpenRouter), prompts, memory
│   ├── insforge/         # client, server (admin), middleware, actions
│   └── stripe/           # server (lazy init), gate, plans
├── stores/               # Zustand project store (persisted)
└── types/                # database.ts — all TypeScript types
migrations/               # SQL schema migrations

License

Distributed under the MIT License. See LICENSE for details.


Built by Supratim Sarkar  ·  LinkedIn  ·  GitHub  ·  Live Demo

Open to full-stack / AI engineering roles — let's build something great together.

About

AI-powered operating system for startup founders. Task management, KPI tracking, competitor intel, growth lab, and an AI Chief of Staff — all in one workspace.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors