Metadata-Version: 2.4
Name: ideago
Version: 0.3.13
Summary: AI-powered competitor research engine for startup ideas
Project-URL: Homepage, https://github.com/Tendo33/ideago
Project-URL: Repository, https://github.com/Tendo33/ideago
Project-URL: Documentation, https://github.com/Tendo33/ideago/tree/main/.trellis/spec
Project-URL: Changelog, https://github.com/Tendo33/ideago/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/Tendo33/ideago/issues
Author: Tendo33
Maintainer: Tendo33
License: MIT License
        
        Copyright (c) 2025 Tendo33
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai,competitor-research,llm,startup
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: aiofiles>=23.0.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: json-repair>=0.39.1
Requires-Dist: langchain-openai>=0.3.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0
Requires-Dist: langgraph>=1.0.10
Requires-Dist: loguru>=0.7.0
Requires-Dist: openai>=1.60.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: pydantic>=2.10.6
Requires-Dist: requests>=2.33.0
Requires-Dist: sentry-sdk[fastapi]>=2.55.0
Requires-Dist: sse-starlette>=2.0.0
Requires-Dist: tavily-python>=0.5.0
Requires-Dist: uvicorn[standard]>=0.34.0
Provides-Extra: dev
Requires-Dist: mypy>=1.15.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Requires-Dist: vulture>=2.10; extra == 'dev'
Provides-Extra: test
Requires-Dist: anyio>=4.0.0; extra == 'test'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'test'
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
Requires-Dist: pytest-mock>=3.10.0; extra == 'test'
Requires-Dist: pytest>=7.0.0; extra == 'test'
Description-Content-Type: text/markdown

<div align="center">
  <img src="docs/assets/icon.png" alt="IdeaGo logo" width="96" />

  <h1>IdeaGo</h1>

  <p><strong>Decision-first source intelligence for startup ideas.</strong></p>

  <p>
    IdeaGo turns a rough product idea into a structured validation report with recommendation,
    why-now framing, pain signals, commercial signals, whitespace opportunities, competitors,
    evidence, and confidence.
  </p>

  <p>
    <a href="README_CN.md">简体中文</a> ·
    <a href="#quick-start">Quick Start</a> ·
    <a href="#what-lives-on-main">Branch Scope</a> ·
    <a href="#how-it-works">How It Works</a> ·
    <a href="DEPLOYMENT.md">Deployment</a> ·
    <a href=".trellis/spec/README.md">Trellis Spec</a>
  </p>

  <p>
    <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License: MIT" /></a>
    <img src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white" alt="Python 3.10+" />
    <img src="https://img.shields.io/badge/React-19-61DAFB?logo=react&logoColor=black" alt="React 19" />
    <img src="https://img.shields.io/badge/FastAPI-0.115%2B-009688?logo=fastapi&logoColor=white" alt="FastAPI" />
    <img src="https://img.shields.io/badge/Branch-main-111827" alt="Branch main" />
  </p>
</div>

---

## Overview

This README describes the `main` branch.

`main` is the anonymous and personal-deployment line of IdeaGo. It keeps the same Source
Intelligence V2 analysis engine as `saas`, but intentionally excludes hosted runtime concerns:

- no login
- no profile system
- no Supabase requirement to boot
- no admin dashboard
- no billing or pricing UI

If you need the hosted product with auth, profile ownership, admin APIs, and SaaS deployment
behavior, switch to the `saas` branch.

## What Lives On `main`

### Current product contract

IdeaGo is not just a competitor lookup flow anymore. The report contract is decision-first:

1. recommendation and why-now
2. pain signals
3. commercial signals
4. whitespace opportunities
5. competitors
6. evidence
7. confidence

### Current runtime surface

- anonymous idea submission
- transient `/reports/new` handoff before the persisted report id is known
- SSE progress streaming with capped reconnects and `/status` fallback
- local file-cache persistence for report history
- report detail and markdown export
- stable anonymous `X-Session-Id` headers generated by the frontend client
- local SQLite checkpoints for LangGraph state
- no account ownership model

### Current route surface

- `/`
- `/reports`
- `/reports/:id`

The codebase contains some additional shared/legal UI files, but the active router on `main`
stays intentionally small and anonymous.

Idea submission first transitions through `/reports/new` as an anonymous creation state before the
real report id is available. That state is intentionally handled inside the report route flow
instead of being exposed as a permanent standalone page.

Operational safeguards now baked into `main`:

- production logging keeps `backtrace` and `diagnose` off by default
- API responses include a baseline `Content-Security-Policy`
- `/reports*` rate limiting is bucketed separately for read, status, stream, and mutation flows
- the report UI keeps decision-first sections aligned as recommendation, why-now, pain,
  commercial, whitespace, competitors, evidence, confidence

## Product Walkthrough

### Landing And Idea Intake

![Landing and intake](docs/assets/1.png)

### Real-Time Research Pipeline

![Pipeline progress](docs/assets/2.png)

### Decision Summary

![Decision summary](docs/assets/3.png)

### Evidence-Backed Landscape

![Report workspace](docs/assets/4.png)

## Quick Start

### Prerequisites

- Python 3.10+
- [uv](https://github.com/astral-sh/uv)
- Node.js 20+
- `pnpm`

Minimum useful secret:

- `OPENAI_API_KEY`

Recommended for better data coverage:

- `TAVILY_API_KEY`
- `GITHUB_TOKEN`
- `PRODUCTHUNT_DEV_TOKEN`
- `REDDIT_CLIENT_ID`
- `REDDIT_CLIENT_SECRET`

### Install

```bash
uv sync --all-extras
pnpm --prefix frontend install
```

Frontend package management on `main` is `pnpm` only. Do not use the npm CLI and do not commit
npm lockfiles.

### Configure

```bash
cp .env.example .env
cp frontend/.env.example frontend/.env
```

Minimum practical configuration:

- `OPENAI_API_KEY`

Common local runtime settings:

- `CACHE_DIR`
- `ANONYMOUS_CACHE_TTL_HOURS`
- `FILE_CACHE_MAX_ENTRIES`
- `LANGGRAPH_CHECKPOINT_DB_PATH`
- `RATE_LIMIT_ANALYZE_MAX`
- `RATE_LIMIT_ANALYZE_WINDOW_SECONDS`
- `RATE_LIMIT_REPORTS_MAX`
- `RATE_LIMIT_REPORTS_WINDOW_SECONDS`
- `CORS_ALLOW_ORIGINS`

Frontend config on `main` is intentionally small:

- `VITE_API_BASE_URL`
- `VITE_SENTRY_DSN` if desired

No frontend env var is required for anonymous session identity or SSE recovery. The browser client
automatically:

- generates a stable `X-Session-Id`
- sends it on report reads, export, and streaming requests
- falls back from SSE reconnect exhaustion to `/api/v1/reports/{id}/status`

### Run In Development

Terminal 1:

```bash
uv run uvicorn ideago.api.app:create_app --factory --reload --port 8000
```

Terminal 2:

```bash
pnpm --prefix frontend dev
```

Open:

- frontend: [http://localhost:5173](http://localhost:5173)
- backend health: [http://localhost:8000/api/v1/health](http://localhost:8000/api/v1/health)

### Single-Process Local Run

```bash
pnpm --prefix frontend build
uv run python -m ideago
```

Open: [http://localhost:8000](http://localhost:8000)

### Docker Compose

`main` ships with a simple `docker-compose.yml` that pulls the published image from Docker Hub:

```bash
docker compose pull
docker compose up -d
```

Optional: pin to a release tag instead of `latest`:

```bash
IDEAGO_IMAGE_TAG=0.3.13 docker compose up -d
```

If you prefer to build from source, the branch also includes a Dockerfile.

## How It Works

IdeaGo runs an explicit Source Intelligence V2 pipeline:

`intent_parser -> query_planning_rewriting -> platform_adaptation -> sources -> extractor -> aggregator`

That pipeline produces a decision-first report which is then persisted locally for later reopening.

```mermaid
flowchart TD
    A["User idea"] --> B["POST /api/v1/analyze"]
    B --> C["LangGraph engine"]
    C --> D["Intent parsing"]
    D --> E["Query planning + rewriting"]
    E --> F["Platform adaptation"]
    F --> G{"Local cache hit?"}
    G -->|Yes| H["Return persisted report"]
    G -->|No| I["Fetch six live sources"]
    I --> J["Extract structured signals"]
    J --> K["Aggregate findings"]
    K --> L["Assemble decision-first report"]
    L --> M["Persist report + runtime status"]
    M --> N["History / detail / export"]
    C -.-> O["SSE progress stream"]
```

Fixed source roles:

- Tavily for broad recall
- Reddit for pain and migration language
- GitHub for open-source maturity and ecosystem signals
- Hacker News for builder sentiment
- App Store for review-cluster pain
- Product Hunt for launch positioning

## API Overview

Public API on `main`:

- `POST /api/v1/analyze`
- `GET /api/v1/reports`
- `GET /api/v1/reports/{id}`
- `GET /api/v1/reports/{id}/status`
- `GET /api/v1/reports/{id}/stream`
- `GET /api/v1/reports/{id}/export`
- `DELETE /api/v1/reports/{id}`
- `DELETE /api/v1/reports/{id}/cancel`
- `GET /api/v1/health`

`main` does not expose auth, billing, profile, pricing, or admin APIs.

Anonymous request behavior:

- mutating requests still require `X-Requested-With`
- report reads, status, stream, and export attach a stable client-generated `X-Session-Id`
- report throttling is isolated across read, status, stream, and mutation buckets

## Configuration Notes

Important settings on `main`:

- `OPENAI_API_KEY`
- `OPENAI_MODEL`
- `TAVILY_API_KEY`
- `CACHE_DIR`
- `ANONYMOUS_CACHE_TTL_HOURS`
- `FILE_CACHE_MAX_ENTRIES`
- `LANGGRAPH_CHECKPOINT_DB_PATH`
- `RATE_LIMIT_ANALYZE_MAX`
- `RATE_LIMIT_ANALYZE_WINDOW_SECONDS`
- `RATE_LIMIT_REPORTS_MAX`
- `RATE_LIMIT_REPORTS_WINDOW_SECONDS`
- `CORS_ALLOW_ORIGINS`

Optional Reddit settings:

- `REDDIT_CLIENT_ID`
- `REDDIT_CLIENT_SECRET`
- `REDDIT_ENABLE_PUBLIC_FALLBACK`
- `REDDIT_PUBLIC_FALLBACK_LIMIT`
- `REDDIT_PUBLIC_FALLBACK_DELAY_SECONDS`

On `main`, public Reddit fallback is allowed by default unless you configure OAuth credentials.

Validation and report UX notes:

- query validation collapses whitespace before validation and requires at least 4 meaningful
  alphanumeric characters plus at least one letter
- the report page renders decision-first sections in this order:
  `recommendation -> why-now -> pain -> commercial -> whitespace -> competitors -> evidence -> confidence`
- `SectionNav` anchors follow the same order one-to-one

## Project Structure

### Backend

- `src/ideago/api`: FastAPI app, routes, middleware, schemas
- `src/ideago/cache`: local report persistence
- `src/ideago/config`: runtime settings
- `src/ideago/models`: domain models and report contracts
- `src/ideago/pipeline`: orchestration, extraction, aggregation, report assembly
- `src/ideago/sources`: six data-source adapters

### Frontend

- `frontend/src/app`: router, shell, navbar, error boundary
- `frontend/src/features/home`: main search experience
- `frontend/src/features/history`: local report history
- `frontend/src/features/reports`: report detail and progress views
- `frontend/src/lib/api`: typed API client and SSE hook
- `frontend/src/lib/i18n`: locale setup and translations
- `frontend/src/components/ui`: shared UI primitives

## Branch Model

- `main`: anonymous/personal deployment line
- `saas`: hosted/commercial line

Sync rule:

- shared product work lands on `main`
- `saas` pulls from `main`
- do not move hosted-only runtime dependencies back into `main`

## Documentation Map

- Trellis spec entrypoint: [.trellis/spec/README.md](.trellis/spec/README.md)
- Backend conventions: [.trellis/spec/backend/index.md](.trellis/spec/backend/index.md)
- Frontend conventions: [.trellis/spec/frontend/index.md](.trellis/spec/frontend/index.md)
- Settings and env vars: [.trellis/spec/backend/config-logging.md](.trellis/spec/backend/config-logging.md)
- Deployment runbook: [DEPLOYMENT.md](DEPLOYMENT.md)

## Verification

Run what applies before you call a change complete:

```bash
# Backend
uv run ruff check src tests scripts
uv run ruff format --check src tests scripts
uv run mypy src
uv run pytest

# Frontend
pnpm --prefix frontend lint
pnpm --prefix frontend typecheck
pnpm --prefix frontend test
pnpm --prefix frontend build
```
