A personal portfolio and content management system built with Next.js App Router, TypeScript, Tailwind CSS, Prisma ORM, and PostgreSQL.
Deployed live at: https://mario-portfolio-gilt.vercel.app/
Use Node.js 24.17.0. npm 11.13.0 is the pinned package-manager version;
the engine constraint accepts compatible npm 11 versions from 11.4.2
onward. Local development, CI, and container builds should prefer the pinned
versions.
- Confirm the runtime versions:
node --version
npm --version-
Copy
.env.exampleto.envand replace its placeholders. Server configuration is validated with Zod at Next.js startup. Production requires an HTTPSCANONICAL_URL;UPLOADTHING_TOKENis required whenUPLOADS_ENABLED=true. Seedocs/deployment.mdfor local, Docker Compose, and managed PostgreSQL connection examples. -
Install dependencies:
npm install- Create and apply the initial migration:
npm run db:migrate -- --name init- Seed the development database with the fixture content:
npm run db:seed- Start the development server:
npm run devOpen http://localhost:3000 in a browser.
The Prisma schema lives at prisma/schema.prisma. Prisma reads the PostgreSQL
connection from DATABASE_URL through prisma.config.ts.
# Validate the Prisma schema
npm run db:validate
# Regenerate the typed client after schema changes
npm run db:generate
# Create and apply a development migration
npm run db:migrate -- --name describe_your_change
# Apply committed migrations in production or CI/CD
npm run db:migrate:deploy
# Load development fixtures explicitly
npm run db:seed
# Inspect development data
npm run db:studioThe generated Prisma Client is written to src/generated/prisma and is not
committed. npm install regenerates it through the postinstall script.
Application code should import the shared singleton from src/lib/db.ts
instead of constructing additional Prisma clients.
Run npm run db:migrate:deploy as an explicit production or CI/CD release
step before starting the newly deployed application. It applies committed
migrations without creating or modifying migration files. Migrations are not
run automatically by npm start.
npm run db:seed is development-only. The script fails before connecting to
the database when NODE_ENV=production because its upserts can overwrite
existing portfolio content. Production and CI/CD deployments should run
npm run db:migrate:deploy but must not run the development seed.
The development seed intentionally does not create a User, OAuth account,
session, or real owner credentials. Replace placeholder public content before
deployment.
src/app— App Router routes and layoutssrc/components— shared application componentssrc/components/ui— reusable UI primitivessrc/features— feature-oriented modulessrc/lib— framework-agnostic utilitiessrc/server— server-only application codesrc/styles— global stylesprisma— PostgreSQL schema, migrations, and seed datadocs— product and engineering specifications
npm run lint
npm run typecheck
npm run db:validate
npm run build