A personal daily technology news + content tool.
It finds recent tech news matching your interests, researches and verifies the important stories against reliable sources, and drafts Twitter/X, LinkedIn, and Medium content for you to review, edit, and copy. It never publishes anything automatically.
Accuracy > Interestingness > Virality
Fetch news → remove duplicates → group into stories → rank by your interests
↓
Select a story → research it → verify claims → show confirmed/uncertain
↓
Generate Twitter/X + LinkedIn + Medium drafts → edit → fact check → copy
- Frontend: Next.js + TypeScript + Tailwind CSS
- Backend: Python + FastAPI + SQLAlchemy
- Database: PostgreSQL (SQLite works for local dev)
cd backend
pip install -r requirements.txt
cp ../.env.example ../.env # add your OPENAI_API_KEY
python scripts/seed.py # creates default user + initial interests
python -m uvicorn app.main:app --port 8000Or use the helper script:
backend/scripts/server.sh start # runs detached, logs to backend/scripts/uvicorn.log
backend/scripts/server.sh stopThe API docs are at http://localhost:8000/docs.
PostgreSQL:
docker compose up -d dbthen setDATABASE_URL=postgresql+psycopg2://befriends:befriends@localhost:5432/befriends. Without a key, news comes from RSS feeds and generated content uses structured templates.
cd frontend
npm install
npm run devOpen http://localhost:3000. The Next.js dev server proxies /api/* to the backend on port 8000.
The app is a personal single-user tool: you log in with a username + password set via env vars, and there is no signup.
-
Backend — build and run the Docker image (a
backend/Dockerfileis included):docker build -t befriends-api backend docker run -d --name befriends-api -p 8000:8000 \ -e DATABASE_URL=postgresql+psycopg2://befriends:befriends@db-host:5432/befriends \ -e APP_USERNAME=you \ -e APP_PASSWORD='a-strong-password' \ -e APP_SECRET='a-long-random-secret' \ -e OPENAI_API_KEY=... \ -e OPENAI_BASE_URL=... \ -e LLM_MODEL=... \ -e GEMINI_API_KEY=... \ befriends-api
PostgreSQL must be reachable (
docker compose up -d dbworks for a local host). Without a database, SQLite still works if you passDATABASE_URL=sqlite:///data/befriend.db. -
Frontend — build with the backend URL baked into the proxy target, then serve with Node:
cd frontend NEXT_PUBLIC_API_URL=https://api.your-domain.com npm run build npm start # serves on :3000
Put
npm startbehind any long-lived host (a small VPS, Railway, Render, Fly.io). The backend needs long request timeouts —/api/briefs/runcan take a minute or more, so a serverless frontend proxy (e.g. Vercel's) will time it out. -
First run —
python scripts/seed.pycreates the default user + initial interests. There is no signup; credentials come only fromAPP_USERNAME/APP_PASSWORD.
| Variable | Purpose |
|---|---|
APP_USERNAME |
Login username (default Mohit) |
APP_PASSWORD |
Login password (required) |
APP_SECRET |
Signs login tokens — set a long random value |
APP_TOKEN_TTL |
Token lifetime in seconds (default 7 days) |
NEXT_PUBLIC_API_URL |
Backend URL the frontend proxy targets (default http://localhost:8000) |
- Open the app → Run Daily Brief → wake up to ~10 relevant tech stories.
- Open a story → review the sources → Research Story → see confirmed facts, company claims, and what's uncertain.
- Add personal thoughts → Generate All → review the Twitter/X, LinkedIn, and Medium drafts.
- Edit → Regenerate (e.g. "Make shorter", "Remove hype") → Copy → paste where you publish.
backend/
app/api/ FastAPI routers (interests, briefs, stories, research, drafts, settings)
app/models/ SQLAlchemy models (DATBASE.md schema)
app/services/ news collection, ranking, research, verification, generation, fact-checker
prompts/ Versioned LLM prompt templates (prompt.md)
tests/ Pytest suite (testing.md)
frontend/
app/ Next.js pages: /, /saved, /history, /settings, /stories/[id]
components/ Navigation, StoryCard
lib/api.ts Typed API client
docs/ Product specs and design docs (PRD, Design, API, DATBASE, ui, prompt, content, verification, testing)
The product requirements and design live as markdown in docs/:
docs/PRD.md— requirementsdocs/Design.md— architecturedocs/DATBASE.md— database schemadocs/API.md— API specdocs/ui.md— UI specdocs/prompt.md— AI promptsdocs/content.md— content generation rulesdocs/verification.md— research & verification rulesdocs/testing.md— test strategy
cd backend && PYTHONPATH=. python3 -m pytest tests/ -q- Never auto-publishes.
- A claim with no evidence can never be marked
confirmed. - Generated drafts are checked against the research report; unsupported claims are flagged before you copy.
- No secrets are stored in the repo — API keys live in
.env.