2025
vibecheck: a Go, Postgres, Redis, and Next.js quiz
A two-week full-stack sprint: a Gin REST API on Postgres with Redis caching, a Next.js quiz front end, and one compose file that runs all four services.
vibecheck is a small game: the server shows you a tweet, you guess its sentiment, and you can ask for a hint. I built it to wire a full stack together and run it with one command.
How it works
main.go loads configuration, opens Postgres through database/sql and Redis through go-redis, and mounts a Gin router. Fourteen controller handlers sit over a service layer that caches query results in Redis, keyed by the SQL text or by page for tweet listings. The database is seeded at start-up from a CSV of tweets with hint and answer columns.
docker-compose.yml runs four services: Postgres 17, Redis 7, the API, and the Next.js front end. The front end, built with Tailwind and a few shadcn components, fetches a random tweet, shows the hint on request, checks the answer, and keeps score.
Scale
Fifteen commits in February 2025, most in the first two days. A collaborator built the front end and the CORS handling. The committed secrets.yml holds only local development defaults, the same ones the compose file falls back to; there are no real credentials in the repository.