Skip to content

hirendhola/whoops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whoops 🫣

Anonymous developer confession platform — because we all mess up.

Built as a Bun monorepo with three apps and one shared package.

Architecture

App Stack Description
apps/api Hono + Drizzle + Neon Postgres REST API — confessions CRUD, OG image cards
apps/web Next.js 15 (Turbopack) Frontend — feed, confession cards, upvotes
apps/cli Commander + Clack CLI tool — submit confessions from the terminal
packages/shared TypeScript Shared types used across apps

Prerequisites

Getting Started

# Install all dependencies (workspaces handled automatically)
bun install

Environment Variables

# API — apps/api/.env
DATABASE_URL=postgresql://...
PORT=3001

# Web — apps/web/.env.local
NEXT_PUBLIC_API_URL=http://localhost:3001

Development

# Run API + Web together
bun run dev

# Or run individually
bun run dev:api      # API on http://localhost:3001
bun run dev:web      # Web on http://localhost:3000
bun run dev:cli      # CLI tool

Database (Drizzle + Neon)

bun run db:generate   # Generate migrations from schema changes
bun run db:migrate    # Apply migrations to the database
bun run db:studio     # Open Drizzle Studio (visual DB browser)

Build & Production

# Build the web app
bun run build:web

# Start production web server
bun run start:web

# Build CLI binary for current platform
cd apps/cli && bun build src/index.ts --compile --outfile whoops

CLI

whoops                    # Interactive confession wizard
whoops confess "I did it" # Quick confession
whoops feed               # Browse latest confessions
whoops top                # Leaderboard
whoops shame              # Wall of shame
whoops random             # Random confession

Download pre-built binaries from Releases (Mac, Windows, Linux).

Deployment

API

Bun + Hono server — deploy anywhere that runs Bun:

bun run src/index.ts   # Set DATABASE_URL env var

Web

Next.js app — deploy to Vercel or self-host:

bun run build:web && bun run start:web   # Set NEXT_PUBLIC_API_URL env var

CI/CD

On push to main, GitHub Actions automatically builds CLI binaries for:

  • Linux x64
  • macOS Intel (x64)
  • macOS Apple Silicon (arm64)
  • Windows x64

Binaries are published as a GitHub Release.

Project Structure

whoops/
├── .github/workflows/   # CI — CLI builds on push to main
├── apps/
│   ├── api/             # Hono REST API + Drizzle ORM
│   ├── cli/             # Terminal confession tool
│   └── web/             # Next.js frontend
├── packages/
│   └── shared/          # Shared TypeScript types
├── package.json         # Root workspace config
└── bun.lock

About

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors