Skip to content

Loopliner Mag — Underground house music news platform. Built with Next.js, Prisma, Neon PostgreSQL, NextAuth.js, Tiptap, shadcn/ui.

Notifications You must be signed in to change notification settings

WingzzOfficial/looplinermag

Repository files navigation

Loopliner Magazine

Deploy with Vercel

Underground house music magazine built with Next.js, Prisma, and PostgreSQL.

🚀 Quick Start

Prerequisites

  • Node.js 20.9+
  • PostgreSQL database (we use Neon)

Local Development

  1. Clone and install:
git clone https://github.com/WingzzOfficial/looplinermag.git
cd looplinermag
npm install
  1. Set up environment variables:
cp .env.example .env

Edit .env with your database credentials.

  1. Initialize database:
npx prisma db push
npx prisma db seed
  1. Run development server:
npm run dev

Open http://localhost:3000

⚠️ Fix "embedCode does not exist" Error

If you see this error on production, the database schema is out of sync.

Option 1: Prisma CLI (recommended)

# Pull Vercel env vars
vercel env pull .env.local

# Push schema to Neon
npx prisma db push

Option 2: Custom migration script

vercel env pull .env.local
node migrate.js

Both methods are safe and won't delete existing data.

🗄️ Seed Database on Vercel

If articles are not showing on production:

  1. Install Vercel CLI:
npm i -g vercel
  1. Login and link project:
vercel login
vercel link
  1. Run seed script:
vercel env pull .env.local
npx prisma db seed

This creates:

  • 1 admin user (admin@loopliner.com / admin123)
  • 3 categories (News, Features, Reviews)
  • 13 articles (1 featured + 12 recent)
  • 3 upcoming events

🔐 Vercel Environment Variables

CRITICAL: Update these in Vercel Dashboard → Settings → Environment Variables:

Database (Neon PostgreSQL)

IMPORTANT: Copy these EXACT URLs from your Neon dashboard "Connection details" section.

DATABASE_URL (pooled connection with -pooler in hostname):

postgresql://neondb_owner:npg_irVcphuA4yH2@ep-cool-resonance-agshlp5d-pooler.c-2.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require

Then add these query parameters:

&pgbouncer=true&connect_timeout=20&connection_limit=10

Full DATABASE_URL:

postgresql://neondb_owner:npg_irVcphuA4yH2@ep-cool-resonance-agshlp5d-pooler.c-2.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require&pgbouncer=true&connect_timeout=20&connection_limit=10

DIRECT_URL (direct connection WITHOUT -pooler):

postgresql://neondb_owner:npg_irVcphuA4yH2@ep-cool-resonance-agshlp5d.c-2.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require

Key differences:

  • DATABASE_URL has -pooler in hostname + &pgbouncer=true
  • DIRECT_URL does NOT have -pooler (direct connection)
  • Both need .c-2 in the region part

NextAuth

NEXTAUTH_URL:

https://www.loopliner.com

NEXTAUTH_SECRET (generate with openssl rand -base64 32):

your-generated-secret-here

Instagram (Optional)

NEXT_PUBLIC_INSTAGRAM_TOKEN:

your-instagram-basic-display-api-token

📁 Project Structure

looplinermag/
├── prisma/
│   ├── schema.prisma        # Database schema
│   └── seed.ts              # Seed script
├── public/                  # Static assets
├── src/
│   ├── app/                 # Next.js App Router
│   │   ├── (public)/        # Public pages
│   │   ├── admin/           # Admin dashboard
│   │   └── api/             # API routes
│   ├── components/
│   │   ├── public/          # Public components
│   │   └── dashboard/       # Admin components
│   └── lib/                 # Utils, auth, db
├── migrate.js               # DB migration script
└── package.json

🛠️ Tech Stack

  • Framework: Next.js 15.5.12 (App Router)
  • Database: PostgreSQL (Neon) + Prisma ORM
  • Auth: NextAuth.js v5
  • Styling: Tailwind CSS
  • Deployment: Vercel
  • Analytics: Vercel Analytics

🔒 Security

  • ✅ CVE-2025-66478 patched (Next.js 15.5.12)
  • ✅ CVE-2025-55182 patched (React 19.0.1)
  • ✅ GDPR compliant (cookie consent banner)
  • ✅ Secure authentication (bcrypt password hashing)
  • ✅ SQL injection protection (Prisma prepared statements)

📝 License

Copyright © 2026 Loopliner. All rights reserved.

Operated by No Fame GmbH, Switzerland.

About

Loopliner Mag — Underground house music news platform. Built with Next.js, Prisma, Neon PostgreSQL, NextAuth.js, Tiptap, shadcn/ui.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published