Skip to content

donth77/website-pls

Repository files navigation

WebsitePls

An AI-powered website generator: describe what you want in plain language, and the system produces a complete, styled HTML page with real stock photos. Preview it instantly, iterate with refinement prompts, and download the result.

What it does

  • Prompt → website: enter a description, get a full responsive HTML page with Tailwind CSS, real stock images, and photo credits.
  • Iterate: after generation, describe changes ("make the hero larger", "change colors to blue") and the AI modifies your existing page.
  • Preview: live iframe preview with fullscreen and open-in-new-tab options.
  • Export: one-click HTML download of any generated site.
  • Accounts: sign in to save, revisit, and manage your projects.

Tech stack

Layer Choice
App framework Next.js 16 (App Router), React 19
Language TypeScript
Styling Tailwind CSS v4
Package manager pnpm 10.x (Corepack-pinned)
Database PostgreSQL via Prisma 7 + @prisma/adapter-pg
Job queue BullMQ + Redis
AI Anthropic SDK (Claude)
Images Unsplash, Pexels, Pixabay (cascade)
Storage Cloudflare R2 (S3-compatible)
Auth Auth.js v5 (credentials + OAuth)

Prerequisites

Setup

# 1. Enable Corepack (once per machine)
corepack enable

# 2. Install dependencies (runs prisma generate via postinstall)
pnpm install

# 3. Configure environment
cp .env.example .env
# Edit .env — set DATABASE_URL, REDIS_URL, ANTHROPIC_API_KEY,
# R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET_NAME,
# AUTH_SECRET

# 4. Push schema to database
pnpm db:push

# 5. Start dev server + worker (single command)
pnpm dev

Open http://localhost:3000. Health check: http://localhost:3000/api/health?deep=true.

Scripts

Command Purpose
pnpm dev Dev server + BullMQ worker (both processes)
pnpm build Production build
pnpm start Start production server
pnpm lint ESLint
pnpm worker:generate Run BullMQ worker standalone (if not using pnpm dev)
pnpm db:generate Regenerate Prisma client
pnpm db:push Push schema to DB (no migration files)
pnpm db:migrate Create/apply migrations (prisma migrate dev)
pnpm db:studio Open Prisma Studio

Troubleshooting

pnpm / Corepack

Unknown options: 'allow-build' — Your global pnpm is too old. This repo pins pnpm 10.x:

corepack enable
corepack use pnpm@10.15.1
pnpm install

Redis / BullMQ worker

  • Stuck at "Starting..." — The BullMQ worker may not be running. pnpm dev starts both the server and worker; check that Redis is reachable.
  • ECONNRESET with Upstash — See .env.example for TLS and timeout configuration. Try REDIS_FAMILY=4 for IPv6 issues. For local dev, plain redis://localhost:6379 is simplest.

Generation takes 1-3 minutes

Normal for full-page generation with Claude Sonnet. The progress bar updates as the model streams. For faster (simpler) results, set ANTHROPIC_MODEL=claude-haiku-4-5-20251001 in .env.

About

An AI-powered website generator with BYOK: describe what you want, and the system produces a complete, styled HTML page with real stock photos. Preview it instantly, iterate with refinement prompts, and publish or export the result.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors