Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov black flake8

- name: Check code formatting with Black
run: |
black --check .
black --check tests/

- name: Lint with flake8
run: |
flake8 src/ tests/ --max-line-length=100 --extend-ignore=E203,W503

- name: Run tests with coverage
run: |
pytest tests/ -v --cov=src/ --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false

docker-test:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: |
docker build -t perplexity-api-simple:test .

- name: Run tests in container
run: |
docker run --rm perplexity-api-simple:test python -m pytest tests/ -v
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
# Environment and secrets
.env
.env.*
.api_keys.json
.api_keys.json.backup
.api_keys.json.tmp
.mcp.json

# Runtime data (contains user queries/secrets)
.query_history.json
.request_log.jsonl
.session_savings.json
.model_stats.json
.analytics.json
.alerts.json
.webhooks.json
.auto_sync_config.json
.notifyrc

# Personal AI instructions - NEVER commit
CLAUDE.md
GEMINI.md
Expand Down
80 changes: 80 additions & 0 deletions ATLAS_AI_SESSION_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Atlas AI Session Summary

## What We Accomplished

### Phase 1: PR Analysis & Understanding
- Deep code review of PR #2 (534 lines across 5 files)
- Ran 3 doubt agents that revealed local/remote repo divergence
- Researched FastMCP, curl_cffi, and Perplexity API patterns
- Verified PR findings through live testing
- **Key discovery:** Local `master` and remote `main` have NO common commits — completely different histories

### Phase 2: Security & Repo Sync
- **Critical security fix:** Updated `.gitignore` to exclude sensitive runtime data files (`.mcp.json`, `.query_history.json`, `.request_log.jsonl`, etc.)
- Created `v2` branch from local `master`
- Pushed public improvements to remote: simplified server, dashboard, ops tooling
- **Kept private:** Atlas Search MCP server, extension v2, cookie automation scripts
- Created PR #3 (v2 → main) to properly sync the public repo
- Posted gracious comment on PR #2 explaining the situation

### Phase 3: Atlas AI Product Strategy
- Defined product positioning: "Turn AI agent research into professional, cited, structured reports"
- Designed pricing tiers: Free ($0), Pro ($29/mo), Team ($299/mo), Enterprise (custom)
- Created path to $10M ARR: 2,800 Pro users + 1,000 Team accounts + 150 Enterprise
- Identified competitive moat: cookie automation, structured reports, multi-model support

### Phase 4: Technical Architecture
- **Multi-user architecture designed:**
- Data model for users, workspaces, API keys, reports, usage_logs
- Tech stack chosen: PostgreSQL, SQLAlchemy, Supabase Auth, Stripe
- API endpoints designed for auth, workspaces, reports, billing

- **Billing infrastructure designed:**
- Stripe Products and Prices structure
- Database schema for subscriptions and usage tracking
- Rate limiting middleware by tier
- Webhook handlers for Stripe events
- Pricing copy and implementation priority

## Files Created

1. `docs/ATLAS_PRODUCT_ARCHITECTURE.md` — Multi-user architecture, API endpoints, migration path
2. `docs/BILLING_INFRASTRUCTURE.md` — Stripe integration, pricing tiers, rate limiting, webhooks

## Current State

- **Public repo (v2 branch):** Core proxy server, dashboard, security fixes, ops tooling — ready to merge
- **Private repo (local master):** Atlas Search MCP, extension v2, cookie automation — becoming Atlas AI product
- **PR #2:** Commented graciously, invited contributor to review v2
- **PR #3:** Open and ready for merge (v2 → main)

## Next Steps (When Ready)

1. **Merge PR #3** — sync public repo with v2 improvements
2. **Database setup** — PostgreSQL + SQLAlchemy models
3. **Authentication** — `/auth/register`, `/auth/login`, SSO integration
4. **Report storage** — `/reports` CRUD with sharing
5. **Stripe integration** — Checkout flow, webhooks, customer portal
6. **Marketing site** — Separate from open-source repo, pricing page

## Key Numbers

- $10M ARR = ~$833K/month
- 2,800 Pro @ $29/mo = $81K (10%)
- 1,000 Team @ $299/mo = $299K (36%)
- 150 Enterprise @ $3K/mo = $450K (54%)
- Conversion from free to paid: 5% (industry standard for dev tools)
- MCP ecosystem: 10K+ servers, 97M downloads/month, no monetization yet (opportunity)

## The Fork in the Road

You now have two codebases:
- **`anombyte93/perplexity-api-simple`** (public) — Open source proxy, builds community
- **`atlas-ai-private`** (create this) — Commercial product with Atlas Search, billing, multi-user

The open-source repo drives adoption. The private repo captures enterprise value.

---

Generated: 2026-02-17
Session: PR #2 Analysis → Open Core Strategy → Atlas AI Product Design
Loading
Loading