Skip to content

japperJ/JP-MyBlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

123 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Coding Blog

A Next.js 15 + Prisma + PostgreSQL blog application.

AI Coding Blog homepage screenshot

Why this blog stands out

  • Secure admin workflow — database-backed sessions, MFA support, and host-scoped auth cookies.
  • Rich publishing experience — Markdown posts, code blocks, categories, tags, cover images, related posts, and post navigation.
  • Automatic image handling — dynamic OG images, responsive post images, and graceful cover-image fallbacks.
  • Built-in stats — post view counts plus an admin visitor dashboard for traffic insight.
  • SEO-ready by default — sitemap, robots.txt, JSON-LD, canonical URLs, RSS feed, and ISR for fresh content.
  • Fast discovery — command-palette search across posts so readers can find content quickly.

Quick start

git clone https://github.com/japperJ/JP-MyBlog.git
cd JP-MyBlog
npm install
cp .env.example .env.local   # then fill in your values
npm run db:push && npm run db:seed
npm run dev

Open http://localhost:3000. Admin login: http://localhost:3000/admin/login (admin@aicodingblog.com / admin123 — change immediately).

Environment variables

Variable Local Vercel Purpose
DATABASE_URL Required Required PostgreSQL connection string
NEXT_PUBLIC_APP_URL http://localhost:3000 Optional (falls back to VERCEL_URL) Canonical origin for metadata, sitemap, feed, OG
MFA_TOKEN_SECRET Recommended Required Stable HMAC secret for MFA challenge tokens

Key commands

Command What it does
npm run dev Start the dev server
npm run typecheck Prisma generate + tsc --noEmit
npm run readiness:preflight typecheck, db:validate, db:generate, build
npm run db:push Apply schema to database
npm run db:seed Seed default admin + sample content
npm run test:smoke:local Smoke tests against local server
npm run test:smoke:hosted Smoke tests against a real preview URL

Vercel deployment

See Deployment Procedure for the full guide. The short version:

  1. Import the repo in vercel.com/new.
  2. Set DATABASE_URL and MFA_TOKEN_SECRET in Vercel environment variables.
  3. Deploy. The build runs prisma generate && next build and requires a reachable database.

Known limitations

  • No checked-in Prisma migrations; setup uses prisma db push.
  • Vercel-hosted uploads are disabled until object storage is added.
  • In-memory rate limiting is acceptable for preview/dev only.
  • Preview and production share one database during initial rollout.

Documentation

For users

For engineers

For admins

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages