Files
thoughts/thoughts-frontend
Gabriel Kaszewski 0b74344efe
Some checks failed
test / unit (push) Has been cancelled
lint / lint (push) Has been cancelled
docs: fix DX for new contributors
- Fix port mismatch: Dockerfile EXPOSE 8000, .env.example PORT=8000,
  compose.yml gets explicit PORT=8000
- Add thoughts-frontend/.env.example with all required vars
- Document NEXT_PUBLIC_FEDIVERSE_DOMAIN in README
- Document private cargo registry (k-ap on Gitea)
- Add local dev workflow: make dev-infra → cargo run → bun dev
- Split make targets: test-unit (no DB), test-integration, up
2026-05-29 14:27:42 +02:00
..
2026-05-29 14:27:42 +02:00
2026-05-29 14:27:42 +02:00

Thoughts — Frontend

Next.js 15 (App Router) frontend for the Thoughts self-hosted microblogging server.

Features

  • Post thoughts, reply, boost, and like
  • Home feed, public feed, per-user timelines
  • Browse and follow remote Fediverse actors by @user@instance handle
  • Full remote actor profiles — bio, banner, profile fields, posts tab, followers/following tabs
  • Full-text search for local users and thoughts; remote actor lookup via WebFinger
  • Notifications, API key management, profile editing
  • Dark/light theme

Setup

bun install

Copy .env.local.example to .env.local (or set the variables directly):

NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_SERVER_SIDE_API_URL=http://localhost:8000

NEXT_PUBLIC_API_URL is used by client-side fetches (runs in the browser). NEXT_PUBLIC_SERVER_SIDE_API_URL is used by server-side fetches (runs in Next.js SSR — can point to an internal service URL in Docker).

Run

bun run dev     # development — http://localhost:3000
bun run build   # production build
bun run start   # serve production build

Docker

docker build \
  --build-arg NEXT_PUBLIC_API_URL=https://api.yourdomain.example.com \
  --build-arg NEXT_PUBLIC_SERVER_SIDE_API_URL=http://thoughts:8000 \
  -t thoughts-frontend .
docker run -p 3000:3000 thoughts-frontend