Skip to content
← portfolio·
case study

Freebox

2025

A community marketplace for giving away free items — interest-based claims keep distribution fair, posters pick recipients, and the whole flow runs on Next.js + Prisma + Cloudinary.

Items move through an AVAILABLE → PENDING → TAKEN lifecycle. RTK Query caches API responses for snappy navigation, NextAuth handles Google sign-in, and Cloudinary stores optimized photos with drag-and-drop uploads from the post-an-item flow.

WebMarketplacePostgres + PrismaOpen source
⬡ view on github
Freebox marketplace — available items grid, light theme
architecture

How It Works

NextAuth + the Prisma adapter handle session persistence. Items move through a state machine: a poster lists an item, interested users tap in, and the poster selects a recipient — flipping the item to PENDING and then TAKEN on hand-off. RTK Query caches API responses, Cloudinary hosts photos, and Postgres backs everything via Prisma.

// claim flow
actors
Poster
lists an item
Item
photo · category\nlocation
Interested users
tap interested
↓ poster picks one
lifecycle
AVAILABLE
PENDING
TAKEN
stack

Tech Stack

Frontend
Next.js 16 App Router · React 19 · TypeScript
Styling
Tailwind CSS v4 · shadcn/ui · Radix primitives
State
Redux Toolkit · RTK Query (API caching)
Backend
Next.js API routes · Prisma 7 ORM
Database
PostgreSQL
Auth
NextAuth.js · Google OAuth · Prisma adapter
Media
Cloudinary (uploads + transforms)
Deploy
Vercel
features

Key Features

Google OAuth sign-in with profile picture auto-population
Drag-and-drop image uploads optimized via Cloudinary
Item lifecycle: AVAILABLE → PENDING → TAKEN
Interest system — poster picks among interested users
User dashboard with posted items and expressed interests
Location-aware pickup addresses with coordinates
Light, dark, and system theme via next-themes
RTK Query caching with automatic refetch on focus