main
Reviewed-on: #3
My Portfolio
Personal portfolio built with Next.js, React, TypeScript, and Tailwind CSS.
What It Includes
- Hero dev-card, live-count stat, and work-experience timeline
- Projects (served from our DB) with a
/projectspage and homepage teaser - Blog system with DB-backed markdown posts, admin editing, and view tracking
- Luna section, DB-driven affiliates, and the SHSF Code Activity graph
- Admin CMS at
/adminfor projects, blog posts, work experience, and affiliates
Data layer
Content (projects, blog posts, work experience, affiliates) lives in Postgres and is managed through Prisma + our own Next.js API routes:
- Public reads:
GET /api/projects,/api/blogs,/api/blogs/top,/api/experience,/api/affiliates - Admin writes:
POST/PUT/DELETE /api/admin/{projects,blogs,experience,affiliates}/…(cookie session issued byPOST /api/admin/login) - Blog content views increment when
/blogs/[slug]orGET /api/blogs/[slug]is requested /api/profile-imageserves the avatar (cached in memory)- Only the Code Activity widget still uses the external SHSF API.
Environment
Copy .env.example to .env and set:
| Var | Purpose |
|---|---|
DATABASE_URL |
Postgres connection string |
ADMIN_PASSWORD |
Password for the /admin login |
SESSION_SECRET |
Long random string used to sign the admin session cookie |
PROFILE_IMAGE_URL |
(optional) override for the avatar source |
Development
Install dependencies and generate the Prisma client:
pnpm install
pnpm prisma generate
Apply the schema to your database:
pnpm prisma migrate dev
Run the development server:
pnpm dev
Open http://localhost:5173 in your browser.
Production Build
Create a production build:
pnpm build
Start the production server locally:
pnpm start
Docker
This project includes a standalone Docker image setup.
Build the image:
docker build -t my-portfolio:latest .
Run with Docker Compose:
docker compose up --build
The app will be available on port 6756 via docker-compose.yml.
Notes
next.config.tsusesoutput: "standalone"so the Docker image can ship a minimal runtime.pnpm buildrunsprisma generatebeforenext build.- The activity graph on the home page is loaded from a remote SVG source.
- The container needs the same env vars (
DATABASE_URL,ADMIN_PASSWORD,SESSION_SECRET) at runtime.
Description
Languages
TypeScript
98%
CSS
0.9%
Dockerfile
0.6%
JavaScript
0.5%