Skip to content

Repository files navigation

ВІНПАСС МЕДІА — News Website

A news website built with Payload CMS, Next.js, and Tailwind CSS. Design based on the winpass-media reference.

Setup

  1. Install dependencies:

    npm install
  2. Create .env from .env.example. You need a Postgres URL (e.g. Neon free tier). Local file SQLite is not used in this setup.

  3. 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_URL you will use in production.

  4. Create a user and add content via the admin panel:

  5. (Optional) Seed sample content (with dev server running):

    npm run seed

    Or POST to /api/seed with header x-seed-secret: <SEED_SECRET> in production.

Deploy on Vercel

  1. Push the repo to GitHub and import the project in Vercel.

  2. In Vercel: Storage → create or connect Neon Postgres. Vercel sets POSTGRES_URL on the project.

  3. Add Blob storage for media uploads. Vercel sets BLOB_READ_WRITE_TOKEN.

  4. 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/seed in production
  5. Before or right after the first deploy, point your local .env at the same POSTGRES_URL as production and run npm run dev once so the schema is created on that database (empty Neon DB). Then deploy or redeploy.

  6. After deploy: open /admin, sign in, upload media (stored in Blob).

Scripts

  • npm run dev — Development server
  • npm run build — Production build
  • npm run start — Production server
  • npm run seed — Seed sample articles and categories

Structure

  • /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

Environment

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).

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages