A single-author blog built with Vue 3, Vike SSR, Express, Prisma, PostgreSQL, and S3-compatible object storage.
- Node.js 24
- npm 11
- PostgreSQL 16+
- MinIO or another S3-compatible service
-
Install dependencies:
npm ci
-
Create
.envfrom.env.exampleand setDATABASE_URLand the MinIO variables. -
Apply migrations and create the admin account:
npm run prisma:deploy npm run admin:create
For non-interactive environments, set
ADMIN_EMAILandADMIN_PASSWORD. Running the command again updates the same admin password and revokes existing sessions. -
Start the development server:
npm run dev
The public site is served at http://localhost:3000; the admin login is at /auth/login.
npm test
npx prisma validate
npm run build
npm audit --omit=devThe repository still has legacy full-lint findings in older Vue and Cypress files. Changed server files should be linted before merging.
Copy .env.production.example to an environment file kept outside version control, set strong PostgreSQL and MinIO credentials, and configure the public VITE_DOMAIN_ADDRESS.
docker compose --env-file .env.production -f dc-production.yml up -d --build
docker compose --env-file .env.production -f dc-production.yml exec blog npm run admin:createThe application applies committed migrations on startup. Authentication uses revocable, hashed database sessions in an HttpOnly, SameSite=Lax, production-secure cookie.
Create a development migration after changing the schema:
npm run prisma:devApply committed migrations:
npm run prisma:deployThe current initial migration is intentionally destructive relative to the legacy schema. Existing data is not supported by the modernization plan.