A news website built with Payload CMS, Next.js, and Tailwind CSS. Design based on the winpass-media reference.
-
Install dependencies:
npm install
-
Create
.envfrom.env.example. You need a Postgres URL (e.g. Neon free tier). Local file SQLite is not used in this setup. -
Create database tables (first time only): run the dev server so Payload can push the schema (development mode only):
npm run dev
Wait until the app is ready, then stop the server. Use the same
POSTGRES_URLyou will use in production. -
Create a user and add content via the admin panel:
npm run dev- Open http://localhost:3000/admin
- Create your first user (email + password)
- Add Categories and Articles
-
(Optional) Seed sample content (with dev server running):
npm run seed
Or POST to
/api/seedwith headerx-seed-secret: <SEED_SECRET>in production.
-
Push the repo to GitHub and import the project in Vercel.
-
In Vercel: Storage → create or connect Neon Postgres. Vercel sets
POSTGRES_URLon the project. -
Add Blob storage for media uploads. Vercel sets
BLOB_READ_WRITE_TOKEN. -
In Settings → Environment Variables, set:
PAYLOAD_SECRET— long random string (required)POSTGRES_URL— usually injected by the Neon integration (same name Vercel uses)BLOB_READ_WRITE_TOKEN— from Blob (often automatic when Blob is linked)SEED_SECRET— optional; protects/api/seedin production
-
Before or right after the first deploy, point your local
.envat the samePOSTGRES_URLas production and runnpm run devonce so the schema is created on that database (empty Neon DB). Then deploy or redeploy. -
After deploy: open
/admin, sign in, upload media (stored in Blob).
npm run dev— Development servernpm run build— Production buildnpm run start— Production servernpm run seed— Seed sample articles and categories
/admin— Payload CMS admin panel/— Homepage with hero, news grid, categories, about/articles/[slug]— Article pages/categories/[slug]— Category archive pages/masthead— Legal/company info/age-policy— 21+ policy/app— Winpass app info
See .env.example. DATABASE_URL is also accepted as a fallback for Postgres if your host sets that instead of POSTGRES_URL.
Without BLOB_READ_WRITE_TOKEN, uploads use local disk (fine for local dev only).