Skip to content

Sheane-mario/Portfolio

Repository files navigation

Portfolio CMS

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/

Runtime requirements

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.

Getting started

  1. Confirm the runtime versions:
node --version
npm --version
  1. Copy .env.example to .env and replace its placeholders. Server configuration is validated with Zod at Next.js startup. Production requires an HTTPS CANONICAL_URL; UPLOADTHING_TOKEN is required when UPLOADS_ENABLED=true. See docs/deployment.md for local, Docker Compose, and managed PostgreSQL connection examples.

  2. Install dependencies:

npm install
  1. Create and apply the initial migration:
npm run db:migrate -- --name init
  1. Seed the development database with the fixture content:
npm run db:seed
  1. Start the development server:
npm run dev

Open http://localhost:3000 in a browser.

Database workflow

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:studio

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

Project structure

  • src/app — App Router routes and layouts
  • src/components — shared application components
  • src/components/ui — reusable UI primitives
  • src/features — feature-oriented modules
  • src/lib — framework-agnostic utilities
  • src/server — server-only application code
  • src/styles — global styles
  • prisma — PostgreSQL schema, migrations, and seed data
  • docs — product and engineering specifications

Checks

npm run lint
npm run typecheck
npm run db:validate
npm run build

About

My Portfolio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages