diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml new file mode 100644 index 0000000..260584b --- /dev/null +++ b/.github/workflows/gitleaks.yml @@ -0,0 +1,25 @@ +name: Gitleaks + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + schedule: + - cron: "0 6 * * 1" + workflow_dispatch: + +jobs: + scan: + name: Scan for secrets + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run Gitleaks + uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..277c104 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,184 @@ +# Contributing to FlowForge + +First off β€” thanks for taking the time to contribute! πŸŽ‰ + +FlowForge is an AI-powered project management tool that automates the software development lifecycle. We welcome contributions of every kind: features, bug fixes, docs, tests, design feedback, or even just opening an issue to start a discussion. + +## Table of contents + +- [Code of conduct](#code-of-conduct) +- [Ways to contribute](#ways-to-contribute) +- [Getting started](#getting-started) +- [Development workflow](#development-workflow) +- [Branching & commits](#branching--commits) +- [Pull requests](#pull-requests) +- [Testing](#testing) +- [Coding style](#coding-style) +- [Reporting bugs](#reporting-bugs) +- [Suggesting features](#suggesting-features) +- [Questions?](#questions) + +## Code of conduct + +Be kind, be patient, and assume good intent. Harassment or disrespectful behavior of any kind is not tolerated. If something feels off, please open an issue or reach out to the maintainers. + +## Ways to contribute + +You don't need to write code to help. All of these are valuable: + +- πŸ› **Report a bug** β€” open an issue with reproduction steps. +- ✨ **Suggest a feature** β€” open an issue describing the problem and the proposed solution. +- πŸ“ **Improve documentation** β€” README, code comments, examples, this file. +- πŸ§ͺ **Add tests** β€” coverage for under-tested areas is always welcome. +- 🎨 **Design feedback** β€” UX or UI improvements via issues or PRs. +- πŸ’» **Write code** β€” pick up an open issue or propose a new one. + +If you're new and don't know where to start, look for issues tagged [`good first issue`](https://github.com/CodeForContribute/flowforge/labels/good%20first%20issue) or [`help wanted`](https://github.com/CodeForContribute/flowforge/labels/help%20wanted). + +## Getting started + +### Prerequisites + +- **Node.js** β‰₯ 18 +- **PostgreSQL** (local or via Docker) +- **Redis** (local or via Docker) +- A **GitHub OAuth App** for sign-in (see `.env.example`) +- *(Optional)* OpenAI or Anthropic API key for AI features + +### Local setup + +```bash +# 1. Fork the repo on GitHub, then clone your fork +git clone https://github.com//flowforge.git +cd flowforge + +# 2. Add the upstream remote +git remote add upstream https://github.com/CodeForContribute/flowforge.git + +# 3. Install dependencies +npm install + +# 4. Copy env file and fill in values +cp .env.example .env + +# 5. Start Postgres + Redis (easiest path: docker-compose) +docker-compose up -d db redis + +# 6. Run migrations +npm run db:migrate + +# 7. Start the dev server +npm run dev +``` + +The app should now be running at . + +To run the AI agent worker in a separate terminal: + +```bash +npm run worker +``` + +## Development workflow + +1. **Sync your fork** with upstream before starting: + ```bash + git checkout develop + git pull upstream develop + ``` +2. **Create a feature branch** off `develop` (see [Branching](#branching--commits)). +3. **Make your changes** with tests where it makes sense. +4. **Run linter and tests** locally before pushing. +5. **Push and open a PR** against `develop`. + +## Branching & commits + +### Branches + +- `main` β€” production-ready, deployed code. +- `develop` β€” integration branch. **Open all PRs against `develop`.** +- Feature branches: `feature/` or `FLOW--` +- Bug fixes: `fix/` +- Docs: `docs/` + +### Commit messages + +Follow [Conventional Commits](https://www.conventionalcommits.org/): + +``` +feat: add sprint burndown chart +fix: prevent duplicate webhook events +docs: clarify env setup in README +test: add unit tests for kanban dnd +chore: bump prisma to 5.22 +``` + +Keep commits focused and atomic. Squash noisy commits before opening a PR. + +## Pull requests + +1. Open the PR against **`develop`**. +2. Use a clear title (Conventional-Commit style is great). +3. Fill in the PR template: + - **What** changed + - **Why** it changed + - **How** to test it + - Linked issue (e.g., `Closes #42`) +4. Make sure CI is green: + - βœ… Lint + - βœ… Unit tests (`npm test`) + - βœ… E2E tests (`npm run test:e2e`) + - βœ… Gitleaks (no committed secrets) +5. Be responsive to review feedback. We aim to review PRs within a few days. + +Small, focused PRs are easier to review and ship faster than large ones. If your change is big, consider splitting it. + +## Testing + +We take tests seriously β€” current coverage is **80%+** and we'd like to keep it that way. + +```bash +npm test # Unit tests (Jest) +npm run test:watch # Unit tests in watch mode +npm run test:coverage # Coverage report +npm run test:e2e # End-to-end tests (Playwright) +npm run test:e2e:ui # Playwright in UI mode +``` + +- Add tests for new behavior. Bug fixes should include a regression test. +- Don't mock the database in integration tests β€” use the real (test) DB. +- Keep tests fast and deterministic. Avoid `setTimeout`-based waits. + +## Coding style + +- **Language:** TypeScript everywhere. No new `.js` files. +- **Linting:** `npm run lint` β€” please fix warnings before pushing. +- **Formatting:** follow the existing style; we don't ship a formatter config to fight, but consistency matters. +- **Types over `any`:** if you reach for `any`, leave a `// TODO` and explain why. +- **Comments:** explain *why*, not *what*. Well-named identifiers tell you what. +- **Error handling:** validate at boundaries (API routes, external calls). Trust internal code. + +## Reporting bugs + +When opening a bug issue, include: + +1. **What you expected** to happen. +2. **What actually happened** (errors, screenshots, logs). +3. **Steps to reproduce** β€” minimal and ordered. +4. **Environment** β€” OS, Node version, browser, anything relevant. + +## Suggesting features + +When opening a feature request: + +1. **The problem** you're trying to solve (not the solution). +2. **Why** it matters / who it helps. +3. **Proposed solution(s)** β€” open to alternatives. +4. **Out of scope** β€” anything explicitly *not* part of this proposal. + +## Questions? + +- πŸ’¬ Open a [GitHub Discussion](https://github.com/CodeForContribute/flowforge/discussions) for open-ended questions. +- πŸ› Open an [issue](https://github.com/CodeForContribute/flowforge/issues) for bugs and feature requests. + +Thanks again for contributing β€” every PR, issue, and idea makes FlowForge better. πŸš€ diff --git a/FlowForge-Investor-Deck-India.docx b/FlowForge-Investor-Deck-India.docx new file mode 100644 index 0000000..8884fdf Binary files /dev/null and b/FlowForge-Investor-Deck-India.docx differ diff --git a/FlowForge-Investor-Deck-India.pdf b/FlowForge-Investor-Deck-India.pdf new file mode 100644 index 0000000..2b29d65 Binary files /dev/null and b/FlowForge-Investor-Deck-India.pdf differ diff --git a/generate-docx.py b/generate-docx.py new file mode 100644 index 0000000..3b69d1a --- /dev/null +++ b/generate-docx.py @@ -0,0 +1,676 @@ +#!/usr/bin/env python3 +"""Generate FlowForge investor pitch deck as a Word document.""" + +from docx import Document +from docx.shared import Inches, Pt, Cm, RGBColor, Emu +from docx.enum.text import WD_ALIGN_PARAGRAPH +from docx.enum.table import WD_TABLE_ALIGNMENT +from docx.enum.section import WD_ORIENT +from docx.oxml.ns import qn, nsdecls +from docx.oxml import parse_xml +import os + +doc = Document() + +# ── Styles & Defaults ── +style = doc.styles['Normal'] +font = style.font +font.name = 'Calibri' +font.size = Pt(10) +font.color.rgb = RGBColor(0x47, 0x55, 0x69) + +# Page margins +for section in doc.sections: + section.top_margin = Cm(1.5) + section.bottom_margin = Cm(1.5) + section.left_margin = Cm(2) + section.right_margin = Cm(2) + +ACCENT = RGBColor(0x63, 0x66, 0xF1) +DARK = RGBColor(0x0F, 0x17, 0x2A) +MUTED = RGBColor(0x47, 0x55, 0x69) +SUCCESS = RGBColor(0x10, 0xB9, 0x81) +RED = RGBColor(0xB9, 0x1C, 0x1C) +ORANGE = RGBColor(0x92, 0x40, 0x0E) +WHITE = RGBColor(0xFF, 0xFF, 0xFF) +LIGHT_BG = RGBColor(0xF8, 0xFA, 0xFC) + + +def add_heading_styled(text, level=1, color=DARK, space_before=0, space_after=6): + h = doc.add_heading(text, level=level) + h.paragraph_format.space_before = Pt(space_before) + h.paragraph_format.space_after = Pt(space_after) + for run in h.runs: + run.font.color.rgb = color + run.font.name = 'Calibri' + return h + + +def add_para(text, bold=False, color=MUTED, size=10, space_after=4, align=None): + p = doc.add_paragraph() + run = p.add_run(text) + run.font.size = Pt(size) + run.font.color.rgb = color + run.font.name = 'Calibri' + run.bold = bold + p.paragraph_format.space_after = Pt(space_after) + p.paragraph_format.space_before = Pt(0) + if align: + p.alignment = align + return p + + +def add_section_label(text): + p = doc.add_paragraph() + run = p.add_run(text.upper()) + run.font.size = Pt(8) + run.font.color.rgb = ACCENT + run.font.name = 'Calibri' + run.bold = True + p.paragraph_format.space_after = Pt(2) + p.paragraph_format.space_before = Pt(12) + return p + + +def add_bullet(text, color=MUTED, bold_prefix=None): + p = doc.add_paragraph(style='List Bullet') + if bold_prefix: + run_b = p.add_run(bold_prefix) + run_b.bold = True + run_b.font.size = Pt(10) + run_b.font.color.rgb = DARK + run_b.font.name = 'Calibri' + run = p.add_run(text) + else: + run = p.add_run(text) + run.font.size = Pt(10) + run.font.color.rgb = color + run.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(2) + p.paragraph_format.space_before = Pt(0) + return p + + +def shade_cell(cell, color_hex): + """Apply background shading to a table cell.""" + shading = parse_xml(f'') + cell._tc.get_or_add_tcPr().append(shading) + + +def set_cell_text(cell, text, bold=False, color=MUTED, size=9, align=None): + cell.text = '' + p = cell.paragraphs[0] + run = p.add_run(text) + run.font.size = Pt(size) + run.font.color.rgb = color + run.font.name = 'Calibri' + run.bold = bold + p.paragraph_format.space_after = Pt(1) + p.paragraph_format.space_before = Pt(1) + if align: + p.alignment = align + + +def add_line(): + p = doc.add_paragraph() + p.paragraph_format.space_before = Pt(4) + p.paragraph_format.space_after = Pt(4) + # Add a horizontal border + pPr = p._p.get_or_add_pPr() + pBdr = parse_xml( + f'' + ' ' + '' + ) + pPr.append(pBdr) + + +# ════════════════════════════════════════════════════════════════════════════ +# PAGE 1 β€” COVER + PROBLEM + SOLUTION +# ════════════════════════════════════════════════════════════════════════════ + +# Header +p = doc.add_paragraph() +run = p.add_run('FlowForge') +run.font.size = Pt(16) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' +run2 = p.add_run(' Confidential | Seed Round | March 2026') +run2.font.size = Pt(8) +run2.font.color.rgb = RGBColor(0x94, 0xA3, 0xB8) +run2.font.name = 'Calibri' +p.paragraph_format.space_after = Pt(4) + +add_line() + +# Hero +add_heading_styled('Ship Software Faster with AI-Powered Project Management', level=1, space_before=8) +add_para( + 'The first PM platform that doesn\'t just track work \u2014 it does the work. ' + 'AI code generation, GitHub integration, and smart sprint planning in one workflow.', + size=11, space_after=2 +) +add_para('Raising \u20b920 Cr (~$2.5M) Seed Round', bold=True, color=ACCENT, size=11, space_after=10) + +# Problem +add_section_label('The Problem') +add_heading_styled('Engineering teams lose 23% of their time to tooling overhead', level=2, space_after=6) + +prob_table = doc.add_table(rows=1, cols=3) +prob_table.alignment = WD_TABLE_ALIGNMENT.CENTER +for i, (title, desc) in enumerate([ + ('Tool Fragmentation', 'Teams juggle 5-7 tools \u2014 Jira, GitHub, Slack, CI/CD \u2014 losing hours daily to context switching.'), + ('Slow PR Cycles', 'Average PR sits open 4.5 days. Code reviews bottleneck delivery. Junior devs wait days for feedback.'), + ('Planning Theater', 'Sprint planning takes hours, estimates are guesswork, retrospectives produce the same action items.'), +]): + cell = prob_table.cell(0, i) + shade_cell(cell, 'FEF2F2') + p = cell.paragraphs[0] + run = p.add_run(title + '\n') + run.bold = True + run.font.size = Pt(9) + run.font.color.rgb = RGBColor(0x99, 0x1B, 0x1B) + run.font.name = 'Calibri' + run2 = p.add_run(desc) + run2.font.size = Pt(8.5) + run2.font.color.rgb = RED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(4) + +add_line() + +# Solution +add_section_label('The Solution') +add_heading_styled('One platform that plans, codes, reviews, and ships', level=2, space_after=4) +add_para( + 'FlowForge replaces the fragmented toolchain with an AI-native workflow automating ' + 'the entire SDLC \u2014 from task creation to merged PR.', + space_after=6 +) + +# Flow diagram as text +flow_p = doc.add_paragraph() +flow_p.alignment = WD_ALIGN_PARAGRAPH.CENTER +flow_p.paragraph_format.space_after = Pt(8) +for i, (icon, label) in enumerate([ + ('\U0001f4dd', 'Create Task'), ('\U0001f916', 'AI Codes'), ('\U0001f440', 'Human Reviews'), + ('\U0001f4ac', 'AI Responds'), ('\U0001f680', 'Ship It'), +]): + if i > 0: + arrow = flow_p.add_run(' \u2192 ') + arrow.font.size = Pt(11) + arrow.font.color.rgb = RGBColor(0xC7, 0xD2, 0xFE) + run = flow_p.add_run(f'{icon} {label}') + run.font.size = Pt(10) + run.font.color.rgb = ACCENT + run.font.name = 'Calibri' + run.bold = True + +# Feature grid +feat_table = doc.add_table(rows=2, cols=2) +feat_table.alignment = WD_TABLE_ALIGNMENT.CENTER +features = [ + ('AI Code Generation', 'Generates production-ready code from task descriptions \u2014 including tests, error handling, and PR creation. Supports OpenAI GPT-4o and Anthropic Claude.'), + ('Deep GitHub Integration', 'Auto-creates branches and PRs, processes webhooks in real-time, tracks CI/CD status, and syncs bidirectionally with repositories.'), + ('AI Sprint Planning', 'Intelligent story point estimation, risk assessment, dependency detection, and automatic retrospective generation from sprint data.'), + ('Smart Review Handling', 'AI classifies review comments as code changes vs. discussions, generates contextual responses, and updates code based on feedback.'), +] +for idx, (title, desc) in enumerate(features): + cell = feat_table.cell(idx // 2, idx % 2) + shade_cell(cell, 'F8FAFC') + p = cell.paragraphs[0] + run = p.add_run(title + '\n') + run.bold = True + run.font.size = Pt(9) + run.font.color.rgb = DARK + run.font.name = 'Calibri' + run2 = p.add_run(desc) + run2.font.size = Pt(8.5) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(4) + +# Footer +add_para('\nFlowForge \u2014 Confidential Page 1 of 4', + size=8, color=RGBColor(0x94, 0xA3, 0xB8), space_after=0) + +# Page break +doc.add_page_break() + +# ════════════════════════════════════════════════════════════════════════════ +# PAGE 2 β€” MARKET + COMPETITION + INDIA ANGLE +# ════════════════════════════════════════════════════════════════════════════ + +p = doc.add_paragraph() +run = p.add_run('FlowForge') +run.font.size = Pt(16) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' +run2 = p.add_run(' Market Opportunity & Competitive Landscape') +run2.font.size = Pt(8) +run2.font.color.rgb = RGBColor(0x94, 0xA3, 0xB8) +run2.font.name = 'Calibri' +p.paragraph_format.space_after = Pt(4) +add_line() + +add_section_label('Market Opportunity') +add_heading_styled('A massive global market \u2014 with India as a unique wedge', level=2, space_after=6) + +# Market stats +mkt_table = doc.add_table(rows=1, cols=4) +mkt_table.alignment = WD_TABLE_ALIGNMENT.CENTER +stats = [ + ('$85B', 'Project Mgmt\nTAM (Global)'), + ('$22B', 'Developer Tools\nSAM'), + ('$4.5B', 'AI-Powered DevTools\nSOM (Target)'), + ('28M+', 'Professional\nDevelopers'), +] +for i, (num, label) in enumerate(stats): + cell = mkt_table.cell(0, i) + shade_cell(cell, 'F8FAFC') + p = cell.paragraphs[0] + p.alignment = WD_ALIGN_PARAGRAPH.CENTER + run = p.add_run(num + '\n') + run.font.size = Pt(18) + run.font.bold = True + run.font.color.rgb = ACCENT + run.font.name = 'Calibri' + run2 = p.add_run(label) + run2.font.size = Pt(8) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(4) + +# India Advantage callout +p = doc.add_paragraph() +p.paragraph_format.space_before = Pt(10) +p.paragraph_format.space_after = Pt(4) +# Shade the paragraph via a single-cell table +india_table = doc.add_table(rows=1, cols=1) +cell = india_table.cell(0, 0) +shade_cell(cell, 'FEF3C7') +p = cell.paragraphs[0] +run = p.add_run('India Advantage\n') +run.bold = True +run.font.size = Pt(10) +run.font.color.rgb = ORANGE +run.font.name = 'Calibri' +run2 = p.add_run( + 'India has 5.8M+ developers (2nd largest globally) and 1,600+ GCCs employing 1.9M+ tech professionals. ' + 'Indian IT services ($250B+) are under pressure to adopt AI-native tooling. FlowForge is built in India ' + 'with 3-4x capital efficiency vs. US peers \u2014 the same playbook that built Freshworks ($12B), ' + 'Postman ($5.6B), and Zoho into global SaaS leaders. Our target: land with India\u2019s fast-growing ' + 'startup ecosystem, then expand globally via GitHub\u2019s developer network.' +) +run2.font.size = Pt(9) +run2.font.color.rgb = RGBColor(0xB4, 0x53, 0x09) +run2.font.name = 'Calibri' +p.paragraph_format.space_after = Pt(4) + +# Target Customers +add_section_label('Target Customers') +add_bullet('5-50 person engineering teams on GitHub (India + Global). Fast AI adopters. ACV: \u20b950K-3L/yr.', bold_prefix='Primary \u2014 Startups & SMBs: ') +add_bullet('50-500 engineers in India\u2019s 1,600+ GCCs consolidating tools. ACV: \u20b940L-1.5Cr/yr.', bold_prefix='Secondary \u2014 GCCs & Mid-Market: ') +add_bullet('Large-scale deployments with SSO, on-prem, SLA guarantees. ACV: \u20b91.5Cr+/yr.', bold_prefix='Expansion \u2014 Enterprise / IT Services: ') + +# Why Now +why_table = doc.add_table(rows=1, cols=1) +cell = why_table.cell(0, 0) +shade_cell(cell, 'EEF2FF') +p = cell.paragraphs[0] +run = p.add_run('Why Now? ') +run.bold = True +run.font.size = Pt(9) +run.font.color.rgb = ACCENT +run.font.name = 'Calibri' +run2 = p.add_run( + 'LLMs crossed the production-code-quality threshold in 2025. AI coding tools (Copilot, Cursor) ' + 'normalized AI-assisted development. But no tool connects task management \u2192 code generation \u2192 ' + 'review \u2192 deployment. FlowForge is first to close this loop.' +) +run2.font.size = Pt(9) +run2.font.color.rgb = MUTED +run2.font.name = 'Calibri' + +# Competitive Landscape +add_section_label('Competitive Landscape') +add_heading_styled('The only platform that closes the loop', level=2, space_after=4) + +comp_table = doc.add_table(rows=9, cols=5) +comp_table.alignment = WD_TABLE_ALIGNMENT.CENTER +comp_table.style = 'Table Grid' + +headers = ['Capability', 'FlowForge', 'Jira', 'Linear', 'Copilot'] +for i, h in enumerate(headers): + cell = comp_table.cell(0, i) + set_cell_text(cell, h, bold=True, color=ACCENT if i == 1 else MUTED, size=8) + if i == 1: + shade_cell(cell, 'EEF2FF') + +rows_data = [ + ('Task & Sprint Mgmt', '\u2713 Full', '\u2713 Full', '\u2713 Full', '\u2717'), + ('AI Code Generation', '\u2713 Full', '\u2717', '\u2717', 'Inline'), + ('Auto PR Creation', '\u2713 Full', '\u2717', '\u2717', '\u2717'), + ('AI Review Response', '\u2713 Full', '\u2717', '\u2717', '\u2717'), + ('AI Sprint Planning', '\u2713 Full', '\u2717', '\u2717', '\u2717'), + ('GitHub Integration', '\u2713 Native', 'Plugin', '\u2713 Good', '\u2713 Native'), + ('Task\u2192Code\u2192PR Loop', '\u2713 E2E', '\u2717', '\u2717', '\u2717'), + ('Multi AI Provider', '\u2713 2', '\u2717', '\u2717', '\u2717'), +] +for r, row_data in enumerate(rows_data): + for c, val in enumerate(row_data): + cell = comp_table.cell(r + 1, c) + is_check = val.startswith('\u2713') + is_cross = val == '\u2717' + clr = SUCCESS if is_check else (RGBColor(0xCB, 0xD5, 0xE1) if is_cross else MUTED) + set_cell_text(cell, val, bold=(c == 0 or is_check), color=DARK if c == 0 else clr, size=8) + if c == 1: + shade_cell(cell, 'EEF2FF') + +# Moat +moat_table = doc.add_table(rows=1, cols=1) +cell = moat_table.cell(0, 0) +shade_cell(cell, 'EEF2FF') +p = cell.paragraphs[0] +run = p.add_run('Moat: Data Flywheel \u2014 ') +run.bold = True +run.font.size = Pt(9) +run.font.color.rgb = ACCENT +run.font.name = 'Calibri' +run2 = p.add_run( + 'Every AI execution improves code quality, review accuracy, and estimation precision. ' + 'The task\u2192PR pipeline creates compounding data advantages that competitors can\'t replicate ' + 'without rebuilding both PM and AI layers.' +) +run2.font.size = Pt(9) +run2.font.color.rgb = MUTED +run2.font.name = 'Calibri' + +add_para('\nFlowForge \u2014 Confidential Page 2 of 4', + size=8, color=RGBColor(0x94, 0xA3, 0xB8), space_after=0) + +doc.add_page_break() + +# ════════════════════════════════════════════════════════════════════════════ +# PAGE 3 β€” BUSINESS MODEL + TRACTION + ROADMAP +# ════════════════════════════════════════════════════════════════════════════ + +p = doc.add_paragraph() +run = p.add_run('FlowForge') +run.font.size = Pt(16) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' +run2 = p.add_run(' Business Model, Traction & Roadmap') +run2.font.size = Pt(8) +run2.font.color.rgb = RGBColor(0x94, 0xA3, 0xB8) +run2.font.name = 'Calibri' +p.paragraph_format.space_after = Pt(4) +add_line() + +# Business Model +add_section_label('Business Model') +add_heading_styled('SaaS + Usage-Based AI Upside', level=2, space_after=6) + +# Pricing table +price_table = doc.add_table(rows=5, cols=3) +price_table.alignment = WD_TABLE_ALIGNMENT.CENTER +price_table.style = 'Table Grid' + +tiers = [ + ('FREE', '\u20b90', ['Up to 3 projects', 'GitHub integration', 'Basic AI suggestions']), + ('PRO (Recommended)', '\u20b9999/user/mo', ['Unlimited projects', 'Advanced AI generation', 'Sprint analytics', 'Priority support']), + ('ENTERPRISE', 'Custom', ['SSO / SAML', 'On-premise deploy', 'Custom integrations', 'SLA guarantees']), +] +for col, (tier, price, features) in enumerate(tiers): + set_cell_text(price_table.cell(0, col), tier, bold=True, color=ACCENT, size=8) + set_cell_text(price_table.cell(1, col), price, bold=True, color=DARK, size=14) + for row_idx, feat in enumerate(features): + if row_idx + 2 < 5: + set_cell_text(price_table.cell(row_idx + 2, col), '\u2713 ' + feat, color=MUTED, size=8) + if col == 1: + for r in range(5): + shade_cell(price_table.cell(r, col), 'EEF2FF') + +add_para( + 'Revenue drivers: Seat-based SaaS (predictable MRR) + AI execution credits ' + '(usage upside) + Enterprise annual contracts.', + size=9, space_after=6 +) + +# Unit Economics +add_section_label('Target Unit Economics') +econ_table = doc.add_table(rows=6, cols=2) +econ_table.alignment = WD_TABLE_ALIGNMENT.CENTER +metrics = [ + ('LTV (per seat)', '\u20b92.4L ($2,880)'), + ('CAC', '\u20b926K ($320)'), + ('LTV:CAC Ratio', '9:1'), + ('Gross Margin', '78%'), + ('Net Revenue Retention', '125%'), + ('Payback Period', '4 months'), +] +for i, (label, val) in enumerate(metrics): + set_cell_text(econ_table.cell(i, 0), label, color=MUTED, size=9) + clr = ACCENT if 'LTV:CAC' in label else DARK + set_cell_text(econ_table.cell(i, 1), val, bold=True, color=clr, size=9) + shade_cell(econ_table.cell(i, 0), 'F8FAFC') + shade_cell(econ_table.cell(i, 1), 'F8FAFC') + +# Land & Expand +le_table = doc.add_table(rows=1, cols=1) +cell = le_table.cell(0, 0) +shade_cell(cell, 'F0FDF4') +p = cell.paragraphs[0] +run = p.add_run('Land & Expand: ') +run.bold = True +run.font.size = Pt(9) +run.font.color.rgb = RGBColor(0x06, 0x5F, 0x46) +run.font.name = 'Calibri' +run2 = p.add_run( + 'Free tier drives adoption \u2192 teams upgrade as AI executions prove value \u2192 ' + 'average expansion 3x within 6 months. PLG motion keeps CAC low.' +) +run2.font.size = Pt(9) +run2.font.color.rgb = RGBColor(0x04, 0x78, 0x57) +run2.font.name = 'Calibri' + +add_line() + +# Traction +add_section_label('Traction') +add_heading_styled('Product-First, Capital-Efficient', level=2, space_after=6) + +trac_table = doc.add_table(rows=1, cols=4) +trac_table.alignment = WD_TABLE_ALIGNMENT.CENTER +trac_stats = [('295+', 'Source files shipped'), ('50+', 'Features built'), ('15+', 'PRs merged'), ('2', 'AI providers')] +for i, (num, lbl) in enumerate(trac_stats): + cell = trac_table.cell(0, i) + shade_cell(cell, 'F8FAFC') + p = cell.paragraphs[0] + p.alignment = WD_ALIGN_PARAGRAPH.CENTER + run = p.add_run(num + '\n') + run.font.size = Pt(16) + run.font.bold = True + run.font.color.rgb = ACCENT + run.font.name = 'Calibri' + run2 = p.add_run(lbl) + run2.font.size = Pt(8) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + +add_bullet('Full Kanban board with drag-and-drop, WIP limits, task hierarchy (Epics \u2192 Subtasks)') +add_bullet('End-to-end AI code generation pipeline with human-in-the-loop review') +add_bullet('Deep GitHub integration \u2014 webhooks, PR management, CI/CD tracking') +add_bullet('AI sprint planning \u2014 risk assessment, dependency detection, auto-retros') +add_bullet('Multi-tenant org support with role-based access control') +add_bullet('Open-source community with organic contributors and feature requests') + +add_line() + +# Roadmap +add_section_label('Roadmap') +phases = [ + ('\u2713 Phase 1 \u2014 Foundation (Done)', 'Core PM, Kanban, sprints, GitHub integration, AI code generation pipeline'), + ('\u2192 Phase 2 \u2014 Intelligence (Q2 2026)', 'Advanced analytics, velocity/burndown charts, time tracking, custom dashboards'), + ('Phase 3 \u2014 Ecosystem (Q3 2026)', 'Slack, GitLab, Jira migration, API marketplace, automation rules'), + ('Phase 4 \u2014 Enterprise (Q4 2026)', 'SSO/SAML, on-premise, SOC 2, audit logs, advanced RBAC'), +] +for title, desc in phases: + p = doc.add_paragraph() + run = p.add_run(title) + run.bold = True + run.font.size = Pt(9) + run.font.color.rgb = DARK + run.font.name = 'Calibri' + run2 = p.add_run(' \u2014 ' + desc) + run2.font.size = Pt(9) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(2) + p.paragraph_format.space_before = Pt(0) + +add_para('\nFlowForge \u2014 Confidential Page 3 of 4', + size=8, color=RGBColor(0x94, 0xA3, 0xB8), space_after=0) + +doc.add_page_break() + +# ════════════════════════════════════════════════════════════════════════════ +# PAGE 4 β€” THE ASK + MILESTONES + CLOSING +# ════════════════════════════════════════════════════════════════════════════ + +p = doc.add_paragraph() +run = p.add_run('FlowForge') +run.font.size = Pt(16) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' +run2 = p.add_run(' The Ask & Vision') +run2.font.size = Pt(8) +run2.font.color.rgb = RGBColor(0x94, 0xA3, 0xB8) +run2.font.name = 'Calibri' +p.paragraph_format.space_after = Pt(4) +add_line() + +add_section_label('The Ask') +add_heading_styled('Raising \u20b920 Crore (~$2.5M) Seed Round', level=1, space_after=4) +add_para( + 'To accelerate product development, launch publicly, build the go-to-market engine, ' + 'and capture the AI-native project management category \u2014 from India, for the world.', + size=11, space_after=10 +) + +# Big stats +ask_table = doc.add_table(rows=1, cols=3) +ask_table.alignment = WD_TABLE_ALIGNMENT.CENTER +ask_stats = [ + ('\u20b920 Cr', 'Seed Round (~$2.5M)', 'EEF2FF'), + ('18 mo', 'Runway to Series A', 'F0FDF4'), + ('\u20b916 Cr+', 'ARR Target (2027)', 'FFFBEB'), +] +for i, (num, lbl, bg) in enumerate(ask_stats): + cell = ask_table.cell(0, i) + shade_cell(cell, bg) + p = cell.paragraphs[0] + p.alignment = WD_ALIGN_PARAGRAPH.CENTER + clrs = [ACCENT, SUCCESS, RGBColor(0xF5, 0x9E, 0x0B)] + run = p.add_run(num + '\n') + run.font.size = Pt(20) + run.font.bold = True + run.font.color.rgb = clrs[i] + run.font.name = 'Calibri' + run2 = p.add_run(lbl) + run2.font.size = Pt(9) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(8) + +# Use of Funds +add_section_label('Use of Funds') +funds = [ + ('Engineering (50%)', '\u20b910 Cr', 'Hire 3-4 senior engineers to accelerate roadmap'), + ('AI Infrastructure (20%)', '\u20b94 Cr', 'API costs, model fine-tuning, execution pipeline'), + ('Go-to-Market (20%)', '\u20b94 Cr', 'DevRel, content marketing, community building, India GTM'), + ('Operations (10%)', '\u20b92 Cr', 'Legal, compliance (SOC 2), cloud infrastructure'), +] +funds_table = doc.add_table(rows=4, cols=3) +funds_table.alignment = WD_TABLE_ALIGNMENT.CENTER +funds_table.style = 'Table Grid' +for i, (category, amount, desc) in enumerate(funds): + set_cell_text(funds_table.cell(i, 0), category, bold=True, color=DARK, size=9) + set_cell_text(funds_table.cell(i, 1), amount, bold=True, color=ACCENT, size=9) + set_cell_text(funds_table.cell(i, 2), desc, color=MUTED, size=9) + shade_cell(funds_table.cell(i, 0), 'F8FAFC') + +# Key Milestones +add_section_label('Key Milestones') +milestones = [ + ('Q2 2026 \u2014 Public Beta', 'Open sign-ups, free tier launch, community building. Target: 500 active teams.'), + ('Q3 2026 \u2014 Revenue Launch', 'Pro tier monetization, GCC outreach, enterprise pilots. Target: \u20b940L MRR.'), + ('Q4 2026 \u2014 Enterprise Ready', 'SOC 2, SSO/SAML, on-premise option. Target: 3 enterprise contracts.'), + ('2027 \u2014 Series A Position', '\u20b916 Cr+ ARR, 50+ paying teams, proven unit economics, category leadership.'), +] +for title, desc in milestones: + p = doc.add_paragraph() + run = p.add_run(title + ' \u2014 ') + run.bold = True + run.font.size = Pt(9) + run.font.color.rgb = DARK + run.font.name = 'Calibri' + run2 = p.add_run(desc) + run2.font.size = Pt(9) + run2.font.color.rgb = MUTED + run2.font.name = 'Calibri' + p.paragraph_format.space_after = Pt(3) + p.paragraph_format.space_before = Pt(0) + +add_line() + +# Closing +p = doc.add_paragraph() +p.alignment = WD_ALIGN_PARAGRAPH.CENTER +p.paragraph_format.space_before = Pt(16) +run = p.add_run('FlowForge\n') +run.font.size = Pt(18) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' + +p2 = doc.add_paragraph() +p2.alignment = WD_ALIGN_PARAGRAPH.CENTER +run = p2.add_run('The future of software delivery starts here.') +run.font.size = Pt(14) +run.font.bold = True +run.font.color.rgb = DARK +run.font.name = 'Calibri' +p2.paragraph_format.space_after = Pt(4) + +p3 = doc.add_paragraph() +p3.alignment = WD_ALIGN_PARAGRAPH.CENTER +run = p3.add_run('Not another project management tool \u2014 the platform that makes engineering teams superhuman.') +run.font.size = Pt(10) +run.font.color.rgb = MUTED +run.font.name = 'Calibri' +p3.paragraph_format.space_after = Pt(12) + +p4 = doc.add_paragraph() +p4.alignment = WD_ALIGN_PARAGRAPH.CENTER +for label in ['flowforge.dev', 'team@flowforge.dev', 'github.com/flowforge']: + run = p4.add_run(f' {label} ') + run.font.size = Pt(10) + run.font.color.rgb = ACCENT + run.font.name = 'Calibri' + run2 = p4.add_run(' |') + run2.font.size = Pt(10) + run2.font.color.rgb = RGBColor(0xE2, 0xE8, 0xF0) +p4.paragraph_format.space_after = Pt(16) + +add_para('\nFlowForge \u2014 Confidential Page 4 of 4', + size=8, color=RGBColor(0x94, 0xA3, 0xB8), space_after=0) + +# ── Save ── +output_path = os.path.join(os.path.dirname(__file__), 'FlowForge-Investor-Deck-India.docx') +doc.save(output_path) +print(f'Saved: {output_path}') diff --git a/generate-pdf.py b/generate-pdf.py new file mode 100644 index 0000000..28c8f21 --- /dev/null +++ b/generate-pdf.py @@ -0,0 +1,705 @@ +#!/usr/bin/env python3 +"""Generate FlowForge investor pitch deck as a PDF (4-page India version).""" + +import os +from reportlab.lib.pagesizes import A4 +from reportlab.lib.units import mm, cm +from reportlab.lib.colors import HexColor, white, black +from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle +from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT +from reportlab.platypus import ( + SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, + PageBreak, KeepTogether, HRFlowable, +) +from reportlab.graphics.shapes import Drawing, Rect, String, Line +from reportlab.graphics import renderPDF + +# ── Colors ── +ACCENT = HexColor('#6366F1') +ACCENT_LIGHT = HexColor('#818CF8') +ACCENT_BG = HexColor('#EEF2FF') +DARK = HexColor('#0F172A') +MUTED = HexColor('#475569') +LIGHT_GRAY = HexColor('#94A3B8') +BORDER = HexColor('#E2E8F0') +BG_LIGHT = HexColor('#F8FAFC') +SUCCESS = HexColor('#10B981') +SUCCESS_BG = HexColor('#F0FDF4') +RED = HexColor('#B91C1C') +RED_BG = HexColor('#FEF2F2') +RED_BORDER = HexColor('#FECACA') +ORANGE = HexColor('#92400E') +ORANGE_BG = HexColor('#FEF3C7') +ORANGE_BORDER = HexColor('#FED7AA') +ORANGE_TEXT = HexColor('#B45309') +GREEN_DARK = HexColor('#065F46') +GREEN_MED = HexColor('#047857') + +W, H = A4 + +# ── Styles ── +styles = getSampleStyleSheet() + +def make_style(name, parent='Normal', fontSize=10, textColor=MUTED, leading=14, + alignment=TA_LEFT, spaceAfter=4, spaceBefore=0, fontName='Helvetica', + bold=False): + return ParagraphStyle( + name, parent=styles['Normal'], + fontName='Helvetica-Bold' if bold else fontName, + fontSize=fontSize, textColor=textColor, leading=leading, + alignment=alignment, spaceAfter=spaceAfter, spaceBefore=spaceBefore, + ) + +S_H1 = make_style('H1', fontSize=22, textColor=DARK, leading=26, bold=True, spaceAfter=6) +S_H2 = make_style('H2', fontSize=14, textColor=DARK, leading=18, bold=True, spaceAfter=4) +S_H3 = make_style('H3', fontSize=11, textColor=DARK, leading=14, bold=True, spaceAfter=2) +S_H4 = make_style('H4', fontSize=9, textColor=DARK, leading=12, bold=True, spaceAfter=2) +S_BODY = make_style('Body', fontSize=9, textColor=MUTED, leading=13, spaceAfter=4) +S_SMALL = make_style('Small', fontSize=8, textColor=MUTED, leading=11, spaceAfter=2) +S_TINY = make_style('Tiny', fontSize=7, textColor=LIGHT_GRAY, leading=9, spaceAfter=0) +S_LABEL = make_style('Label', fontSize=7.5, textColor=ACCENT, leading=10, bold=True, spaceAfter=2, spaceBefore=10) +S_CENTER = make_style('Center', fontSize=9, textColor=MUTED, leading=13, alignment=TA_CENTER) +S_CENTER_BIG = make_style('CenterBig', fontSize=16, textColor=DARK, leading=20, bold=True, alignment=TA_CENTER, spaceAfter=4) +S_CENTER_SM = make_style('CenterSm', fontSize=10, textColor=MUTED, leading=14, alignment=TA_CENTER) +S_STAT_NUM = make_style('StatNum', fontSize=20, textColor=ACCENT, leading=24, bold=True, alignment=TA_CENTER, spaceAfter=1) +S_STAT_LBL = make_style('StatLbl', fontSize=7, textColor=MUTED, leading=9, alignment=TA_CENTER, spaceAfter=2) +S_ACCENT_BODY = make_style('AccentBody', fontSize=8.5, textColor=MUTED, leading=12, spaceAfter=2) + +# For table cells +S_CELL = make_style('Cell', fontSize=8, textColor=MUTED, leading=10, spaceAfter=1) +S_CELL_BOLD = make_style('CellBold', fontSize=8, textColor=DARK, leading=10, bold=True, spaceAfter=1) +S_CELL_CHECK = make_style('CellCheck', fontSize=8, textColor=SUCCESS, leading=10, bold=True, spaceAfter=1) +S_CELL_CROSS = make_style('CellCross', fontSize=8, textColor=HexColor('#CBD5E1'), leading=10, spaceAfter=1) +S_CELL_HL = make_style('CellHL', fontSize=8, textColor=ACCENT, leading=10, bold=True, spaceAfter=1) + + +def header_block(subtitle=''): + """Page header table.""" + data = [[ + Paragraph('FlowForge', make_style('Logo', fontSize=14, textColor=DARK, bold=True)), + Paragraph(subtitle, make_style('Meta', fontSize=7, textColor=LIGHT_GRAY, alignment=TA_RIGHT)), + ]] + t = Table(data, colWidths=[80*mm, 90*mm]) + t.setStyle(TableStyle([ + ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'), + ('LINEBELOW', (0, 0), (-1, 0), 1.5, DARK), + ('BOTTOMPADDING', (0, 0), (-1, 0), 6), + ])) + return t + + +def footer_block(page_num): + data = [[ + Paragraph('FlowForge β€” Confidential', S_TINY), + Paragraph(f'Page {page_num} of 4', make_style('FR', fontSize=7, textColor=LIGHT_GRAY, alignment=TA_RIGHT)), + ]] + t = Table(data, colWidths=[85*mm, 85*mm]) + t.setStyle(TableStyle([ + ('LINEABOVE', (0, 0), (-1, 0), 0.5, BORDER), + ('TOPPADDING', (0, 0), (-1, 0), 4), + ])) + return t + + +def stat_cell(num, label, num_color=ACCENT, bg=BG_LIGHT): + """Return a list of flowables for a stat box.""" + return [ + Paragraph(f'{num}', make_style('SN', fontSize=18, textColor=num_color, leading=22, bold=True, alignment=TA_CENTER, spaceAfter=1)), + Paragraph(label, make_style('SL', fontSize=7, textColor=MUTED, leading=9, alignment=TA_CENTER, spaceAfter=2)), + ] + + +def card_table(cells_data, col_widths, bg_color=BG_LIGHT, border_color=BORDER): + """Create a styled card-like table.""" + t = Table(cells_data, colWidths=col_widths) + t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), bg_color), + ('BOX', (0, 0), (-1, -1), 0.5, border_color), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (-1, -1), 8), + ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), + ('BOTTOMPADDING', (0, 0), (-1, -1), 6), + ('ROUNDEDCORNERS', [4, 4, 4, 4]), + ])) + return t + + +def hr(): + return HRFlowable(width='100%', thickness=0.5, color=BORDER, spaceAfter=6, spaceBefore=6) + + +# ══════════════════════════════════════════════════════════════════ +# BUILD DOCUMENT +# ══════════════════════════════════════════════════════════════════ + +output_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'FlowForge-Investor-Deck-India.pdf') + +doc = SimpleDocTemplate( + output_path, pagesize=A4, + leftMargin=2*cm, rightMargin=2*cm, + topMargin=1.5*cm, bottomMargin=1.5*cm, +) + +story = [] +content_width = W - 4*cm # usable width + +# ════════════════════════════════════════════════════════════════ +# PAGE 1 β€” COVER + PROBLEM + SOLUTION +# ════════════════════════════════════════════════════════════════ + +story.append(header_block('Confidential | Seed Round | March 2026')) +story.append(Spacer(1, 6*mm)) + +# Hero box +hero_data = [[ + [ + Paragraph('Ship Software Faster with
AI-Powered Project Management
', + make_style('HeroH', fontSize=18, textColor=white, leading=22, bold=True, spaceAfter=6)), + Paragraph('The first PM platform that doesn\'t just track work β€” it does the work. ' + 'AI code generation, GitHub integration, and smart sprint planning in one workflow.', + make_style('HeroP', fontSize=9.5, textColor=HexColor('#94A3B8'), leading=13, spaceAfter=6)), + Paragraph('Raising β‚Ή20 Cr (~$2.5M) Seed Round', + make_style('HeroBadge', fontSize=9, textColor=ACCENT_LIGHT, leading=12, bold=True)), + ] +]] +hero = Table(hero_data, colWidths=[content_width]) +hero.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), DARK), + ('ROUNDEDCORNERS', [6, 6, 6, 6]), + ('LEFTPADDING', (0, 0), (-1, -1), 20), + ('RIGHTPADDING', (0, 0), (-1, -1), 20), + ('TOPPADDING', (0, 0), (-1, -1), 18), + ('BOTTOMPADDING', (0, 0), (-1, -1), 18), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), +])) +story.append(hero) +story.append(Spacer(1, 5*mm)) + +# Problem +story.append(Paragraph('THE PROBLEM', S_LABEL)) +story.append(Paragraph('Engineering teams lose 23% of their time to tooling overhead', S_H2)) +story.append(Spacer(1, 2*mm)) + +prob_data = [[ + [Paragraph('Tool Fragmentation', S_H4), + Paragraph('Teams juggle 5-7 tools β€” Jira, GitHub, Slack, CI/CD β€” losing hours daily to context switching.', S_SMALL)], + [Paragraph('Slow PR Cycles', S_H4), + Paragraph('Average PR sits open 4.5 days. Code reviews bottleneck delivery. Junior devs wait days for feedback.', S_SMALL)], + [Paragraph('Planning Theater', S_H4), + Paragraph('Sprint planning takes hours, estimates are guesswork, retrospectives produce the same action items.', S_SMALL)], +]] +cw = content_width / 3 - 2*mm +prob_t = Table(prob_data, colWidths=[cw, cw, cw], hAlign='LEFT') +prob_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), RED_BG), + ('BOX', (0, 0), (0, 0), 0.5, RED_BORDER), + ('BOX', (1, 0), (1, 0), 0.5, RED_BORDER), + ('BOX', (2, 0), (2, 0), 0.5, RED_BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (-1, -1), 8), + ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), + ('BOTTOMPADDING', (0, 0), (-1, -1), 6), + ('ROUNDEDCORNERS', [4, 4, 4, 4]), +])) +story.append(prob_t) + +story.append(hr()) + +# Solution +story.append(Paragraph('THE SOLUTION', S_LABEL)) +story.append(Paragraph('One platform that plans, codes, reviews, and ships', S_H2)) +story.append(Paragraph( + 'FlowForge replaces the fragmented toolchain with an AI-native workflow automating ' + 'the entire SDLC β€” from task creation to merged PR.', S_BODY)) +story.append(Spacer(1, 2*mm)) + +# Flow diagram +flow_text = (' Create Task β†’ ' + 'AI Codes β†’ ' + 'Human Reviews β†’ ' + 'AI Responds β†’ ' + 'Ship It') +story.append(Paragraph(flow_text, make_style('Flow', fontSize=10, leading=14, alignment=TA_CENTER, + textColor=ACCENT, spaceAfter=6, spaceBefore=2))) +story.append(Spacer(1, 2*mm)) + +# Feature cards (2x2) +feat_w = content_width / 2 - 2*mm +feats = [ + ('AI Code Generation', 'Generates production-ready code from task descriptions β€” including tests, error handling, and PR creation. Supports OpenAI GPT-4o and Anthropic Claude.'), + ('Deep GitHub Integration', 'Auto-creates branches and PRs, processes webhooks in real-time, tracks CI/CD status, and syncs bidirectionally with repositories.'), + ('AI Sprint Planning', 'Intelligent story point estimation, risk assessment, dependency detection, and automatic retrospective generation from sprint data.'), + ('Smart Review Handling', 'AI classifies review comments as code changes vs. discussions, generates contextual responses, and updates code based on feedback.'), +] +feat_data = [] +for i in range(0, 4, 2): + row = [] + for j in range(2): + row.append([ + Paragraph(feats[i+j][0], S_H4), + Paragraph(feats[i+j][1], S_SMALL), + ]) + feat_data.append(row) + +feat_t = Table(feat_data, colWidths=[feat_w, feat_w]) +feat_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), BG_LIGHT), + ('BOX', (0, 0), (0, 0), 0.5, BORDER), ('BOX', (1, 0), (1, 0), 0.5, BORDER), + ('BOX', (0, 1), (0, 1), 0.5, BORDER), ('BOX', (1, 1), (1, 1), 0.5, BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (-1, -1), 8), + ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), + ('BOTTOMPADDING', (0, 0), (-1, -1), 6), +])) +story.append(feat_t) + +story.append(Spacer(1, 4*mm)) +story.append(footer_block(1)) +story.append(PageBreak()) + +# ════════════════════════════════════════════════════════════════ +# PAGE 2 β€” MARKET + COMPETITION + INDIA ANGLE +# ════════════════════════════════════════════════════════════════ + +story.append(header_block('Market Opportunity & Competitive Landscape')) +story.append(Spacer(1, 4*mm)) + +story.append(Paragraph('MARKET OPPORTUNITY', S_LABEL)) +story.append(Paragraph('A massive global market β€” with India as a unique wedge', S_H2)) +story.append(Spacer(1, 3*mm)) + +# Market stats row +sw = content_width / 4 - 2*mm +mkt_data = [[ + stat_cell('$85B', 'Project Mgmt TAM (Global)'), + stat_cell('$22B', 'Developer Tools SAM'), + stat_cell('$4.5B', 'AI DevTools SOM (Target)'), + stat_cell('28M+', 'Professional Developers'), +]] +mkt_t = Table(mkt_data, colWidths=[sw, sw, sw, sw]) +mkt_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), BG_LIGHT), + ('BOX', (0, 0), (0, 0), 0.5, BORDER), ('BOX', (1, 0), (1, 0), 0.5, BORDER), + ('BOX', (2, 0), (2, 0), 0.5, BORDER), ('BOX', (3, 0), (3, 0), 0.5, BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('TOPPADDING', (0, 0), (-1, -1), 8), + ('BOTTOMPADDING', (0, 0), (-1, -1), 8), +])) +story.append(mkt_t) +story.append(Spacer(1, 3*mm)) + +# India Advantage +india_data = [[ + [Paragraph('India Advantage', S_H4), + Paragraph( + 'India has 5.8M+ developers (2nd largest globally) and 1,600+ GCCs employing 1.9M+ ' + 'tech professionals. Indian IT services ($250B+) are under pressure to adopt AI-native tooling. FlowForge is ' + 'built in India with 3-4x capital efficiency vs. US peers β€” the same playbook that built Freshworks ' + '($12B), Postman ($5.6B), and Zoho into global SaaS leaders. Land with India\'s startup ecosystem, expand ' + 'globally via GitHub\'s developer network.', S_SMALL)] +]] +india_t = Table(india_data, colWidths=[content_width]) +india_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), ORANGE_BG), + ('BOX', (0, 0), (-1, -1), 0.5, ORANGE_BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (-1, -1), 10), + ('RIGHTPADDING', (0, 0), (-1, -1), 10), + ('TOPPADDING', (0, 0), (-1, -1), 8), + ('BOTTOMPADDING', (0, 0), (-1, -1), 8), +])) +story.append(india_t) +story.append(Spacer(1, 3*mm)) + +# Two columns: Target Customers | Competition +left_w = content_width * 0.45 +right_w = content_width * 0.55 + +# Target customers +cust_items = [ + 'Primary β€” Startups & SMBs: 5-50 person teams on GitHub. ACV: β‚Ή50K-3L/yr.', + 'Secondary β€” GCCs & Mid-Market: 50-500 engineers in 1,600+ GCCs. ACV: β‚Ή40L-1.5Cr/yr.', + 'Expansion β€” Enterprise / IT Services: SSO, on-prem, SLAs. ACV: β‚Ή1.5Cr+/yr.', +] +left_content = [Paragraph('TARGET CUSTOMERS', S_LABEL)] +for item in cust_items: + left_content.append(Paragraph(f'β€’ {item}', S_SMALL)) + +# Why Now +left_content.append(Spacer(1, 3*mm)) +why_data = [[ + [Paragraph('Why Now? ' + 'LLMs crossed the production-code-quality threshold in 2025. AI coding tools normalized AI-assisted ' + 'development. But no tool connects task mgmt β†’ code gen β†’ review β†’ deployment. FlowForge is first to close this loop.', + S_SMALL)] +]] +why_t = Table(why_data, colWidths=[left_w - 4*mm]) +why_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), ACCENT_BG), + ('BOX', (0, 0), (-1, -1), 0.5, HexColor('#C7D2FE')), + ('LEFTPADDING', (0, 0), (-1, -1), 8), ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), ('BOTTOMPADDING', (0, 0), (-1, -1), 6), +])) +left_content.append(why_t) + +# Competition table +right_content = [Paragraph('COMPETITIVE LANDSCAPE', S_LABEL)] + +comp_headers = ['Capability', 'FlowForge', 'Jira', 'Linear', 'Copilot'] +comp_rows = [ + ['Task & Sprint Mgmt', 'βœ“ Full', 'βœ“ Full', 'βœ“ Full', 'βœ—'], + ['AI Code Generation', 'βœ“ Full', 'βœ—', 'βœ—', 'Inline'], + ['Auto PR Creation', 'βœ“ Full', 'βœ—', 'βœ—', 'βœ—'], + ['AI Review Response', 'βœ“ Full', 'βœ—', 'βœ—', 'βœ—'], + ['AI Sprint Planning', 'βœ“ Full', 'βœ—', 'βœ—', 'βœ—'], + ['GitHub Integration', 'βœ“ Native', 'Plugin', 'βœ“ Good', 'βœ“ Native'], + ['Taskβ†’Codeβ†’PR Loop', 'βœ“ E2E', 'βœ—', 'βœ—', 'βœ—'], + ['Multi AI Provider', 'βœ“ 2', 'βœ—', 'βœ—', 'βœ—'], +] + +comp_data = [] +# Header row +comp_data.append([Paragraph(f'{h}', S_CELL_HL if i == 1 else S_CELL_BOLD) for i, h in enumerate(comp_headers)]) +for row in comp_rows: + styled_row = [] + for i, cell in enumerate(row): + if i == 0: + styled_row.append(Paragraph(f'{cell}', S_CELL_BOLD)) + elif cell.startswith('βœ“'): + styled_row.append(Paragraph(f'{cell}', S_CELL_CHECK)) + elif cell == 'βœ—': + styled_row.append(Paragraph(cell, S_CELL_CROSS)) + else: + styled_row.append(Paragraph(cell, S_CELL)) + comp_data.append(styled_row) + +rcw = right_w - 4*mm +comp_cws = [rcw*0.28, rcw*0.20, rcw*0.16, rcw*0.16, rcw*0.20] +comp_t = Table(comp_data, colWidths=comp_cws) +comp_style = [ + ('GRID', (0, 0), (-1, -1), 0.5, BORDER), + ('BACKGROUND', (0, 0), (-1, 0), BG_LIGHT), + ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'), + ('LEFTPADDING', (0, 0), (-1, -1), 4), + ('RIGHTPADDING', (0, 0), (-1, -1), 4), + ('TOPPADDING', (0, 0), (-1, -1), 3), + ('BOTTOMPADDING', (0, 0), (-1, -1), 3), +] +# Highlight FlowForge column +for r in range(len(comp_data)): + comp_style.append(('BACKGROUND', (1, r), (1, r), ACCENT_BG)) +comp_t.setStyle(TableStyle(comp_style)) +right_content.append(comp_t) + +# Moat callout +right_content.append(Spacer(1, 3*mm)) +moat_data = [[ + [Paragraph('Moat: Data Flywheel β€” ' + 'Every AI execution improves code quality, review accuracy, and estimation precision. ' + 'Compounding data advantages competitors can\'t replicate.', + S_SMALL)] +]] +moat_t = Table(moat_data, colWidths=[rcw]) +moat_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), ACCENT_BG), + ('BOX', (0, 0), (-1, -1), 0.5, HexColor('#C7D2FE')), + ('LEFTPADDING', (0, 0), (-1, -1), 8), ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), ('BOTTOMPADDING', (0, 0), (-1, -1), 6), +])) +right_content.append(moat_t) + +# Combine into 2-column layout +main_2col = Table([[left_content, right_content]], colWidths=[left_w, right_w]) +main_2col.setStyle(TableStyle([ + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (0, 0), 0), + ('RIGHTPADDING', (0, 0), (0, 0), 4), + ('LEFTPADDING', (1, 0), (1, 0), 4), + ('RIGHTPADDING', (1, 0), (1, 0), 0), +])) +story.append(main_2col) + +story.append(Spacer(1, 4*mm)) +story.append(footer_block(2)) +story.append(PageBreak()) + +# ════════════════════════════════════════════════════════════════ +# PAGE 3 β€” BUSINESS MODEL + TRACTION + ROADMAP +# ════════════════════════════════════════════════════════════════ + +story.append(header_block('Business Model, Traction & Roadmap')) +story.append(Spacer(1, 4*mm)) + +half_w = content_width / 2 - 3*mm + +# Left: Business Model +left3 = [] +left3.append(Paragraph('BUSINESS MODEL', S_LABEL)) +left3.append(Paragraph('SaaS + Usage-Based AI Upside', S_H2)) +left3.append(Spacer(1, 2*mm)) + +# Pricing +pw = (half_w - 4*mm) / 3 +price_data = [ + [Paragraph('FREE', make_style('PT', fontSize=7, textColor=ACCENT, bold=True, alignment=TA_CENTER)), + Paragraph('PRO', make_style('PT', fontSize=7, textColor=ACCENT, bold=True, alignment=TA_CENTER)), + Paragraph('ENTERPRISE', make_style('PT', fontSize=7, textColor=ACCENT, bold=True, alignment=TA_CENTER))], + [Paragraph('β‚Ή0', make_style('PP', fontSize=14, textColor=DARK, bold=True, alignment=TA_CENTER)), + Paragraph('β‚Ή999/user/mo', make_style('PP2', fontSize=14, textColor=DARK, bold=True, alignment=TA_CENTER)), + Paragraph('Custom', make_style('PP3', fontSize=12, textColor=DARK, bold=True, alignment=TA_CENTER))], + [Paragraph('βœ“ Up to 3 projects\nβœ“ GitHub integration\nβœ“ Basic AI', S_SMALL), + Paragraph('βœ“ Unlimited projects\nβœ“ Advanced AI gen\nβœ“ Sprint analytics\nβœ“ Priority support', S_SMALL), + Paragraph('βœ“ SSO / SAML\nβœ“ On-premise deploy\nβœ“ Custom integrations\nβœ“ SLA guarantees', S_SMALL)], +] +price_t = Table(price_data, colWidths=[pw, pw, pw]) +price_style = [ + ('GRID', (0, 0), (-1, -1), 0.5, BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('TOPPADDING', (0, 0), (-1, -1), 4), + ('BOTTOMPADDING', (0, 0), (-1, -1), 4), + ('LEFTPADDING', (0, 0), (-1, -1), 6), + ('RIGHTPADDING', (0, 0), (-1, -1), 6), + ('BACKGROUND', (1, 0), (1, -1), ACCENT_BG), +] +price_t.setStyle(TableStyle(price_style)) +left3.append(price_t) +left3.append(Spacer(1, 2*mm)) + +left3.append(Paragraph('Revenue drivers: Seat-based SaaS (predictable MRR) + AI execution credits (usage upside) + Enterprise annual contracts.', S_SMALL)) +left3.append(Spacer(1, 2*mm)) + +# Unit Economics +left3.append(Paragraph('TARGET UNIT ECONOMICS', S_LABEL)) +econ_items = [ + ('LTV (per seat)', 'β‚Ή2.4L ($2,880)'), + ('CAC', 'β‚Ή26K ($320)'), + ('LTV:CAC Ratio', '9:1'), + ('Gross Margin', '78%'), + ('Net Revenue Retention', '125%'), + ('Payback Period', '4 months'), +] +econ_data = [] +for label, val in econ_items: + econ_data.append([ + Paragraph(label, S_SMALL), + Paragraph(f'{val}', make_style('EV', fontSize=8, textColor=DARK, bold=True, alignment=TA_RIGHT, leading=11)), + ]) +econ_t = Table(econ_data, colWidths=[half_w*0.55, half_w*0.45 - 4*mm]) +econ_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), BG_LIGHT), + ('LINEBELOW', (0, 0), (-1, -2), 0.5, BORDER), + ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'), + ('LEFTPADDING', (0, 0), (-1, -1), 6), + ('RIGHTPADDING', (0, 0), (-1, -1), 6), + ('TOPPADDING', (0, 0), (-1, -1), 3), + ('BOTTOMPADDING', (0, 0), (-1, -1), 3), +])) +left3.append(econ_t) +left3.append(Spacer(1, 2*mm)) + +# Land & Expand +le_data = [[[ + Paragraph('Land & Expand: ' + 'Free tier drives adoption β†’ teams upgrade as AI proves value β†’ ' + 'avg expansion 3x in 6 months. PLG keeps CAC low.', S_SMALL) +]]] +le_t = Table(le_data, colWidths=[half_w - 4*mm]) +le_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), SUCCESS_BG), + ('BOX', (0, 0), (-1, -1), 0.5, HexColor('#BBF7D0')), + ('LEFTPADDING', (0, 0), (-1, -1), 8), ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), ('BOTTOMPADDING', (0, 0), (-1, -1), 6), +])) +left3.append(le_t) + +# Right: Traction + Roadmap +right3 = [] +right3.append(Paragraph('TRACTION', S_LABEL)) +right3.append(Paragraph('Product-First, Capital-Efficient', S_H2)) +right3.append(Spacer(1, 2*mm)) + +# Traction stats +tsw = (half_w - 4*mm) / 2 +trac_data = [ + [stat_cell('295+', 'Source files shipped'), stat_cell('50+', 'Features built')], + [stat_cell('15+', 'PRs merged'), stat_cell('2', 'AI providers')], +] +trac_t = Table(trac_data, colWidths=[tsw, tsw]) +trac_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), BG_LIGHT), + ('BOX', (0, 0), (0, 0), 0.5, BORDER), ('BOX', (1, 0), (1, 0), 0.5, BORDER), + ('BOX', (0, 1), (0, 1), 0.5, BORDER), ('BOX', (1, 1), (1, 1), 0.5, BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('TOPPADDING', (0, 0), (-1, -1), 6), ('BOTTOMPADDING', (0, 0), (-1, -1), 6), +])) +right3.append(trac_t) +right3.append(Spacer(1, 2*mm)) + +trac_bullets = [ + 'Full Kanban board with drag-and-drop, WIP limits, task hierarchy', + 'End-to-end AI code generation with human-in-the-loop review', + 'Deep GitHub integration β€” webhooks, PR management, CI/CD tracking', + 'AI sprint planning β€” risk assessment, dependency detection, auto-retros', + 'Multi-tenant org support with role-based access control', + 'Open-source community with organic contributors', +] +for b in trac_bullets: + right3.append(Paragraph(f'β€’ {b}', S_SMALL)) + +right3.append(Spacer(1, 3*mm)) +right3.append(HRFlowable(width='100%', thickness=0.5, color=BORDER, spaceAfter=3, spaceBefore=0)) + +# Roadmap +right3.append(Paragraph('ROADMAP', S_LABEL)) +phases = [ + ('βœ“ Phase 1 β€” Foundation (Done)', 'Core PM, Kanban, sprints, GitHub, AI code gen pipeline', SUCCESS), + ('β†’ Phase 2 β€” Intelligence (Q2 2026)', 'Analytics, velocity/burndown charts, time tracking', HexColor('#3B82F6')), + ('Phase 3 β€” Ecosystem (Q3 2026)', 'Slack, GitLab, Jira migration, API marketplace', ORANGE_TEXT), + ('Phase 4 β€” Enterprise (Q4 2026)', 'SSO/SAML, on-premise, SOC 2, audit logs, RBAC', ORANGE_TEXT), +] +for title, desc, color in phases: + right3.append(Paragraph(f'{title} β€” {desc}', S_SMALL)) + +# Combine +main_3 = Table([[left3, right3]], colWidths=[half_w, half_w]) +main_3.setStyle(TableStyle([ + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (0, 0), 0), ('RIGHTPADDING', (0, 0), (0, 0), 3), + ('LEFTPADDING', (1, 0), (1, 0), 3), ('RIGHTPADDING', (1, 0), (1, 0), 0), +])) +story.append(main_3) + +story.append(Spacer(1, 4*mm)) +story.append(footer_block(3)) +story.append(PageBreak()) + +# ════════════════════════════════════════════════════════════════ +# PAGE 4 β€” THE ASK + MILESTONES + CLOSING +# ════════════════════════════════════════════════════════════════ + +story.append(header_block('The Ask & Vision')) +story.append(Spacer(1, 4*mm)) + +story.append(Paragraph('THE ASK', S_LABEL)) +story.append(Paragraph('Raising β‚Ή20 Crore (~$2.5M) Seed Round', S_H1)) +story.append(Paragraph( + 'To accelerate product development, launch publicly, build the go-to-market engine, ' + 'and capture the AI-native project management category β€” from India, for the world.', + make_style('AskP', fontSize=10, textColor=MUTED, leading=14, spaceAfter=8))) + +# Big stats +ask_sw = content_width / 3 - 2*mm +ask_data = [[ + stat_cell('β‚Ή20 Cr', 'Seed Round (~$2.5M)', ACCENT, ACCENT_BG), + stat_cell('18 mo', 'Runway to Series A', SUCCESS, SUCCESS_BG), + stat_cell('β‚Ή16 Cr+', 'ARR Target (2027)', HexColor('#F59E0B'), ORANGE_BG), +]] +ask_t = Table(ask_data, colWidths=[ask_sw, ask_sw, ask_sw]) +ask_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (0, 0), ACCENT_BG), ('BOX', (0, 0), (0, 0), 0.5, HexColor('#C7D2FE')), + ('BACKGROUND', (1, 0), (1, 0), SUCCESS_BG), ('BOX', (1, 0), (1, 0), 0.5, HexColor('#BBF7D0')), + ('BACKGROUND', (2, 0), (2, 0), ORANGE_BG), ('BOX', (2, 0), (2, 0), 0.5, ORANGE_BORDER), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('TOPPADDING', (0, 0), (-1, -1), 10), ('BOTTOMPADDING', (0, 0), (-1, -1), 10), +])) +story.append(ask_t) +story.append(Spacer(1, 4*mm)) + +# Two columns: Use of Funds | Milestones +left4 = [] +left4.append(Paragraph('USE OF FUNDS', S_LABEL)) + +funds = [ + ('Engineering (50%)', 'β‚Ή10 Cr', 'Hire 3-4 senior engineers to accelerate roadmap'), + ('AI Infrastructure (20%)', 'β‚Ή4 Cr', 'API costs, model fine-tuning, execution pipeline'), + ('Go-to-Market (20%)', 'β‚Ή4 Cr', 'DevRel, content marketing, India GTM'), + ('Operations (10%)', 'β‚Ή2 Cr', 'Legal, compliance (SOC 2), infrastructure'), +] +fund_data = [] +for cat, amt, desc in funds: + fund_data.append([ + Paragraph(f'{cat}', S_SMALL), + Paragraph(f'{amt}', make_style('FA', fontSize=8, textColor=ACCENT, bold=True, alignment=TA_RIGHT, leading=11)), + ]) + fund_data.append([ + Paragraph(desc, make_style('FD', fontSize=7.5, textColor=MUTED, leading=10, spaceAfter=4)), + Paragraph('', S_SMALL), + ]) + +fund_t = Table(fund_data, colWidths=[half_w*0.65, half_w*0.35 - 4*mm]) +fund_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), BG_LIGHT), + ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'), + ('LEFTPADDING', (0, 0), (-1, -1), 8), + ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 2), + ('BOTTOMPADDING', (0, 0), (-1, -1), 2), + ('BOX', (0, 0), (-1, -1), 0.5, BORDER), +])) +left4.append(fund_t) + +right4 = [] +right4.append(Paragraph('KEY MILESTONES', S_LABEL)) + +milestones = [ + ('Q2 2026 β€” Public Beta', 'Open sign-ups, free tier, community building. Target: 500 active teams.', BG_LIGHT, BORDER), + ('Q3 2026 β€” Revenue Launch', 'Pro tier, GCC outreach, enterprise pilots. Target: β‚Ή40L MRR.', BG_LIGHT, BORDER), + ('Q4 2026 β€” Enterprise Ready', 'SOC 2, SSO/SAML, on-premise. Target: 3 enterprise contracts.', BG_LIGHT, BORDER), + ('2027 β€” Series A Position', 'β‚Ή16 Cr+ ARR, 50+ paying teams, proven unit economics, category leadership.', ACCENT_BG, HexColor('#C7D2FE')), +] +for title, desc, bg, bdr in milestones: + ms_data = [[[ + Paragraph(f'{title}', S_H4), + Paragraph(desc, S_SMALL), + ]]] + ms_t = Table(ms_data, colWidths=[half_w - 4*mm]) + ms_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), bg), + ('BOX', (0, 0), (-1, -1), 0.5, bdr), + ('LEFTPADDING', (0, 0), (-1, -1), 8), ('RIGHTPADDING', (0, 0), (-1, -1), 8), + ('TOPPADDING', (0, 0), (-1, -1), 6), ('BOTTOMPADDING', (0, 0), (-1, -1), 6), + ])) + right4.append(ms_t) + right4.append(Spacer(1, 2*mm)) + +main_4 = Table([[left4, right4]], colWidths=[half_w, half_w]) +main_4.setStyle(TableStyle([ + ('VALIGN', (0, 0), (-1, -1), 'TOP'), + ('LEFTPADDING', (0, 0), (0, 0), 0), ('RIGHTPADDING', (0, 0), (0, 0), 3), + ('LEFTPADDING', (1, 0), (1, 0), 3), ('RIGHTPADDING', (1, 0), (1, 0), 0), +])) +story.append(main_4) +story.append(Spacer(1, 5*mm)) + +# Closing box +close_data = [[ + [ + Paragraph('FlowForge', make_style('CL', fontSize=14, textColor=white, bold=True, alignment=TA_CENTER, spaceAfter=4)), + Paragraph('The future of software delivery starts here.', + make_style('CL2', fontSize=13, textColor=white, bold=True, alignment=TA_CENTER, spaceAfter=4)), + Paragraph('Not another project management tool β€” the platform that makes engineering teams superhuman.', + make_style('CL3', fontSize=9, textColor=HexColor('#94A3B8'), alignment=TA_CENTER, leading=12, spaceAfter=8)), + Paragraph('flowforge.dev | team@flowforge.dev | github.com/flowforge', + make_style('CL4', fontSize=9, textColor=ACCENT_LIGHT, alignment=TA_CENTER)), + ] +]] +close_t = Table(close_data, colWidths=[content_width]) +close_t.setStyle(TableStyle([ + ('BACKGROUND', (0, 0), (-1, -1), DARK), + ('ROUNDEDCORNERS', [6, 6, 6, 6]), + ('LEFTPADDING', (0, 0), (-1, -1), 20), + ('RIGHTPADDING', (0, 0), (-1, -1), 20), + ('TOPPADDING', (0, 0), (-1, -1), 16), + ('BOTTOMPADDING', (0, 0), (-1, -1), 16), +])) +story.append(close_t) + +story.append(Spacer(1, 4*mm)) +story.append(footer_block(4)) + +# ── Build PDF ── +doc.build(story) +print(f'PDF saved: {output_path}') diff --git a/pitch-deck-india.html b/pitch-deck-india.html new file mode 100644 index 0000000..97285b5 --- /dev/null +++ b/pitch-deck-india.html @@ -0,0 +1,735 @@ + + + + + +FlowForge β€” Investor Deck (India) + + + + + + + +
+ + + +
+

Ship Software Faster with
AI-Powered Project Management

+

The first PM platform that doesn't just track work β€” it does the work. AI code generation, GitHub integration, and smart sprint planning in one workflow.

+
Raising β‚Ή20 Cr (~$2.5M) Seed Round
+
+ + + +

Engineering teams lose 23% of their time to tooling overhead

+
+
+

Tool Fragmentation

+

Teams juggle 5-7 tools β€” Jira, GitHub, Slack, CI/CD β€” losing hours daily to context switching.

+
+
+

Slow PR Cycles

+

Average PR sits open 4.5 days. Code reviews bottleneck delivery. Junior devs wait days for feedback.

+
+
+

Planning Theater

+

Sprint planning takes hours, estimates are guesswork, retrospectives produce the same action items.

+
+
+ +
+ + + +

One platform that plans, codes, reviews, and ships

+

FlowForge replaces the fragmented toolchain with an AI-native workflow automating the entire SDLC β€” from task creation to merged PR.

+ +
+
πŸ“

Create Task

+
β†’
+
πŸ€–

AI Codes

+
β†’
+
πŸ‘€

Human Reviews

+
β†’
+
πŸ’¬

AI Responds

+
β†’
+
πŸš€

Ship It

+
+ +
+
+

AI Code Generation

+

Generates production-ready code from task descriptions β€” including tests, error handling, and PR creation. Supports OpenAI GPT-4o and Anthropic Claude.

+
+
+

Deep GitHub Integration

+

Auto-creates branches and PRs, processes webhooks in real-time, tracks CI/CD status, and syncs bidirectionally with repositories.

+
+
+

AI Sprint Planning

+

Intelligent story point estimation, risk assessment, dependency detection, and automatic retrospective generation from sprint data.

+
+
+

Smart Review Handling

+

AI classifies review comments as code changes vs. discussions, generates contextual responses, and updates code based on feedback.

+
+
+ + +
+ + +
+ + + +

A massive global market β€” with India as a unique wedge

+ +
+
+
$85B
+
Project Management
TAM (Global)
+
+
+
$22B
+
Developer Tools
SAM
+
+
+
$4.5B
+
AI-Powered DevTools
SOM (Target)
+
+
+
28M+
+
Professional Developers
Worldwide
+
+
+ +
+

India Advantage

+

India has 5.8M+ developers (2nd largest globally) and 1,600+ GCCs employing 1.9M+ tech professionals. Indian IT services ($250B+) are under pressure to adopt AI-native tooling. FlowForge is built in India with 3-4x capital efficiency vs. US peers β€” the same playbook that built Freshworks ($12B), Postman ($5.6B), and Zoho into global SaaS leaders. Our target: land with India's fast-growing startup ecosystem, then expand globally via GitHub's developer network.

+
+ +
+
+ +
+

Primary: Startups & SMBs (India + Global)

+

5-50 person engineering teams on GitHub. Fast adopters of AI. ACV: β‚Ή50K-3L/yr.

+
+
+

Secondary: GCCs & Mid-Market

+

50-500 engineers in India's 1,600+ GCCs looking to consolidate tools. ACV: β‚Ή40L-1.5Cr/yr.

+
+
+

Expansion: Enterprise / IT Services

+

Large-scale deployments with SSO, on-prem, SLA guarantees. ACV: β‚Ή1.5Cr+/yr.

+
+ +
+

Why Now?

+

LLMs crossed the production-code-quality threshold in 2025. AI coding tools (Copilot, Cursor) normalized AI-assisted development. But no tool connects task management β†’ code generation β†’ review β†’ deployment. FlowForge is first to close this loop.

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CapabilityFlowForgeJiraLinearCopilot
Task & Sprint Mgmtβœ“ Fullβœ“ Fullβœ“ Fullβœ—
AI Code Generationβœ“ Fullβœ—βœ—Inline
Auto PR Creationβœ“ Fullβœ—βœ—βœ—
AI Review Responseβœ“ Fullβœ—βœ—βœ—
AI Sprint Planningβœ“ Fullβœ—βœ—βœ—
GitHub Integrationβœ“ NativePluginβœ“ Goodβœ“ Native
Taskβ†’Codeβ†’PR Loopβœ“ E2Eβœ—βœ—βœ—
Multi AI Providerβœ“ 2βœ—βœ—βœ—
+ +
+

Moat: Data Flywheel

+

Every AI execution improves code quality, review accuracy, and estimation precision. The task→PR pipeline creates compounding data advantages that competitors can't replicate without rebuilding both PM and AI layers.

+
+
+
+ + +
+ + +
+ + +
+ +
+ +

SaaS + Usage-Based AI Upside

+ +
+
+
Free
+
β‚Ή0
+
    +
  • Up to 3 projects
  • +
  • GitHub integration
  • +
  • Basic AI suggestions
  • +
+
+ +
+
Enterprise
+
Custom
+
    +
  • SSO / SAML
  • +
  • On-premise deploy
  • +
  • SLA guarantees
  • +
+
+
+ +

Revenue drivers: Seat-based SaaS (predictable MRR) + AI execution credits (usage upside) + Enterprise annual contracts.

+ + +
+
LTV (per seat)β‚Ή2.4L ($2,880)
+
CACβ‚Ή26K ($320)
+
LTV:CAC Ratio9:1
+
Gross Margin78%
+
Net Revenue Retention125%
+
Payback Period4 months
+
+ +
+

Land & Expand

+

Free tier drives adoption β†’ teams upgrade as AI executions prove value β†’ average expansion 3x within 6 months. PLG motion keeps CAC low.

+
+
+ + +
+ +

Product-First, Capital-Efficient

+ +
+
+
295+
+
Source files shipped
+
+
+
50+
+
Features built
+
+
+
15+
+
PRs merged
+
+
+
2
+
AI providers integrated
+
+
+ +
    +
  • Full Kanban board with drag-and-drop, WIP limits, task hierarchy (Epics β†’ Subtasks)
  • +
  • End-to-end AI code generation pipeline with human-in-the-loop review
  • +
  • Deep GitHub integration β€” webhooks, PR management, CI/CD tracking
  • +
  • AI sprint planning β€” risk assessment, dependency detection, auto-retros
  • +
  • Multi-tenant org support with role-based access control
  • +
  • Open-source community with organic contributors and feature requests
  • +
+ +
+ + +
+
+
βœ“
+
+

Phase 1 β€” Foundation (Done)

+

Core PM, Kanban, sprints, GitHub integration, AI code generation pipeline

+
+
+
+
β†’
+
+

Phase 2 β€” Intelligence (Q2 2026)

+

Advanced analytics, velocity/burndown charts, time tracking, custom dashboards

+
+
+
+ +
+

Phase 3 β€” Ecosystem (Q3 2026)

+

Slack, GitLab, Jira migration, API marketplace, automation rules

+
+
+
+ +
+

Phase 4 β€” Enterprise (Q4 2026)

+

SSO/SAML, on-premise, SOC 2, audit logs, advanced RBAC

+
+
+
+
+
+ + +
+ + +
+ + + +

Raising β‚Ή20 Crore (~$2.5M) Seed Round

+

To accelerate product development, launch publicly, build the go-to-market engine, and capture the AI-native project management category β€” from India, for the world.

+ +
+
+
β‚Ή20 Cr
+
Seed Round (~$2.5M)
+
+
+
18 mo
+
Runway to Series A
+
+
+
β‚Ή16 Cr+
+
ARR Target (2027)
+
+
+ +
+
+ +
+ +
+
+ Engineering (50%)β‚Ή10 Cr +
+
+
+
+

Hire 3-4 senior engineers to accelerate roadmap

+
+
+
+ AI Infrastructure (20%)β‚Ή4 Cr +
+
+
+
+

API costs, model fine-tuning, execution pipeline

+
+
+
+ Go-to-Market (20%)β‚Ή4 Cr +
+
+
+
+

DevRel, content marketing, community building, India GTM

+
+
+
+ Operations (10%)β‚Ή2 Cr +
+
+
+
+

Legal, compliance (SOC 2), cloud infrastructure

+
+
+
+ +
+ +
+
+
+

Q2 2026 β€” Public Beta

+ NEXT +
+

Open sign-ups, free tier launch, community building. Target: 500 active teams.

+
+
+

Q3 2026 β€” Revenue Launch

+

Pro tier monetization, GCC outreach, enterprise pilots. Target: β‚Ή40L MRR.

+
+
+

Q4 2026 β€” Enterprise Ready

+

SOC 2, SSO/SAML, on-premise option. Target: 3 enterprise contracts.

+
+
+

2027 β€” Series A Position

+

β‚Ή16 Cr+ ARR, 50+ paying teams, proven unit economics, category leadership in AI-native PM.

+
+
+
+
+ + +
+
+ FlowForge +
+

The future of software delivery starts here.

+

Not another project management tool β€” the platform that makes engineering teams superhuman.

+
+ flowforge.dev + team@flowforge.dev + github.com/flowforge +
+
+ + +
+ + + diff --git a/pitch-deck.html b/pitch-deck.html new file mode 100644 index 0000000..5768c8e --- /dev/null +++ b/pitch-deck.html @@ -0,0 +1,1018 @@ + + + + + +FlowForge β€” Investor Pitch Deck + + + + +
+ +
+ + +
+
+ +

Ship Software Faster
with AI-Powered
Project Management

+

The first project management platform that doesn't just track your work β€” it does the work. FlowForge combines AI code generation, GitHub integration, and smart sprint planning into one seamless workflow.

+
Seed Round β€” March 2026
+
+
+ + +
+
+
The Problem
+

Engineering teams are drowning
in process, not shipping code

+
+
+
πŸ”€
+

Tool Fragmentation

+

Teams juggle 5-7 tools β€” Jira, GitHub, Slack, CI/CD, code review β€” losing hours to context switching every day.

+
+
+
🐌
+

Slow PR Cycles

+

Average PR sits open 4.5 days. Code reviews bottleneck delivery. Junior devs wait days for feedback on straightforward changes.

+
+
+
πŸ“Š
+

Planning Theater

+

Sprint planning takes hours, estimates are guesswork, and retrospectives produce the same action items every time.

+
+
+
+
+
23%
+
of dev time lost to
context switching
+
+
+
4.5d
+
average time to
merge a PR
+
+
+
$85B
+
spent annually on
project management tools
+
+
+
2
+
+
+ + +
+
+
The Solution
+

One platform that plans, codes,
reviews, and ships

+

FlowForge replaces your fragmented toolchain with an AI-native workflow that automates the entire software development lifecycle β€” from task creation to merged PR.

+
+
+
πŸ“
+

Create Task

+

Describe what you need

+
+
β†’
+
+
πŸ€–
+

AI Generates Code

+

Production-ready PR

+
+
β†’
+
+
πŸ‘€
+

Human Reviews

+

You stay in control

+
+
β†’
+
+
πŸ’¬
+

AI Responds

+

Handles review feedback

+
+
β†’
+
+
πŸš€
+

Ship It

+

Merge & deploy

+
+
+
+
+
🧠
+

AI Code Generation

+

Generates production-ready code from task descriptions, including tests and error handling.

+
+
+
πŸ”—
+

Deep GitHub Integration

+

Auto-creates branches, PRs, and handles webhooks. Real-time sync with your repos.

+
+
+
πŸ“ˆ
+

AI Sprint Planning

+

Intelligent estimates, risk assessment, dependency detection, and retrospective generation.

+
+
+
πŸ’¬
+

Smart Review Handling

+

AI classifies review comments and generates contextual code changes or discussion responses.

+
+
+
3
+
+
+ + +
+
+
Product
+

How FlowForge works

+

A human-in-the-loop AI workflow that keeps developers in control while automating the tedious parts.

+
+
+

Task Execution Pipeline

+
+
+
1
+
+

Task Created with Requirements

+

Developer describes what's needed β€” feature, bug fix, or refactor.

+
+
+
+
2
+
+

AI Generates Branch & Code

+

Creates branch, generates production code with tests, opens a PR.

+
+
+
+
3
+
+

Human Review Checkpoint

+

Developer reviews the AI-generated code. Full control, no black boxes.

+
+
+
+
4
+
+

AI Addresses Feedback

+

Review comments are classified β€” AI updates code or responds to discussions.

+
+
+
+
5
+
+

Merge & Deploy

+

Approved PR is merged. CI/CD status tracked in FlowForge.

+
+
+
+
+
+

AI-Powered Planning

+
+

Sprint Intelligence

+

AI analyzes team velocity, task complexity, and dependencies to suggest optimal sprint plans. Generates retrospectives automatically.

+
+
+

Risk Assessment

+

Identifies high-risk tasks, detects blockers, and warns about overcommitment before the sprint starts.

+
+
+

Dependency Detection

+

Automatically discovers task relationships and creates dependency warnings to prevent bottlenecks.

+
+
+

Smart Estimation

+

AI estimates story points based on task complexity, historical velocity, and codebase analysis.

+
+
+
+
4
+
+
+ + +
+
+
Market Opportunity
+

A massive market at an inflection point

+

AI is reshaping how software is built. The teams that adopt AI-native workflows will outpace those stuck with legacy tools.

+
+
+
+
+
$85B
+
Project Management
TAM (2026)
+
+
+
$22B
+
Developer Tools
SAM
+
+
+
$4.5B
+
AI-Powered DevTools
SOM (target)
+
+
+
28M
+
Professional
developers worldwide
+
+
+
+

Market Tailwinds

+
    +
  • AI coding tools (Copilot, Cursor) normalized AI-assisted development
  • +
  • Remote work increased demand for async collaboration tools
  • +
  • Engineering teams under pressure to do more with less
  • +
  • Legacy tools (Jira) haven't innovated on core workflows in years
  • +
+
+
+
+

Target Customer

+
+

Primary: Startups & SMBs

+

5-50 person engineering teams using GitHub. Ship fast, lean ops, receptive to AI. Average deal: $600-$3,600/yr.

+
+
+

Secondary: Mid-Market

+

50-500 engineers looking to consolidate tools and accelerate delivery. Average deal: $50K-$200K/yr.

+
+
+

Expansion: Enterprise

+

Custom deployments, SSO/SAML, on-premise. Average deal: $200K+/yr with SLA guarantees.

+
+
+

Why Now?

+

LLM capabilities crossed the quality threshold for production code generation in 2025. FlowForge is the first to integrate this into the full SDLC workflow.

+
+
+
+
5
+
+
+ + +
+
+
Competitive Landscape
+

The only platform that closes the loop

+

Competitors do parts of the workflow. FlowForge is the only platform that connects task management β†’ code generation β†’ review β†’ deployment in one tool.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CapabilityFlowForgeJiraLinearGitHub ProjectsCopilot
Task & Sprint Managementβœ“ Fullβœ“ Fullβœ“ FullPartialβœ—
AI Code Generationβœ“ Fullβœ—βœ—βœ—βœ“ Inline only
Auto PR Creationβœ“ Fullβœ—βœ—βœ—βœ—
AI Review Responseβœ“ Fullβœ—βœ—βœ—βœ—
AI Sprint Planningβœ“ Fullβœ—βœ—βœ—βœ—
Deep GitHub Integrationβœ“ NativePluginβœ“ Goodβœ“ Nativeβœ“ Native
Task β†’ Code β†’ PR Pipelineβœ“ End-to-endβœ—βœ—βœ—βœ—
Multi AI Providerβœ“ OpenAI + Claudeβœ—βœ—βœ—βœ—
+
+
🏰
+
+

Competitive Moat

+

Our task-to-PR pipeline creates a data flywheel β€” every execution improves code quality, review accuracy, and estimation precision. Competitors would need to rebuild both the PM and AI layers to match.

+
+
+
6
+
+
+ + +
+
+
Business Model
+

SaaS with usage-based AI upside

+
+
+
+
+
Free
+
$0
+
    +
  • Up to 3 projects
  • +
  • GitHub integration
  • +
  • Basic AI suggestions
  • +
  • Community support
  • +
+
+ +
+
Enterprise
+
Custom
+
    +
  • SSO / SAML
  • +
  • On-premise deploy
  • +
  • Custom integrations
  • +
  • SLA guarantees
  • +
+
+
+
+

Revenue Drivers

+
    +
  • Seat-based SaaS β€” predictable recurring revenue per user
  • +
  • AI execution credits β€” usage-based pricing for code generation beyond free tier
  • +
  • Enterprise contracts β€” annual contracts with premium support & SLAs
  • +
+
+
+
+

Unit Economics (Target)

+
    +
  • LTV $2,880
  • +
  • CAC $320
  • +
  • LTV:CAC Ratio 9:1
  • +
  • Gross Margin 78%
  • +
  • Net Revenue Retention 125%
  • +
  • Payback Period 4 months
  • +
+
+

Land & Expand

+

Free tier drives adoption. Teams upgrade as AI executions prove value. Average expansion: 3x within 6 months.

+
+
+
+
7
+
+
+ + +
+
+
Traction
+

Early signals are strong

+

We're pre-revenue and focused on building the best product. Here's where we stand.

+
+
+
295+
+
Source files shipped
+
Full-stack product
+
+
+
15+
+
PRs merged
+
Active development
+
+
+
50+
+
Features built
+
Comprehensive platform
+
+
+
2
+
AI providers integrated
+
OpenAI + Anthropic
+
+
+
+
+

What We've Built

+
    +
  • Full Kanban board with drag-and-drop, WIP limits, and task hierarchy
  • +
  • End-to-end AI code generation pipeline with human-in-the-loop review
  • +
  • Deep GitHub integration with webhooks, PR management, and CI/CD tracking
  • +
  • AI sprint planning with risk assessment and dependency detection
  • +
  • Multi-tenant org support with role-based access control
  • +
  • Notification system with email and in-app delivery
  • +
+
+
+

Validation

+
+

Open Source Community

+

Contributors actively submitting PRs and feature requests. Organic interest from developers who see the vision.

+
+
+

Technical Differentiation

+

No competitor offers the task β†’ code β†’ review β†’ ship pipeline. We're defining a new category.

+
+
+

Production-Ready Stack

+

Next.js 14, PostgreSQL, Redis, Prisma β€” built on proven infrastructure ready to scale.

+
+
+
+
8
+
+
+ + +
+
+
Roadmap
+

Where we're going

+
+
+
+
+
βœ“
+
+

Phase 1 β€” Foundation (Completed)

+

Core PM features, Kanban, sprint management, GitHub integration, AI code generation pipeline.

+
DONE
+
+
+
+
β†’
+
+

Phase 2 β€” Intelligence (Q2 2026)

+

Advanced analytics, velocity charts, burndown charts, custom dashboards, time tracking.

+
IN PROGRESS
+
+
+
+
3
+
+

Phase 3 β€” Ecosystem (Q3 2026)

+

Slack integration, GitLab support, Jira migration tool, API marketplace, custom automation rules.

+
PLANNED
+
+
+
+
4
+
+

Phase 4 β€” Enterprise (Q4 2026)

+

SSO/SAML, on-premise deployment, audit logs, advanced RBAC, SOC 2 compliance, dedicated support.

+
PLANNED
+
+
+
+
+
+

Key Milestones

+
+
+
Q2 2026
+

Public Beta Launch

+

Open sign-ups, free tier, community building. Target: 500 active teams.

+
+
+
Q3 2026
+

Revenue Launch

+

Pro tier monetization, enterprise pilots. Target: $50K MRR.

+
+
+
Q4 2026
+

Enterprise Ready

+

SOC 2, SSO, on-premise. Target: 3 enterprise contracts.

+
+
+
2027
+

Series A Position

+

$2M+ ARR, 50+ paying teams, proven unit economics, category leadership.

+
+
+
+
+
9
+
+
+ + +
+
+
The Ask
+

Raising $2.5M Seed Round

+

To accelerate product development, launch publicly, and capture the AI-native project management category.

+
+
+

Use of Funds

+
    +
  • Engineering (50%) β€” Hire 3 senior engineers to accelerate roadmap
  • +
  • AI Infrastructure (20%) β€” GPU/API costs, model fine-tuning, execution pipeline optimization
  • +
  • Go-to-Market (20%) β€” Developer relations, content marketing, community building
  • +
  • Operations (10%) β€” Legal, compliance (SOC 2), infrastructure
  • +
+
+
+

What This Gets You

+
    +
  • 18-month runway to Series A milestones
  • +
  • Public beta by Q2 2026 with 500+ active teams
  • +
  • $2M+ ARR trajectory by end of 2027
  • +
  • Category definition β€” first mover in AI-native PM
  • +
  • Enterprise pipeline β€” 3+ contracts by Q4 2026
  • +
+
+
+
+
+
$2.5M
+
Seed Round
+
+
+
18 mo
+
Runway to Series A
+
+
+
$2M+
+
ARR Target (2027)
+
+
+
10
+
+
+ + +
+
+
FlowForge
+

The future of software
delivery starts here.

+

We're not building another project management tool.
We're building the platform that makes engineering teams superhuman.

+
+
flowforge.dev
+
team@flowforge.dev
+
github.com/flowforge
+
+
Thank you.
+
+
+ +
+ + + + + + + + diff --git a/src/app/api/sprints/[sprintId]/start/route.ts b/src/app/api/sprints/[sprintId]/start/route.ts index d3ba4a8..d325ee9 100644 --- a/src/app/api/sprints/[sprintId]/start/route.ts +++ b/src/app/api/sprints/[sprintId]/start/route.ts @@ -59,10 +59,19 @@ export async function POST(request: NextRequest, { params }: RouteParams) { ); } - const sprint = await prisma.sprint.update({ - where: { id: sprintId }, - data: { status: "ACTIVE" }, - }); + const [sprint] = await prisma.$transaction([ + prisma.sprint.update({ + where: { id: sprintId }, + data: { status: "ACTIVE" }, + }), + prisma.task.updateMany({ + where: { + sprintId: sprintId, + status: "BACKLOG", + }, + data: { status: "TODO" }, + }), + ]); return NextResponse.json({ sprint }); } catch (error) { diff --git a/src/app/api/tasks/[taskId]/code-review/route.ts b/src/app/api/tasks/[taskId]/code-review/route.ts index 4bb6ab8..1aff552 100644 --- a/src/app/api/tasks/[taskId]/code-review/route.ts +++ b/src/app/api/tasks/[taskId]/code-review/route.ts @@ -10,11 +10,18 @@ interface RouteParams { params: Promise<{ taskId: string }>; } +interface GeneratedFile { + path: string; + content: string; + action: "create" | "update" | "delete"; +} + interface CodeReviewRequest { action: "approve" | "request_changes" | "reject"; generatedCodeId: string; feedback?: string; deleteBranch?: boolean; + updatedFiles?: GeneratedFile[]; } /** @@ -31,7 +38,7 @@ export async function POST(request: NextRequest, { params }: RouteParams) { try { const body: CodeReviewRequest = await request.json(); - const { action, generatedCodeId, feedback, deleteBranch } = body; + const { action, generatedCodeId, feedback, deleteBranch, updatedFiles } = body; if (!action || !generatedCodeId) { return NextResponse.json( @@ -101,12 +108,13 @@ export async function POST(request: NextRequest, { params }: RouteParams) { switch (action) { case "approve": { - // Update generated code status to APPROVED + // Update generated code status to APPROVED, with edited files if provided await prisma.generatedCode.update({ where: { id: generatedCodeId }, data: { status: "APPROVED", reviewedAt: new Date(), + ...(updatedFiles ? { files: updatedFiles } : {}), }, }); diff --git a/src/app/api/webhooks/github/route.ts b/src/app/api/webhooks/github/route.ts index 960045a..c89d5a2 100644 --- a/src/app/api/webhooks/github/route.ts +++ b/src/app/api/webhooks/github/route.ts @@ -8,7 +8,7 @@ import { notifyPRMerged, notifyReviewRequested, } from "@/services/notifications"; -import { getPRSummary, type PRSummary } from "@/services/github"; +import { getPRSummary, getWorkflowRunsAfterMerge, type PRSummary, type WorkflowRunStatus } from "@/services/github"; import { parseGitHubRepo } from "@/lib/utils"; // Verify GitHub webhook signature @@ -328,6 +328,18 @@ async function handlePullRequest(body: Record): Promise { } } + // Fetch CI/CD build status in background and post as comment + if (repoInfo && accessToken) { + fetchAndPostCIStatus( + accessToken, + repoInfo.owner, + repoInfo.repo, + pullRequest.merge_commit_sha as string | undefined, + task.id, + prNumber + ).catch((err) => console.error("Failed to fetch CI/CD status:", err)); + } + // Send notification for PR merged if (task.project.userId) { await notifyPRMerged(task.project.userId, { @@ -485,3 +497,93 @@ async function handleIssueComment(body: Record): Promise console.log(`Queued PR comment handling for task ${task.id}: comment #${commentId} by @${commentAuthor}`); } + +/** + * Fetch GitHub Actions workflow runs after a merge and post build status as a task comment. + * Runs in the background with retries since workflows take a moment to trigger. + */ +async function fetchAndPostCIStatus( + accessToken: string, + owner: string, + repo: string, + mergeCommitSha: string | undefined, + taskId: string, + prNumber: number +): Promise { + if (!mergeCommitSha) { + console.log(`No merge commit SHA for PR #${prNumber}, skipping CI/CD status`); + return; + } + + // Wait for workflows to be triggered and get initial status + const runs = await getWorkflowRunsAfterMerge(accessToken, owner, repo, mergeCommitSha); + + if (runs.length === 0) { + console.log(`No workflow runs found for merge commit ${mergeCommitSha}`); + return; + } + + const buildComment = formatCIStatusComment(runs, prNumber, mergeCommitSha); + + await prisma.comment.create({ + data: { + taskId, + content: buildComment, + type: "ACTIVITY", + isSystem: true, + metadata: { + type: "ci_status", + prNumber, + mergeCommitSha, + workflows: runs.map((r) => ({ + name: r.name, + status: r.status, + conclusion: r.conclusion, + url: r.html_url, + })), + } as Prisma.InputJsonValue, + }, + }); + + console.log(`CI/CD status comment posted for task ${taskId} (${runs.length} workflows)`); +} + +function formatCIStatusComment(runs: WorkflowRunStatus[], prNumber: number, commitSha: string): string { + const activities: { icon: string; label: string; detail?: string }[] = []; + + activities.push({ + icon: "build", + label: "CI/CD Pipeline", + detail: `PR #${prNumber} Β· ${commitSha.substring(0, 7)}`, + }); + + for (const run of runs) { + const statusEmoji = getWorkflowStatusIcon(run.status, run.conclusion); + activities.push({ + icon: "build", + label: `${statusEmoji} ${run.name}`, + detail: run.conclusion || run.status, + }); + } + + return JSON.stringify({ + type: "activity_summary", + title: "CI/CD Build Status", + activities, + }); +} + +function getWorkflowStatusIcon(status: string, conclusion: string | null): string { + if (status === "completed") { + switch (conclusion) { + case "success": return "\u2705"; + case "failure": return "\u274C"; + case "cancelled": return "\u23F9\uFE0F"; + case "skipped": return "\u23ED\uFE0F"; + default: return "\u2753"; + } + } + if (status === "in_progress") return "\u23F3"; + if (status === "queued" || status === "waiting") return "\u23F8\uFE0F"; + return "\u2B55"; +} diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx index 36a76d2..c821fc3 100644 --- a/src/app/dashboard/layout.tsx +++ b/src/app/dashboard/layout.tsx @@ -19,7 +19,7 @@ export default async function DashboardLayout({ const projects = await prisma.project.findMany({ where: { userId: session.user.id }, orderBy: { updatedAt: "desc" }, - select: { id: true, name: true }, + select: { id: true, name: true, projectKey: true }, }); return ( diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index e5578aa..372b06a 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -5,7 +5,7 @@ import { redirect } from "next/navigation"; import Link from "next/link"; import { Plus, FolderKanban } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { ProjectCard } from "@/components/projects/ProjectCard"; +import { ProjectListWithSearch } from "@/components/projects/ProjectSearch"; export default async function DashboardPage() { const session = await getServerSession(authOptions); @@ -28,68 +28,63 @@ export default async function DashboardPage() { }, select: { id: true }, }, + aiSettings: { + select: { aiEnabled: true }, + }, }, orderBy: { updatedAt: "desc" }, }); return (
-
-
-

Projects

-

- Manage your FlowForge projects and tasks -

-
- -
- {projects.length === 0 ? ( -
-
- + <> +
+
+

Projects

+

+ Manage your FlowForge projects and tasks +

+
+
-

- No projects yet -

-

- Create your first project to start automating your development workflow with AI. -

- -
- ) : ( -
- {projects.map((project: typeof projects[number], index: number) => ( -
- +
+
+
- ))} -
+

+ No projects yet +

+

+ Create your first project to start automating your development workflow with AI. +

+ +
+ + ) : ( + ({ + id: project.id, + name: project.name, + description: project.description, + githubRepo: project.githubRepo, + projectKey: project.projectKey, + taskCount: project._count.tasks, + activePRCount: project.tasks.length, + updatedAt: project.updatedAt, + aiEnabled: project.aiSettings?.aiEnabled ?? false, + }))} + /> )}
); diff --git a/src/app/globals.css b/src/app/globals.css index 25bbefa..5f09bf5 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -132,6 +132,10 @@ } @layer base { + html { + scroll-behavior: smooth; + scroll-padding-top: 5rem; + } * { @apply border-border; } diff --git a/src/app/page.tsx b/src/app/page.tsx index dc72454..b45eaee 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,13 +1,38 @@ -import { redirect } from "next/navigation"; import { getServerSession } from "next-auth"; import { authOptions } from "@/lib/auth"; +import { LandingNavbar } from "@/components/landing/LandingNavbar"; +import { HeroSection } from "@/components/landing/HeroSection"; +import { FeaturesSection } from "@/components/landing/FeaturesSection"; +import { HowItWorksSection } from "@/components/landing/HowItWorksSection"; +import { IntegrationsSection } from "@/components/landing/IntegrationsSection"; +import { TestimonialsSection } from "@/components/landing/TestimonialsSection"; +import { PricingSection } from "@/components/landing/PricingSection"; +import { CTASection } from "@/components/landing/CTASection"; +import { FooterSection } from "@/components/landing/FooterSection"; + +export const metadata = { + title: "FlowForge β€” AI-Powered Project Management for Dev Teams", + description: + "Ship software faster with AI code generation, GitHub integration, and smart sprint planning. FlowForge is the project management platform built for modern development teams.", +}; export default async function Home() { const session = await getServerSession(authOptions); + const isAuthenticated = !!session; - if (session) { - redirect("/dashboard"); - } else { - redirect("/login"); - } + return ( +
+ +
+ + + + + + + +
+ +
+ ); } diff --git a/src/app/project/[projectId]/page.tsx b/src/app/project/[projectId]/page.tsx index 43f1d79..734653b 100644 --- a/src/app/project/[projectId]/page.tsx +++ b/src/app/project/[projectId]/page.tsx @@ -78,6 +78,22 @@ export default async function ProjectPage({ params }: ProjectPageProps) { notFound(); } + // Fetch sprints for the project + const sprints = await prisma.sprint.findMany({ + where: { projectId: project.id }, + select: { id: true, name: true, status: true }, + orderBy: { startDate: "desc" }, + }); + + const activeSprint = sprints.find((s) => s.status === "ACTIVE"); + + // Check if AI is enabled for this project + const aiSettings = await prisma.projectAISettings.findUnique({ + where: { projectId: project.id }, + select: { aiEnabled: true }, + }); + const aiEnabled = aiSettings?.aiEnabled ?? false; + const projects = await prisma.project.findMany({ where: { OR: [ @@ -158,8 +174,11 @@ export default async function ProjectPage({ params }: ProjectPageProps) { ...task, projectId: project.id, }))} + sprints={sprints} + defaultSprintId={activeSprint?.id ?? null} wipLimits={(project.wipLimits as Record) || {}} boardColumns={(project.boardColumns as unknown as BoardColumn[]) || null} + aiEnabled={aiEnabled} members={[ // Include project owner (if personal project) ...(project.user ? [{ id: project.user.id, name: project.user.name, image: project.user.image }] : []), diff --git a/src/app/project/[projectId]/sprint/[sprintId]/page.tsx b/src/app/project/[projectId]/sprint/[sprintId]/page.tsx index 2cf3229..a722e87 100644 --- a/src/app/project/[projectId]/sprint/[sprintId]/page.tsx +++ b/src/app/project/[projectId]/sprint/[sprintId]/page.tsx @@ -115,6 +115,13 @@ export default async function SprintDetailPage({ params }: SprintDetailPageProps }, }; + // Check if AI is enabled for this project + const aiSettings = await prisma.projectAISettings.findUnique({ + where: { projectId: project.id }, + select: { aiEnabled: true }, + }); + const aiEnabled = aiSettings?.aiEnabled ?? false; + const projects = await prisma.project.findMany({ where: { OR: [ @@ -161,6 +168,7 @@ export default async function SprintDetailPage({ params }: SprintDetailPageProps projectKey={project.projectKey} sprintTasks={sprintTasks} backlogTasks={backlogTasks} + aiEnabled={aiEnabled} />
diff --git a/src/app/project/[projectId]/sprint/page.tsx b/src/app/project/[projectId]/sprint/page.tsx index 6deee95..f11fee0 100644 --- a/src/app/project/[projectId]/sprint/page.tsx +++ b/src/app/project/[projectId]/sprint/page.tsx @@ -82,6 +82,13 @@ export default async function SprintPage({ params }: SprintPageProps) { }; }); + // Check if AI is enabled for this project + const aiSettings = await prisma.projectAISettings.findUnique({ + where: { projectId: project.id }, + select: { aiEnabled: true }, + }); + const aiEnabled = aiSettings?.aiEnabled ?? false; + const projects = await prisma.project.findMany({ where: { OR: [ @@ -117,7 +124,7 @@ export default async function SprintPage({ params }: SprintPageProps) {
- +
diff --git a/src/app/project/[projectId]/task/[taskId]/page.tsx b/src/app/project/[projectId]/task/[taskId]/page.tsx index 46c800d..ee6176c 100644 --- a/src/app/project/[projectId]/task/[taskId]/page.tsx +++ b/src/app/project/[projectId]/task/[taskId]/page.tsx @@ -108,6 +108,13 @@ export default async function TaskPage({ params }: TaskPageProps) { }, }; + // Check if AI is enabled for this project + const aiSettings = await prisma.projectAISettings.findUnique({ + where: { projectId: task.projectId }, + select: { aiEnabled: true }, + }); + const aiEnabled = aiSettings?.aiEnabled ?? false; + const projects = await prisma.project.findMany({ where: { OR: [ @@ -125,7 +132,7 @@ export default async function TaskPage({ params }: TaskPageProps) {
- +
diff --git a/src/components/landing/CTASection.tsx b/src/components/landing/CTASection.tsx new file mode 100644 index 0000000..547910f --- /dev/null +++ b/src/components/landing/CTASection.tsx @@ -0,0 +1,38 @@ +import Link from "next/link"; +import { ArrowRight } from "lucide-react"; +import { Button } from "@/components/ui/button"; + +export function CTASection({ isAuthenticated }: { isAuthenticated: boolean }) { + return ( +
+ {/* Background gradient */} +
+
+ +
+

+ Ready to automate your SDLC? +

+

+ Join thousands of developers shipping faster with FlowForge. Get + started for free β€” no credit card required. +

+ {isAuthenticated ? ( + + ) : ( + + )} +
+
+ ); +} diff --git a/src/components/landing/FeaturesSection.tsx b/src/components/landing/FeaturesSection.tsx new file mode 100644 index 0000000..b01432f --- /dev/null +++ b/src/components/landing/FeaturesSection.tsx @@ -0,0 +1,88 @@ +import { + Sparkles, + GitPullRequest, + LayoutDashboard, + Github, + Users, + Activity, +} from "lucide-react"; +import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; + +const features = [ + { + icon: Sparkles, + title: "AI Code Generation", + description: + "Generate code, tests, and documentation with AI assistance directly from your tasks and user stories.", + }, + { + icon: GitPullRequest, + title: "PR Management", + description: + "Automatically link pull requests to tasks, track review status, and streamline your merge workflow.", + }, + { + icon: LayoutDashboard, + title: "Sprint Planning", + description: + "Plan and manage sprints with drag-and-drop boards, velocity tracking, and AI-powered estimations.", + }, + { + icon: Github, + title: "GitHub Integration", + description: + "Deep GitHub integration syncs repos, branches, issues, and PRs in real time with your project board.", + }, + { + icon: Users, + title: "Team Collaboration", + description: + "Invite team members, assign tasks, and collaborate with comments, mentions, and real-time updates.", + }, + { + icon: Activity, + title: "Activity Tracking", + description: + "Track every action across your project with a detailed activity feed and analytics dashboard.", + }, +]; + +export function FeaturesSection() { + return ( +
+
+
+

+ Everything you need to{" "} + ship faster +

+

+ A complete project management platform built for modern development + teams, powered by AI. +

+
+ +
+ {features.map((feature, index) => ( + +
+ +
+ +
+ {feature.title} + + {feature.description} + +
+ + ))} +
+
+
+ ); +} diff --git a/src/components/landing/FooterSection.tsx b/src/components/landing/FooterSection.tsx new file mode 100644 index 0000000..d5c453d --- /dev/null +++ b/src/components/landing/FooterSection.tsx @@ -0,0 +1,78 @@ +import Link from "next/link"; +import { Workflow } from "lucide-react"; + +const footerLinks = { + Product: [ + { label: "Features", href: "#features" }, + { label: "Integrations", href: "#integrations" }, + { label: "Pricing", href: "#pricing" }, + { label: "Changelog", href: "#" }, + ], + Company: [ + { label: "About", href: "#" }, + { label: "Blog", href: "#" }, + { label: "Careers", href: "#" }, + { label: "Contact", href: "#" }, + ], + Legal: [ + { label: "Privacy Policy", href: "#" }, + { label: "Terms of Service", href: "#" }, + { label: "Cookie Policy", href: "#" }, + ], + Developers: [ + { label: "Documentation", href: "#" }, + { label: "API Reference", href: "#" }, + { label: "GitHub", href: "https://github.com" }, + ], +}; + +export function FooterSection() { + return ( +
+
+
+ {/* Brand */} +
+ +
+ +
+ FlowForge + +

+ AI-powered project management for modern development teams. +

+
+ + {/* Link columns */} + {Object.entries(footerLinks).map(([category, links]) => ( +
+

{category}

+
    + {links.map((link) => ( +
  • + + {link.label} + +
  • + ))} +
+
+ ))} +
+ +
+

+ © {new Date().getFullYear()} FlowForge. All rights reserved. +

+

+ Built with Next.js, Tailwind CSS, and AI. +

+
+
+
+ ); +} diff --git a/src/components/landing/HeroSection.tsx b/src/components/landing/HeroSection.tsx new file mode 100644 index 0000000..8a873f1 --- /dev/null +++ b/src/components/landing/HeroSection.tsx @@ -0,0 +1,78 @@ +import Link from "next/link"; +import { ArrowRight, Sparkles } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge"; + +export function HeroSection({ isAuthenticated }: { isAuthenticated: boolean }) { + return ( +
+ {/* Background gradient */} +
+ + {/* Floating orbs */} +
+
+
+ +
+
+ + + AI-Powered Project Management + +
+ +

+ Ship Software Faster with{" "} + + AI-Powered + {" "} + Project Management +

+ +

+ FlowForge combines AI code generation, GitHub integration, and smart + sprint planning to help your team deliver software faster than ever. +

+ +
+ {isAuthenticated ? ( + + ) : ( + <> + + + + )} +
+
+
+ ); +} diff --git a/src/components/landing/HowItWorksSection.tsx b/src/components/landing/HowItWorksSection.tsx new file mode 100644 index 0000000..e5f5676 --- /dev/null +++ b/src/components/landing/HowItWorksSection.tsx @@ -0,0 +1,73 @@ +import { Github, ListChecks, Rocket } from "lucide-react"; + +const steps = [ + { + number: "1", + icon: Github, + title: "Connect GitHub", + description: + "Sign in with GitHub and connect your repositories. FlowForge syncs your repos, branches, and pull requests automatically.", + }, + { + number: "2", + icon: ListChecks, + title: "Create Tasks", + description: + "Break down your project into tasks and user stories. Use AI to generate subtasks, estimates, and even code scaffolding.", + }, + { + number: "3", + icon: Rocket, + title: "Ship with Confidence", + description: + "Track progress across sprints, review PRs in context, and deploy knowing every task has been completed and tested.", + }, +]; + +export function HowItWorksSection() { + return ( +
+
+
+

+ Get started in{" "} + three simple steps +

+

+ From zero to productive in minutes β€” no complex setup required. +

+
+ +
+ {steps.map((step, index) => ( +
+ {/* Connector line (desktop only) */} + {index < steps.length - 1 && ( +
+ )} + +
+
+
+ +
+ + {step.number} + +
+ +

{step.title}

+

+ {step.description} +

+
+ ))} +
+
+
+ ); +} diff --git a/src/components/landing/IntegrationsSection.tsx b/src/components/landing/IntegrationsSection.tsx new file mode 100644 index 0000000..64a686f --- /dev/null +++ b/src/components/landing/IntegrationsSection.tsx @@ -0,0 +1,90 @@ +import { Github } from "lucide-react"; +import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; + +const integrations = [ + { + name: "GitHub", + description: + "Full integration with repositories, pull requests, issues, and Actions. Your entire workflow in one place.", + icon: Github, + status: "live" as const, + }, + { + name: "Jira", + description: + "Import existing Jira projects and sync tasks bi-directionally to ease your migration.", + icon: null, + status: "coming-soon" as const, + }, + { + name: "GitLab", + description: + "Connect GitLab repositories and merge requests for teams using GitLab as their primary platform.", + icon: null, + status: "coming-soon" as const, + }, + { + name: "Slack", + description: + "Get real-time notifications, create tasks from messages, and keep your team in sync.", + icon: null, + status: "coming-soon" as const, + }, +]; + +export function IntegrationsSection() { + return ( +
+
+
+

+ Integrates with your{" "} + favorite tools +

+

+ Connect the tools you already use and love. More integrations coming + soon. +

+
+ +
+ {integrations.map((integration, index) => ( + + +
+
+ {integration.icon ? ( + + ) : ( + + {integration.name[0]} + + )} +
+ {integration.status === "live" ? ( + Live + ) : ( + Coming Soon + )} +
+ {integration.name} + + {integration.description} + +
+
+ ))} +
+
+
+ ); +} diff --git a/src/components/landing/LandingNavbar.tsx b/src/components/landing/LandingNavbar.tsx new file mode 100644 index 0000000..33f91ee --- /dev/null +++ b/src/components/landing/LandingNavbar.tsx @@ -0,0 +1,108 @@ +"use client"; + +import { useState } from "react"; +import Link from "next/link"; +import { Workflow, Menu, X } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { ThemeToggle } from "@/components/layout/ThemeToggle"; + +const navLinks = [ + { label: "Features", href: "#features" }, + { label: "How It Works", href: "#how-it-works" }, + { label: "Integrations", href: "#integrations" }, + { label: "Pricing", href: "#pricing" }, +]; + +export function LandingNavbar({ isAuthenticated }: { isAuthenticated: boolean }) { + const [mobileOpen, setMobileOpen] = useState(false); + + return ( +
+
+ {/* Logo */} + +
+ +
+ + FlowForge + + + + {/* Desktop Nav */} + + + {/* Desktop Actions */} +
+ + {isAuthenticated ? ( + + ) : ( + <> + + + + )} +
+ + {/* Mobile Menu Button */} +
+ + +
+
+ + {/* Mobile Menu */} + {mobileOpen && ( +
+
+ {navLinks.map((link) => ( + setMobileOpen(false)} + className="block text-sm font-medium text-muted-foreground hover:text-foreground transition-colors py-2" + > + {link.label} + + ))} +
+ {isAuthenticated ? ( + + ) : ( + <> + + + + )} +
+
+
+ )} +
+ ); +} diff --git a/src/components/landing/PricingSection.tsx b/src/components/landing/PricingSection.tsx new file mode 100644 index 0000000..2eacaf5 --- /dev/null +++ b/src/components/landing/PricingSection.tsx @@ -0,0 +1,127 @@ +import Link from "next/link"; +import { Check } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; + +const tiers = [ + { + name: "Free", + price: "$0", + period: "forever", + description: "Perfect for individual developers and small side projects.", + features: [ + "Up to 3 projects", + "GitHub integration", + "Basic AI suggestions", + "Activity tracking", + "Community support", + ], + cta: "Get Started", + href: "/login", + highlighted: false, + }, + { + name: "Pro", + price: "$12", + period: "per user / month", + description: "For growing teams that need advanced AI and collaboration features.", + features: [ + "Unlimited projects", + "Advanced AI code generation", + "Sprint analytics & velocity", + "Priority PR management", + "Team collaboration tools", + "Priority support", + ], + cta: "Start Free Trial", + href: "/login", + highlighted: true, + }, + { + name: "Enterprise", + price: "Custom", + period: "contact sales", + description: "For organizations that need advanced security, compliance, and support.", + features: [ + "Everything in Pro", + "SSO / SAML authentication", + "Custom integrations", + "Dedicated account manager", + "SLA guarantees", + "On-premise deployment", + ], + cta: "Contact Sales", + href: "mailto:sales@flowforge.dev", + highlighted: false, + }, +]; + +export function PricingSection() { + return ( +
+
+
+

+ Simple, transparent{" "} + pricing +

+

+ Start free and scale as your team grows. No hidden fees. +

+
+ +
+ {tiers.map((tier, index) => ( + + {tier.highlighted && ( +
+ Most Popular +
+ )} + + {tier.name} +
+ {tier.price} + + {tier.period} + +
+ + {tier.description} + +
+ +
    + {tier.features.map((feature) => ( +
  • + + {feature} +
  • + ))} +
+
+ + + +
+ ))} +
+
+
+ ); +} diff --git a/src/components/landing/TestimonialsSection.tsx b/src/components/landing/TestimonialsSection.tsx new file mode 100644 index 0000000..75081dc --- /dev/null +++ b/src/components/landing/TestimonialsSection.tsx @@ -0,0 +1,74 @@ +import { Card, CardContent } from "@/components/ui/card"; +import { Star } from "lucide-react"; + +const testimonials = [ + { + quote: + "FlowForge cut our sprint planning time in half. The AI suggestions are surprisingly accurate and the GitHub integration is seamless.", + author: "Sarah Chen", + role: "Engineering Lead", + company: "TechStart", + }, + { + quote: + "We switched from Jira and never looked back. The AI code generation feature alone saves us hours every week.", + author: "Marcus Johnson", + role: "CTO", + company: "DevScale", + }, + { + quote: + "Finally, a project management tool that understands how developers actually work. The PR tracking is a game-changer.", + author: "Priya Patel", + role: "Senior Developer", + company: "CloudNine", + }, +]; + +export function TestimonialsSection() { + return ( +
+
+
+

+ Loved by{" "} + development teams +

+

+ See what teams are saying about FlowForge. +

+
+ +
+ {testimonials.map((testimonial, index) => ( + + +
+ {Array.from({ length: 5 }).map((_, i) => ( + + ))} +
+
+ “{testimonial.quote}” +
+
+

{testimonial.author}

+

+ {testimonial.role}, {testimonial.company} +

+
+
+
+ ))} +
+
+
+ ); +} diff --git a/src/components/landing/__tests__/landing.test.tsx b/src/components/landing/__tests__/landing.test.tsx new file mode 100644 index 0000000..e190aa4 --- /dev/null +++ b/src/components/landing/__tests__/landing.test.tsx @@ -0,0 +1,386 @@ +/** + * @jest-environment node + * + * Landing page tests. + * Tests component structure, data integrity, section consistency, and page composition. + * (Render tests require @testing-library/react + jsdom which aren't currently installed.) + */ + +import * as fs from 'fs'; +import * as path from 'path'; + +function readComponent(fileName: string): string { + return fs.readFileSync(path.resolve(__dirname, '..', fileName), 'utf8'); +} + +function readAppFile(fileName: string): string { + return fs.readFileSync(path.resolve(__dirname, '../../../app', fileName), 'utf8'); +} + +// Test all component files exist +describe('Landing component files', () => { + const expectedFiles = [ + 'LandingNavbar.tsx', + 'HeroSection.tsx', + 'FeaturesSection.tsx', + 'HowItWorksSection.tsx', + 'IntegrationsSection.tsx', + 'TestimonialsSection.tsx', + 'PricingSection.tsx', + 'CTASection.tsx', + 'FooterSection.tsx', + ]; + + it.each(expectedFiles)('%s exists', (file) => { + const filePath = path.resolve(__dirname, '..', file); + expect(fs.existsSync(filePath)).toBe(true); + }); +}); + +// Test FeaturesSection data integrity +describe('FeaturesSection data', () => { + it('has exactly 6 features', () => { + const source = readComponent('FeaturesSection.tsx'); + const featureMatches = source.match(/title:\s*"/g); + expect(featureMatches).toHaveLength(6); + }); + + it('includes expected feature titles', () => { + const source = readComponent('FeaturesSection.tsx'); + const expectedTitles = [ + 'AI Code Generation', + 'PR Management', + 'Sprint Planning', + 'GitHub Integration', + 'Team Collaboration', + 'Activity Tracking', + ]; + for (const title of expectedTitles) { + expect(source).toContain(title); + } + }); +}); + +// Test PricingSection data integrity +describe('PricingSection data', () => { + it('has 3 pricing tiers', () => { + const source = readComponent('PricingSection.tsx'); + const tierNames = ['Free', 'Pro', 'Enterprise']; + for (const name of tierNames) { + expect(source).toContain(`name: "${name}"`); + } + }); + + it('Pro tier is highlighted', () => { + const source = readComponent('PricingSection.tsx'); + const proSection = source.substring( + source.indexOf('name: "Pro"'), + source.indexOf('name: "Enterprise"') + ); + expect(proSection).toContain('highlighted: true'); + }); +}); + +// Test HowItWorksSection data integrity +describe('HowItWorksSection data', () => { + it('has 3 steps', () => { + const source = readComponent('HowItWorksSection.tsx'); + const stepTitles = ['Connect GitHub', 'Create Tasks', 'Ship with Confidence']; + for (const title of stepTitles) { + expect(source).toContain(title); + } + }); +}); + +// Test IntegrationsSection data integrity +describe('IntegrationsSection data', () => { + it('has GitHub as live integration', () => { + const source = readComponent('IntegrationsSection.tsx'); + const githubSection = source.substring( + source.indexOf('name: "GitHub"'), + source.indexOf('name: "Jira"') + ); + expect(githubSection).toContain('"live"'); + }); + + it('has Jira, GitLab, and Slack as coming-soon', () => { + const source = readComponent('IntegrationsSection.tsx'); + for (const name of ['Jira', 'GitLab', 'Slack']) { + expect(source).toContain(`name: "${name}"`); + } + const afterGithub = source.substring(source.indexOf('name: "Jira"')); + const comingSoonMatches = afterGithub.match(/"coming-soon"/g); + expect(comingSoonMatches).toHaveLength(3); + }); +}); + +// Test LandingNavbar has correct anchor links +describe('LandingNavbar navigation', () => { + it('has anchor links to all major sections', () => { + const source = readComponent('LandingNavbar.tsx'); + const expectedAnchors = ['#features', '#how-it-works', '#integrations', '#pricing']; + for (const anchor of expectedAnchors) { + expect(source).toContain(anchor); + } + }); +}); + +// Test auth-aware behavior (source-level checks) +describe('Auth-aware components', () => { + it('HeroSection accepts isAuthenticated prop', () => { + const source = readComponent('HeroSection.tsx'); + expect(source).toContain('isAuthenticated'); + expect(source).toContain('Go to Dashboard'); + expect(source).toContain('Get Started Free'); + }); + + it('CTASection accepts isAuthenticated prop', () => { + const source = readComponent('CTASection.tsx'); + expect(source).toContain('isAuthenticated'); + expect(source).toContain('Go to Dashboard'); + expect(source).toContain('Get Started Free'); + }); + + it('LandingNavbar accepts isAuthenticated prop', () => { + const source = readComponent('LandingNavbar.tsx'); + expect(source).toContain('isAuthenticated'); + expect(source).toContain('Go to Dashboard'); + expect(source).toContain('Sign In'); + expect(source).toContain('Get Started'); + }); +}); + +// Test page.tsx composition +describe('Landing page composition (page.tsx)', () => { + it('imports all landing components', () => { + const source = readAppFile('page.tsx'); + const expectedImports = [ + 'LandingNavbar', + 'HeroSection', + 'FeaturesSection', + 'HowItWorksSection', + 'IntegrationsSection', + 'TestimonialsSection', + 'PricingSection', + 'CTASection', + 'FooterSection', + ]; + for (const imp of expectedImports) { + expect(source).toContain(imp); + } + }); + + it('uses getServerSession for auth', () => { + const source = readAppFile('page.tsx'); + expect(source).toContain('getServerSession'); + expect(source).toContain('authOptions'); + expect(source).toContain('isAuthenticated'); + }); + + it('has SEO metadata', () => { + const source = readAppFile('page.tsx'); + expect(source).toContain('export const metadata'); + expect(source).toContain('title:'); + expect(source).toContain('description:'); + }); + + it('does not redirect anymore', () => { + const source = readAppFile('page.tsx'); + expect(source).not.toContain('redirect("/login")'); + expect(source).not.toContain('redirect("/dashboard")'); + }); +}); + +// Test globals.css has smooth scrolling +describe('globals.css smooth scrolling', () => { + it('includes scroll-behavior: smooth', () => { + const source = readAppFile('globals.css'); + expect(source).toContain('scroll-behavior: smooth'); + }); + + it('includes scroll-padding-top for sticky nav offset', () => { + const source = readAppFile('globals.css'); + expect(source).toContain('scroll-padding-top'); + }); +}); + +// Test section IDs match navbar anchors +describe('Section ID consistency', () => { + it('all navbar anchors have matching section IDs', () => { + const navbarSource = readComponent('LandingNavbar.tsx'); + + const anchorRegex = /href:\s*"(#[^"]+)"/g; + const anchors: string[] = []; + let match; + while ((match = anchorRegex.exec(navbarSource)) !== null) { + anchors.push(match[1].substring(1)); // Remove the '#' + } + + expect(anchors.length).toBeGreaterThan(0); + + const sectionFiles: Record = { + features: 'FeaturesSection.tsx', + 'how-it-works': 'HowItWorksSection.tsx', + integrations: 'IntegrationsSection.tsx', + pricing: 'PricingSection.tsx', + }; + + for (const anchor of anchors) { + const fileName = sectionFiles[anchor]; + expect(fileName).toBeDefined(); + const sectionSource = readComponent(fileName); + expect(sectionSource).toContain(`id="${anchor}"`); + } + }); +}); + +// Test TestimonialsSection data +describe('TestimonialsSection data', () => { + it('has 3 testimonials', () => { + const source = readComponent('TestimonialsSection.tsx'); + const quoteMatches = source.match(/quote:/g); + expect(quoteMatches).toHaveLength(3); + }); +}); + +// Test FooterSection structure +describe('FooterSection structure', () => { + it('has the expected footer link categories', () => { + const source = readComponent('FooterSection.tsx'); + for (const category of ['Product', 'Company', 'Legal', 'Developers']) { + expect(source).toContain(category); + } + }); + + it('includes copyright notice', () => { + const source = readComponent('FooterSection.tsx'); + expect(source).toContain('FlowForge'); + expect(source).toContain('All rights reserved'); + }); +}); + +// Test design system consistency +describe('Design system usage', () => { + it('LandingNavbar uses sticky header blur pattern', () => { + const source = readComponent('LandingNavbar.tsx'); + expect(source).toContain('sticky top-0 z-50'); + expect(source).toContain('backdrop-blur'); + expect(source).toContain('border-border/40'); + }); + + it('HeroSection uses floating orb pattern', () => { + const source = readComponent('HeroSection.tsx'); + expect(source).toContain('blur-3xl'); + expect(source).toContain('animate-float'); + expect(source).toContain('rounded-full'); + }); + + it('HeroSection uses gradient text', () => { + const source = readComponent('HeroSection.tsx'); + expect(source).toContain('bg-gradient-to-r'); + expect(source).toContain('bg-clip-text'); + expect(source).toContain('text-transparent'); + }); + + it('FeaturesSection uses gradient icon containers', () => { + const source = readComponent('FeaturesSection.tsx'); + expect(source).toContain('from-[hsl(var(--gradient-start))]'); + expect(source).toContain('to-[hsl(var(--gradient-end))]'); + }); + + it('components use gradient-text utility class', () => { + for (const file of ['FeaturesSection.tsx', 'HowItWorksSection.tsx', 'IntegrationsSection.tsx', 'PricingSection.tsx']) { + const source = readComponent(file); + expect(source).toContain('gradient-text'); + } + }); + + it('uses Button variant="gradient" for primary CTAs', () => { + const source = readComponent('HeroSection.tsx'); + expect(source).toContain('variant="gradient"'); + }); + + it('uses Badge variant="ai" in HeroSection', () => { + const source = readComponent('HeroSection.tsx'); + expect(source).toContain('variant="ai"'); + }); + + it('LandingNavbar is a client component', () => { + const source = readComponent('LandingNavbar.tsx'); + expect(source).toContain('"use client"'); + }); + + it('server components do not have "use client" directive', () => { + const serverComponents = [ + 'HeroSection.tsx', + 'FeaturesSection.tsx', + 'HowItWorksSection.tsx', + 'IntegrationsSection.tsx', + 'TestimonialsSection.tsx', + 'PricingSection.tsx', + 'CTASection.tsx', + 'FooterSection.tsx', + ]; + for (const file of serverComponents) { + const source = readComponent(file); + expect(source).not.toContain('"use client"'); + } + }); +}); + +// Test responsive design patterns +describe('Responsive design', () => { + it('page uses max-w-7xl container pattern', () => { + const components = [ + 'LandingNavbar.tsx', + 'HeroSection.tsx', + 'FeaturesSection.tsx', + 'HowItWorksSection.tsx', + 'IntegrationsSection.tsx', + 'PricingSection.tsx', + 'CTASection.tsx', + 'FooterSection.tsx', + ]; + for (const file of components) { + const source = readComponent(file); + expect(source).toContain('max-w-7xl'); + } + }); + + it('LandingNavbar has mobile hamburger menu', () => { + const source = readComponent('LandingNavbar.tsx'); + expect(source).toContain('mobileOpen'); + expect(source).toContain('md:hidden'); + expect(source).toContain('hidden md:flex'); + }); + + it('FeaturesSection uses responsive grid', () => { + const source = readComponent('FeaturesSection.tsx'); + expect(source).toContain('grid-cols-1'); + expect(source).toContain('md:grid-cols-2'); + expect(source).toContain('lg:grid-cols-3'); + }); + + it('PricingSection uses responsive grid', () => { + const source = readComponent('PricingSection.tsx'); + expect(source).toContain('grid-cols-1'); + expect(source).toContain('md:grid-cols-3'); + }); +}); + +// Test links point to correct routes +describe('CTA link destinations', () => { + it('authenticated CTAs link to /dashboard', () => { + for (const file of ['HeroSection.tsx', 'CTASection.tsx', 'LandingNavbar.tsx']) { + const source = readComponent(file); + expect(source).toContain('href="/dashboard"'); + } + }); + + it('unauthenticated CTAs link to /login', () => { + for (const file of ['HeroSection.tsx', 'CTASection.tsx', 'LandingNavbar.tsx']) { + const source = readComponent(file); + expect(source).toContain('href="/login"'); + } + }); +}); diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 475068f..9dc3505 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -1,14 +1,18 @@ "use client"; +import { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Plus, LayoutDashboard, Settings, + Search, + X, } from "lucide-react"; import { cn } from "@/lib/utils"; @@ -40,6 +44,17 @@ function getProjectColor(id: string): string { export function Sidebar({ projects = [] }: SidebarProps) { const pathname = usePathname(); + const [searchQuery, setSearchQuery] = useState(""); + + const filteredProjects = searchQuery + ? projects.filter((project) => { + const query = searchQuery.toLowerCase(); + return ( + project.name.toLowerCase().includes(query) || + (project.projectKey && project.projectKey.toLowerCase().includes(query)) + ); + }) + : projects; const mainNav = [ { @@ -87,11 +102,32 @@ export function Sidebar({ projects = [] }: SidebarProps) {

Projects

+ {projects.length > 0 && ( +
+ + setSearchQuery(e.target.value)} + className="h-8 pl-8 pr-8 text-sm" + /> + {searchQuery && ( + + )} +
+ )}
{projects.length === 0 ? (

No projects yet

+ ) : filteredProjects.length === 0 ? ( +

No projects found

) : ( - projects.map((project) => { + filteredProjects.map((project) => { const projectSlug = project.projectKey || project.id; const isActive = pathname.startsWith(`/project/${project.id}`) || pathname.startsWith(`/project/${project.projectKey}`); const colorClass = getProjectColor(project.id); @@ -106,8 +142,13 @@ export function Sidebar({ projects = [] }: SidebarProps) { asChild > -
+
{project.name} + {project.projectKey && ( + + {project.projectKey} + + )} ); diff --git a/src/components/projects/ProjectCard.tsx b/src/components/projects/ProjectCard.tsx index c84c339..77615cb 100644 --- a/src/components/projects/ProjectCard.tsx +++ b/src/components/projects/ProjectCard.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; -import { Github, ListTodo } from "lucide-react"; +import { Github, ListTodo, Sparkles } from "lucide-react"; import { formatDate } from "@/lib/utils"; interface ProjectCardProps { @@ -14,6 +14,7 @@ interface ProjectCardProps { taskCount: number; activePRCount: number; updatedAt: Date; + aiEnabled?: boolean; }; } @@ -24,11 +25,19 @@ export function ProjectCard({ project }: ProjectCardProps) {
{project.name} - {project.activePRCount > 0 && ( - - {project.activePRCount} PR{project.activePRCount !== 1 ? "s" : ""} open - - )} +
+ {project.aiEnabled && ( + + + AI + + )} + {project.activePRCount > 0 && ( + + {project.activePRCount} PR{project.activePRCount !== 1 ? "s" : ""} open + + )} +
{project.description && (

diff --git a/src/components/projects/ProjectSearch.tsx b/src/components/projects/ProjectSearch.tsx new file mode 100644 index 0000000..b8b4148 --- /dev/null +++ b/src/components/projects/ProjectSearch.tsx @@ -0,0 +1,94 @@ +"use client"; + +import { useState } from "react"; +import Link from "next/link"; +import { Plus, Search, X } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { ProjectCard } from "./ProjectCard"; + +interface Project { + id: string; + name: string; + description: string | null; + githubRepo: string; + projectKey?: string; + taskCount: number; + activePRCount: number; + updatedAt: Date; + aiEnabled?: boolean; +} + +interface ProjectListWithSearchProps { + projects: Project[]; +} + +export function ProjectListWithSearch({ projects }: ProjectListWithSearchProps) { + const [searchQuery, setSearchQuery] = useState(""); + + const filteredProjects = searchQuery + ? projects.filter((project) => { + const query = searchQuery.toLowerCase(); + return ( + project.name.toLowerCase().includes(query) || + (project.projectKey && project.projectKey.toLowerCase().includes(query)) + ); + }) + : projects; + + return ( + <> +

+
+

Projects

+

+ Manage your FlowForge projects and tasks +

+
+
+
+ + setSearchQuery(e.target.value)} + className="w-64 pl-9 pr-9" + /> + {searchQuery && ( + + )} +
+ +
+
+ +
+ {filteredProjects.length === 0 ? ( +

+ No projects found for “{searchQuery}” +

+ ) : ( + filteredProjects.map((project, index) => ( +
+ +
+ )) + )} +
+ + ); +} diff --git a/src/components/sprint/ai-plan-dialog.tsx b/src/components/sprint/ai-plan-dialog.tsx index af41302..e6e1732 100644 --- a/src/components/sprint/ai-plan-dialog.tsx +++ b/src/components/sprint/ai-plan-dialog.tsx @@ -17,6 +17,11 @@ import { Progress } from "@/components/ui/progress"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { ScrollArea } from "@/components/ui/scroll-area"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { Sparkles, Loader2, @@ -72,6 +77,7 @@ interface AIPlanDialogProps { sprintName: string; sprintStatus: string; teamMembers?: TeamMember[]; + aiEnabled?: boolean; onPlanApplied?: () => void; } @@ -80,6 +86,7 @@ export function AIPlanDialog({ sprintName, sprintStatus, teamMembers = [], + aiEnabled = true, onPlanApplied, }: AIPlanDialogProps) { const router = useRouter(); @@ -204,6 +211,24 @@ export function AIPlanDialog({ .reduce((sum, t) => sum + (t.storyPoints || 0), 0) : 0; + if (!aiEnabled) { + return ( + + + + + + + +

AI Plan uses AI to analyze your backlog and suggest optimal task selection based on team capacity and velocity. Enable AI in project settings to use this feature.

+
+
+ ); + } + return ( diff --git a/src/components/sprint/ai-retro-view.tsx b/src/components/sprint/ai-retro-view.tsx index c03ad53..3c67c40 100644 --- a/src/components/sprint/ai-retro-view.tsx +++ b/src/components/sprint/ai-retro-view.tsx @@ -15,6 +15,11 @@ import { Progress } from "@/components/ui/progress"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { Sparkles, Loader2, @@ -98,11 +103,13 @@ interface SprintRetrospective { interface AIRetroViewProps { sprintId: string; sprintName: string; + aiEnabled?: boolean; } export function AIRetroView({ sprintId, sprintName, + aiEnabled = true, }: AIRetroViewProps) { const [open, setOpen] = useState(false); const [isLoading, setIsLoading] = useState(false); @@ -189,6 +196,24 @@ export function AIRetroView({ } }; + if (!aiEnabled) { + return ( + + + + + + + +

AI Retrospective generates insights from sprint data including achievements, challenges, and action items. Enable AI in project settings to use this feature.

+
+
+ ); + } + return ( diff --git a/src/components/sprint/risk-dashboard.tsx b/src/components/sprint/risk-dashboard.tsx index 422cc78..f64c25d 100644 --- a/src/components/sprint/risk-dashboard.tsx +++ b/src/components/sprint/risk-dashboard.tsx @@ -15,6 +15,11 @@ import { Progress } from "@/components/ui/progress"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { AlertTriangle, Loader2, @@ -102,9 +107,10 @@ interface SprintRiskAssessment { interface RiskDashboardProps { sprintId: string; sprintName: string; + aiEnabled?: boolean; } -export function RiskDashboard({ sprintId, sprintName }: RiskDashboardProps) { +export function RiskDashboard({ sprintId, sprintName, aiEnabled = true }: RiskDashboardProps) { const [open, setOpen] = useState(false); const [isLoading, setIsLoading] = useState(false); const [assessment, setAssessment] = useState(null); @@ -187,6 +193,24 @@ export function RiskDashboard({ sprintId, sprintName }: RiskDashboardProps) { return "text-red-500"; }; + if (!aiEnabled) { + return ( + + + + + + + +

Risk Assessment uses AI to analyze sprint risks, dependencies, and success probability. Enable AI in project settings to use this feature.

+
+
+ ); + } + return ( diff --git a/src/components/sprints/SprintBoard.tsx b/src/components/sprints/SprintBoard.tsx index 6225c74..1862221 100644 --- a/src/components/sprints/SprintBoard.tsx +++ b/src/components/sprints/SprintBoard.tsx @@ -81,6 +81,7 @@ interface SprintBoardProps { projectKey?: string; sprintTasks: Task[]; backlogTasks: Task[]; + aiEnabled?: boolean; } function DroppableColumn({ @@ -122,6 +123,7 @@ export function SprintBoard({ sprint, sprintTasks: initialSprintTasks, backlogTasks: initialBacklogTasks, + aiEnabled, }: SprintBoardProps) { const router = useRouter(); const [sprintTasks, setSprintTasks] = useState(initialSprintTasks); @@ -258,6 +260,7 @@ export function SprintBoard({ sprintId={sprint.id} sprintName={sprint.name} sprintStatus={sprint.status} + aiEnabled={aiEnabled} />
@@ -287,6 +290,7 @@ export function SprintBoard({
@@ -317,6 +321,7 @@ export function SprintBoard({
diff --git a/src/components/sprints/SprintCard.tsx b/src/components/sprints/SprintCard.tsx index 200b13e..4ab7e55 100644 --- a/src/components/sprints/SprintCard.tsx +++ b/src/components/sprints/SprintCard.tsx @@ -49,6 +49,7 @@ interface SprintCardProps { stats: SprintStats; }; projectKey?: string; + aiEnabled?: boolean; onStart?: () => void; onComplete?: () => void; onDelete?: () => void; @@ -60,7 +61,7 @@ const statusConfig: Record @@ -115,6 +117,7 @@ export function SprintCard({ sprint, projectKey, onStart, onComplete, onDelete } @@ -131,6 +134,7 @@ export function SprintCard({ sprint, projectKey, onStart, onComplete, onDelete } diff --git a/src/components/sprints/SprintList.tsx b/src/components/sprints/SprintList.tsx index 6ac86da..8f77428 100644 --- a/src/components/sprints/SprintList.tsx +++ b/src/components/sprints/SprintList.tsx @@ -40,10 +40,11 @@ interface Sprint { interface SprintListProps { sprints: Sprint[]; projectKey?: string; + aiEnabled?: boolean; onCreateSprint?: () => void; } -export function SprintList({ sprints, projectKey, onCreateSprint }: SprintListProps) { +export function SprintList({ sprints, projectKey, aiEnabled, onCreateSprint }: SprintListProps) { const router = useRouter(); const [loading, setLoading] = useState(null); const [deleteConfirm, setDeleteConfirm] = useState(null); @@ -131,6 +132,7 @@ export function SprintList({ sprints, projectKey, onCreateSprint }: SprintListPr handleStart(sprint.id)} onComplete={() => handleComplete(sprint.id)} onDelete={() => setDeleteConfirm(sprint)} diff --git a/src/components/sprints/SprintListPage.tsx b/src/components/sprints/SprintListPage.tsx index 1e5e664..6a88cca 100644 --- a/src/components/sprints/SprintListPage.tsx +++ b/src/components/sprints/SprintListPage.tsx @@ -29,9 +29,10 @@ interface SprintListPageProps { sprints: Sprint[]; projectId: string; projectKey?: string; + aiEnabled?: boolean; } -export function SprintListPage({ sprints, projectId, projectKey }: SprintListPageProps) { +export function SprintListPage({ sprints, projectId, projectKey, aiEnabled }: SprintListPageProps) { const [showForm, setShowForm] = useState(false); // Prepare data for velocity chart @@ -59,6 +60,7 @@ export function SprintListPage({ sprints, projectId, projectKey }: SprintListPag setShowForm(true)} /> diff --git a/src/components/task/ai-estimate-badge.tsx b/src/components/task/ai-estimate-badge.tsx index fc608cf..207259a 100644 --- a/src/components/task/ai-estimate-badge.tsx +++ b/src/components/task/ai-estimate-badge.tsx @@ -11,6 +11,11 @@ import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Progress } from "@/components/ui/progress"; import { Separator } from "@/components/ui/separator"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { Sparkles, Loader2, @@ -57,6 +62,7 @@ interface AIEstimateBadgeProps { taskId: string; currentStoryPoints: number | null; compact?: boolean; + aiEnabled?: boolean; onEstimateApplied?: (points: number) => void; } @@ -64,6 +70,7 @@ export function AIEstimateBadge({ taskId, currentStoryPoints, compact = false, + aiEnabled = true, onEstimateApplied, }: AIEstimateBadgeProps) { const router = useRouter(); @@ -152,6 +159,31 @@ export function AIEstimateBadge({ } }; + if (!aiEnabled) { + const disabledButton = ( + + ); + + return ( + + + {disabledButton} + + +

AI Estimate uses AI to analyze task complexity and suggest story points. Enable AI in project settings to use this feature.

+
+
+ ); + } + if (compact) { return ( diff --git a/src/components/tasks/CodeReviewPanel.tsx b/src/components/tasks/CodeReviewPanel.tsx index 8433880..a231fa2 100644 --- a/src/components/tasks/CodeReviewPanel.tsx +++ b/src/components/tasks/CodeReviewPanel.tsx @@ -52,6 +52,7 @@ export function CodeReviewPanel({ taskId }: CodeReviewPanelProps) { const [isRejecting, setIsRejecting] = useState(false); const [showFeedbackDialog, setShowFeedbackDialog] = useState(false); const [showRejectDialog, setShowRejectDialog] = useState(false); + const [editedFiles, setEditedFiles] = useState>({}); useEffect(() => { async function fetchGeneratedCode() { @@ -77,17 +78,32 @@ export function CodeReviewPanel({ taskId }: CodeReviewPanelProps) { fetchGeneratedCode(); }, [taskId]); + function handleFileContentChange(path: string, newContent: string) { + setEditedFiles((prev) => ({ ...prev, [path]: newContent })); + } + async function handleApprove() { if (!generatedCode) return; setIsApproving(true); try { + // Build updated files array if any edits were made + const hasEdits = Object.keys(editedFiles).length > 0; + const updatedFiles = hasEdits + ? generatedCode.files.map((file) => + editedFiles[file.path] !== undefined + ? { ...file, content: editedFiles[file.path] } + : file + ) + : undefined; + const response = await fetch(`/api/tasks/${taskId}/code-review`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ action: "approve", generatedCodeId: generatedCode.id, + updatedFiles, }), }); @@ -231,7 +247,10 @@ export function CodeReviewPanel({ taskId }: CodeReviewPanelProps) {

Generated Files

- +
diff --git a/src/components/tasks/CommentsSection.tsx b/src/components/tasks/CommentsSection.tsx index 06f12a1..6e3eeb6 100644 --- a/src/components/tasks/CommentsSection.tsx +++ b/src/components/tasks/CommentsSection.tsx @@ -36,6 +36,7 @@ import { GitPullRequest, Code, Users, + Workflow, Check, X, CheckCircle2, @@ -84,6 +85,7 @@ const ACTIVITY_ICONS: Record = { commit: GitCommit, pr: GitPullRequest, review: Users, + build: Workflow, }; // Parse activity summary from JSON content diff --git a/src/components/tasks/GeneratedFileCard.tsx b/src/components/tasks/GeneratedFileCard.tsx index 68a798e..1bbcd35 100644 --- a/src/components/tasks/GeneratedFileCard.tsx +++ b/src/components/tasks/GeneratedFileCard.tsx @@ -17,14 +17,12 @@ import { FileX, Copy, Check, + Pencil, + Undo2, } from "lucide-react"; import { cn } from "@/lib/utils"; import type { GeneratedFile } from "@/types"; -interface GeneratedFileCardProps { - file: GeneratedFile; -} - const actionConfig = { create: { label: "Create", @@ -83,9 +81,16 @@ function getLanguageFromExtension(ext: string): string { return map[ext.toLowerCase()] || ext || "text"; } -export function GeneratedFileCard({ file }: GeneratedFileCardProps) { +interface GeneratedFileCardProps { + file: GeneratedFile; + onContentChange?: (path: string, newContent: string) => void; +} + +export function GeneratedFileCard({ file, onContentChange }: GeneratedFileCardProps) { const [isOpen, setIsOpen] = useState(false); const [copied, setCopied] = useState(false); + const [isEditing, setIsEditing] = useState(false); + const [editedContent, setEditedContent] = useState(file.content); const config = actionConfig[file.action]; const ActionIcon = config.icon; @@ -93,12 +98,27 @@ export function GeneratedFileCard({ file }: GeneratedFileCardProps) { const language = getLanguageFromExtension(ext); const lineCount = file.content.split("\n").length; + const currentContent = isEditing ? editedContent : file.content; + async function handleCopy() { - await navigator.clipboard.writeText(file.content); + await navigator.clipboard.writeText(currentContent); setCopied(true); setTimeout(() => setCopied(false), 2000); } + function handleToggleEdit() { + if (isEditing) { + // Save edits + onContentChange?.(file.path, editedContent); + } + setIsEditing(!isEditing); + } + + function handleResetContent() { + setEditedContent(file.content); + onContentChange?.(file.path, file.content); + } + return ( @@ -135,40 +155,92 @@ export function GeneratedFileCard({ file }: GeneratedFileCardProps) { {/* Header */}
{language} - + )} + )} - -
- - {/* Code content */} -
-
-                
-                  {file.action === "delete" ? (
-                    
-                      This file will be deleted
-                    
+                
+ +
+ + {/* Code content */} + {file.action === "delete" ? ( +
+ + This file will be deleted + +
+ ) : isEditing ? ( +