Skip to content

MukundaKatta/fanout

Repository files navigation

Fanout

CI License: MIT Deploy with Vercel

Agentic content studio for indie shippers. One product description → 5 distinct, platform-tailored drafts → posted from your own browser.

15 channels: LinkedIn · X · Threads · Bluesky · Mastodon · Instagram · Reddit · Hacker News · Product Hunt · Medium · Dev.to · Email · Telegram · Discord · Slack

Architecture

web (Next.js 15)  ──►  backend (FastAPI + Postgres)  ──►  Groq (free Llama 3.3 70B)
                                  ▲
                                  │ polls every 30s
                                  │
                       extension (Chrome MV3) ── posts via your logged-in tabs
  • No third-party API keys to authorise — extension drives composers in your own browser session
  • Auto-post on LinkedIn, X, Threads, Bluesky, Mastodon
  • Assist / copy-and-open for Reddit, HN, Product Hunt, Medium, Dev.to, Telegram, Discord, Slack
  • mailto: for Email — opens your default mail client with subject + body filled
  • Atomic claim via SELECT ... FOR UPDATE SKIP LOCKED so concurrent polls can't double-post

Run locally

Prereqs: Node 22+, Python 3.11+, Postgres, a free Groq API key.

# 1. backend
cd backend
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp .env.example .env   # paste your GROQ_API_KEY
createdb fanout
.venv/bin/uvicorn app.main:app --reload

# 2. web (in a second terminal)
cd web
npm install
cp .env.local.example .env.local   # for Supabase auth, otherwise leave blank
npm run dev
# open http://localhost:3000

# 3. extension (one-time)
# Chrome → chrome://extensions → Developer mode → Load unpacked → pick ./extension

Auth (optional)

Runs in dev mode by default (single user, no login). To enable Supabase magic-link auth:

  1. Create a free Supabase project
  2. Set SUPABASE_JWT_SECRET in backend/.env
  3. Set NEXT_PUBLIC_SUPABASE_URL + NEXT_PUBLIC_SUPABASE_ANON_KEY in web/.env.local
  4. Optionally point DATABASE_URL at the Supabase Postgres
  5. After signing in, paste your access token into the extension popup so it can authenticate when polling

Repo layout

backend/      FastAPI + agentic pipeline + Postgres store
  app/agent.py     plan → write → critique → refine + variations(N)
  app/store.py     SQLAlchemy-backed CRUD scoped by user_id
  app/main.py      REST endpoints
extension/    Chrome MV3 extension that posts via your browser session
  src/background.js     polls /queue, dispatches to content scripts
  src/content-*.js      one per platform
web/          Next.js 15 + Tailwind + Supabase
  app/page.tsx          composer + draft picker + sticky action bar
  components/           Logo, Marquee, Spotlight, Typewriter, ...

Deploying the web app

Easy mode — Vercel native git integration (recommended):

  1. Click Deploy with Vercel above
  2. Set Root Directory to web when prompted
  3. Provide the three NEXT_PUBLIC_* env vars
  4. Vercel auto-deploys on every push to main

Optional — CI-driven deploy from GitHub Actions:

The repo includes .github/workflows/deploy-web.yml. It runs only when you set:

  • Secret VERCEL_TOKEN
  • Secret VERCEL_ORG_ID
  • Secret VERCEL_PROJECT_ID
  • Variable VERCEL_DEPLOY_ENABLED=true

This lets CI gate the deploy and post the live URL back to the commit.

Security

See SECURITY.md. Short version: the backend never holds your social credentials — the extension drives composers in your own logged-in browser session.

Contributing

PRs welcome — see CONTRIBUTING.md. main is protected; CI must pass and changes flow through PRs.

License

MIT © Mukunda Katta

About

Agentic content studio: one product → 5 platform-tailored drafts → posted from your own browser session. 15 channels, no third-party API keys.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors