APP

the app for thoughts
10 days ago

theunpartyapp

Organization: unparty-app
Repository: unparty-app/theunpartyapp
Type: app
Status: Active Development
Primary Language: TypeScript

A Next.js web application serving as the primary marketing platform and content management system for unparty.app, featuring an admin panel, article publishing, inventory management, and user engagement workflows.


Overview

theunpartyapp is an app that serves as the primary web presence for unparty.app, providing a comprehensive admin panel, content publishing system, and user engagement features while integrating with the broader unparty.app ecosystem.

It powers the ABOUT → BUILD → CONNECT framework that guides users through understanding UNPARTY's vision, creating content, and connecting with the community.


Tech Stack

  • Language: TypeScript 5.9.3
  • Framework / Runtime: Next.js 16 (App Router) with React 19
  • Key Dependencies: Prisma ORM, Clerk Authentication, Tailwind CSS, MDX
  • Platform: Vercel (with PostgreSQL, Blob Storage, Analytics)

Key Features

  • Content Management: MDX-powered articles with slug-based routing, admin publishing workflow, and media management
  • Admin Panel: Step/task management, user submissions review, question builder, and repository documentation pages
  • User Experience: Custom theme system, marketing pages, waitlist signup, and per-user progress tracking
  • Developer Tools: Investigation workflow CLI, automated asset generation, and full TypeScript coverage

Quick Start

The full, step-by-step path (accounts, keys, database, deploy) is the SETUP. curriculum: seeded as Steps by npm run db:seed:setup (see prisma/setup-steps.ts), with one article per step starting at /article/setup-github. The short version for developers:

Prerequisites

  • git
  • Node.js 24 (pinned in .nvmrc; use nvm or fnm so nvm install / fnm install picks it up)
  • A PostgreSQL database (Neon works) once you want data; the site starts without one

Installation

bash

# Clone your copy
git clone https://github.com/your-username/your-repo.git
cd your-repo

# Node version from .nvmrc, then the exact dependency versions from package-lock.json (~80s)
nvm install
npm ci

# See it run: no .env needed yet (Clerk runs in keyless mode, database-backed sections stay empty)
npm run dev

Connecting a database

bash

# Every key goes in .env: the site, the Prisma CLI, and the seed scripts all
# read it (Prisma never reads .env.local). Git ignores it. Never commit it.
cp .env.example .env

# Create the tables, then seed only the SETUP. curriculum
npm run db:push
npm run db:seed:setup

npm run db:seed deletes every step, category, and all user progress before seeding. Never run it against a database with real data.

Usage

bash

# Development server with Turbopack, at http://localhost:3000
npm run dev

# Full production build (runs the pre-build generators first)
npm run build

Configuration

VariableRequiredDefaultDescription
DATABASE_URLYes-PostgreSQL connection string (pooled, e.g. Neon)
DIRECT_DATABASE_URLYes-Non-pooled PostgreSQL connection that Prisma uses for migrations
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYYes-Clerk authentication publishable key
CLERK_SECRET_KEYYes-Clerk authentication secret key
SLACK_WEBHOOK_URLNo-Slack webhook for admin notifications

None of these are needed for npm run dev; the database and Clerk keys are needed for a production build. Copy .env.example to .env and fill in required values (it documents every optional integration too). Git ignores .env; never commit it. See DATABASE_SETUP.md for detailed database configuration.


Architecture

Code

theunpartyapp
├── src/app/               — Next.js App Router pages and API routes
├── src/app/admin/         — Protected admin panel (articles, books, steps, users)
├── src/app/api/           — REST endpoints for data operations
├── src/app/components/    — Reusable React UI components
├── prisma/                — Database schema and migrations
├── scripts/               — Build automation and investigation tools
└── public/                — Static assets (images, SVGs, fonts)

Which routes need sign-in

[!WARNING] Don't add to isPublicRoute in src/middleware.ts. That list doesn't make anything public: every route already is, unless it's gated. Its check also runs before the sign-in checks. A pattern there that also matches a gated path, like '/a(.*)' or '/api(.*)', lets anyone into /admin or /api/admin without signing in.

Every route is public unless the middleware gates it. Only two kinds are gated:

RoutesWhen signed out
/party/*, /admin/*, /blobupload/* (isProtectedRoute)redirected to sign-in
/api/admin/* (isAdminApiRoute)401

What to do:

  1. Make a new page public: nothing. Add the page and it's public.
  2. Put a page behind sign-in: put it under /party or /admin, or add its path to isProtectedRoute.
  3. Add an admin-only API: put it under /api/admin/ and start the handler with adminGuard() from src/lib/admin.ts. Signing in isn't enough, since anyone can sign up.
  4. Check it: signed out, open the page. A gated page should send you to sign-in, and an admin API should answer 401.

RepositoryRelationship
unparty-app/theunpartyrunwayDevelopment automation and sprint planning
unparty-app/theunpartycrawlerAnalytics intelligence and content processing
unparty-app/theunpartyunpppNative iOS app sharing authentication and design
unparty-app/theunpartyapiBackend API service for hybrid search

License

The code is MIT: use it, change it, sell what you build with it. See LICENSE.md. The stories, photos, videos and the unparty name and logo are not covered; see NOTICE.md.