Skip to content

onwp/roastfolio

Repository files navigation

RoastFolio

Submit any website and get a brutally honest AI critique of its design, copy, and conversion strategy.

Features

  • AI-generated roast posts with scores, sections, pros/cons
  • Gallery scrapers (SaaS Landing Page, Landingfolio, Lapa Ninja)
  • Bulk URL import
  • Admin dashboard with queue management
  • Dynamic OG images per roast
  • RSS feed (/api/feed) and sitemap (/api/sitemap)
  • JSON-LD structured data
  • View tracking
  • User auth (better-auth) and separate admin auth
  • Payments via Lemon Squeezy
  • Transactional email via Postmark + React Email
  • Screenshot storage on Cloudflare R2
  • Filterable categories with sorting

Tech Stack

Framework Next.js 16 (App Router)
Database PostgreSQL 18
ORM Drizzle
Auth better-auth
Storage Cloudflare R2
AI Claude CLI
Screenshots Playwright
Email Postmark + React Email
Payments Lemon Squeezy
CSS Tailwind 4
Deploy Docker / Coolify

Setup

docker compose up db -d
npm install
cp .env.example .env   # fill in your values
npm run db:push
npm run dev

App runs at http://localhost:3000.

Environment Variables

Variable Required
DATABASE_URL yes
ADMIN_USERNAME yes
ADMIN_PASSWORD yes
ADMIN_SESSION_SECRET yes (min 32 chars)
BETTER_AUTH_SECRET yes (min 32 chars)
BETTER_AUTH_URL yes
NEXT_PUBLIC_APP_URL yes
NODE_ENV no
R2_ENDPOINT for screenshots
R2_ACCESS_KEY_ID for screenshots
R2_SECRET_ACCESS_KEY for screenshots
R2_BUCKET_NAME for screenshots
R2_PUBLIC_URL for screenshots
POSTMARK_API_KEY for email
POSTMARK_FROM_EMAIL for email
LEMONSQUEEZY_API_KEY for payments
LEMONSQUEEZY_WEBHOOK_SECRET for payments
LEMONSQUEEZY_STORE_ID for payments

Seeding Content

Go to /admin/seed, pick a scraper source, set page count, and hit scrape. URLs get added to the queue.

You can also paste URLs (one per line) at /admin/new.

Processing Pipeline

  1. URL added to queue
  2. Playwright takes screenshots, uploads to R2
  3. Claude CLI analyzes screenshots, generates the roast
  4. Zod validates the output
  5. Post saved to DB and published

Manage everything from /admin/queue.

Deploying (Hetzner + Coolify)

  1. Spin up a Hetzner server (CPX21+, Ubuntu 22.04)
  2. Install Coolify: curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
  3. Create a project in Coolify, add Docker Compose resource, connect your repo
  4. Set env vars in Coolify dashboard (see table above + POSTGRES_PASSWORD)
  5. Deploy
  6. Point your domain A record to the server IP. Coolify handles SSL via Let's Encrypt.

Project Layout

src/
  actions/        server actions (generate, posts, queue, seed)
  app/
    admin/        dashboard pages (analytics, health, queue, posts, seed)
    api/          auth, feed, sitemap, webhooks
    category/     category pages
    roast/        individual roast pages
    login/        login
    register/     register
    pricing/      pricing
  components/
    admin/        admin UI
    roast/        roast display
    shared/       header, footer, etc.
  db/
    schema.ts     drizzle schema
    queries/      query helpers
  lib/
    auth.ts       admin auth
    better-auth.ts
    env.ts        zod env validation
    lemonsqueezy.ts
    postmark.ts
    r2.ts         R2 uploads/deletes
    score-utils.ts
    scrapers/     gallery scrapers
emails/           react email templates
tests/            vitest tests

API Routes

Route Method
/api/auth/[...all] ALL
/api/auth/admin-login POST
/api/auth/register POST
/api/feed GET
/api/sitemap GET
/api/webhooks/lemonsqueezy POST

License

Source available, non-commercial. See LICENSE for details. For commercial use, reach out.

About

AI-powered website design critiques. Submit any URL, get a brutally honest roast with scores and actionable feedback.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages