Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!app
!components
!lib
!content
!messages
!i18n
!global.d.ts
Expand Down
10 changes: 0 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# Site
NEXT_PUBLIC_SITE_URL=http://localhost:3000

# Supabase — copy from `source scripts/export-supabase-env.sh` after `supabase start`
SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_PUBLISHABLE_KEY=<from supabase status: PUBLISHABLE_KEY>
# Seed only (writes) — never use for static build / publish
SUPABASE_SECRET_KEY=<from supabase status: SECRET_KEY>

# Legacy JWT keys (optional fallback until removed by Supabase ~late 2026)
# SUPABASE_ANON_KEY=<from supabase status: ANON_KEY>
# SUPABASE_SERVICE_ROLE_KEY=<from supabase status: SERVICE_ROLE_KEY>

# Analytics (production only)
NEXT_PUBLIC_GA_ID=G-QV2E7L8324
24 changes: 0 additions & 24 deletions .github/actions/docker-build-env/action.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ jobs:
- name: Bootstrap Node
uses: ./.github/actions/node-bootstrap

- name: Prepare Supabase for Docker build
id: docker_build_env
uses: ./.github/actions/docker-build-env

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

Expand All @@ -306,10 +302,5 @@ jobs:
tags: cv:ci
build-args: |
NEXT_PUBLIC_SITE_URL=${{ env.NEXT_PUBLIC_SITE_URL }}
secret-files: |
supabase_url=${{ steps.docker_build_env.outputs.supabase_url_file }}
supabase_publishable_key=${{ steps.docker_build_env.outputs.supabase_publishable_key_file }}
add-hosts: |
host.docker.internal:172.17.0.1
cache-from: type=gha,scope=${{ env.DOCKER_BUILD_CACHE_SCOPE }}
cache-to: type=gha,mode=max,scope=${{ env.DOCKER_BUILD_CACHE_SCOPE }}
35 changes: 2 additions & 33 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ env:
NEXT_PUBLIC_SITE_URL: https://95gabor.me

jobs:
supabase-migrate:
name: Apply Supabase migrations (prod)
runs-on: *runner-image
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Bootstrap Node
uses: ./.github/actions/node-bootstrap

- name: Push migrations to production
run: bash scripts/supabase-push-prod.sh
env:
SUPABASE_DB_URL: ${{ secrets.SUPABASE_DB_URL }}

docker-image:
name: Publish Docker image
needs: supabase-migrate
runs-on: *runner-image
permissions:
contents: read
Expand Down Expand Up @@ -67,14 +51,6 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Write Docker build secret files
id: docker_secrets
shell: bash
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL || vars.SUPABASE_URL }}
SUPABASE_PUBLISHABLE_KEY: ${{ secrets.SUPABASE_PUBLISHABLE_KEY || vars.SUPABASE_PUBLISHABLE_KEY }}
run: bash scripts/write-docker-build-secrets.sh

- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
Expand All @@ -85,9 +61,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXT_PUBLIC_SITE_URL=${{ env.NEXT_PUBLIC_SITE_URL }}
secret-files: |
supabase_url=${{ steps.docker_secrets.outputs.supabase_url_file }}
supabase_publishable_key=${{ steps.docker_secrets.outputs.supabase_publishable_key_file }}
cache-from: type=gha,scope=${{ env.DOCKER_BUILD_CACHE_SCOPE }}
cache-to: type=gha,mode=max,scope=${{ env.DOCKER_BUILD_CACHE_SCOPE }}
platforms: |
Expand All @@ -96,11 +69,7 @@ jobs:

pages:
name: Publish GitHub Pages
needs: supabase-migrate
runs-on: *runner-image
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL || vars.SUPABASE_URL }}
SUPABASE_PUBLISHABLE_KEY: ${{ secrets.SUPABASE_PUBLISHABLE_KEY || vars.SUPABASE_PUBLISHABLE_KEY }}
permissions:
contents: read
pages: write
Expand All @@ -115,8 +84,8 @@ jobs:
- name: Bootstrap Node
uses: ./.github/actions/node-bootstrap

- name: Generate static site (prod Supabase)
run: bash scripts/prepare-static-site-prod.sh
- name: Generate static site
run: pnpm run generate

- name: Setup Pages
uses: actions/configure-pages@v6
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
!public/**
!scripts/
!scripts/**
!supabase/
!supabase/**
!tests/
!tests/**

Expand All @@ -69,8 +67,6 @@ public/llms.txt
.env
.env.*
!.env.example
supabase/.temp/
supabase/.branches/
tsconfig.tsbuildinfo
playwright-report/
test-results/
Expand Down
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# syntax=docker/dockerfile:1
# Multi-stage production image: Next.js static export inside Docker, served by nginx.
# Supabase credentials via BuildKit secrets (not ARG/ENV — avoids layer leakage + scanner warnings).
# CI validation uses local Supabase (host.docker.internal:54321); publish uses cloud URL.
# CV data is read from content/*.yaml at build time.
FROM node:24.21.0-alpine3.24 AS builder

RUN corepack enable && corepack prepare pnpm@12.4.1 --activate
Expand All @@ -16,11 +15,7 @@ COPY . .
ARG NEXT_PUBLIC_SITE_URL=https://95gabor.me
ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL

RUN --mount=type=secret,id=supabase_url \
--mount=type=secret,id=supabase_publishable_key \
export SUPABASE_URL="$(cat /run/secrets/supabase_url)" && \
export SUPABASE_PUBLISHABLE_KEY="$(cat /run/secrets/supabase_publishable_key)" && \
pnpm run generate
RUN pnpm run generate

# --- Production Stage ---
FROM nginx:1.31.6-alpine3.24-slim AS production
Expand Down
37 changes: 16 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# CV — Next.js

Personal CV site built with **Next.js 16**, **React**, **TypeScript**,
**Tailwind CSS v4**, **shadcn/ui**, and **Supabase** (build-time data fetch).
Static export to `out/` for GitHub Pages and Docker/nginx.
**Tailwind CSS v4**, **shadcn/ui**, and committed **YAML** CV data. Static
export to `out/` for GitHub Pages and Docker/nginx.

## Prerequisites

- Node.js ≥ 24.18.0 (see `.nvmrc`)
- [pnpm](https://pnpm.io/) 10.x
- [Docker](https://www.docker.com/) (for local Supabase)
- Node.js ≥ 24.21.0 (see `.nvmrc`)
- [pnpm](https://pnpm.io/) 12.x
- [Docker](https://www.docker.com/) (optional, for the production image)

## First-time setup

Expand All @@ -17,23 +17,20 @@ git clone https://github.com/95gabor/cv.git
cd cv
pnpm install
cp .env.example .env.local
pnpm exec supabase start
pnpm run db:seed
pnpm run dev
# → http://localhost:3000
```

## Common commands

| Command | Purpose |
| -------------------------------------------------------- | ------------------------------------ |
| `pnpm run dev` | Dev server (Turbopack) |
| `pnpm run build` | Static export to `out/` |
| `pnpm run generate` | Alias for `build` (CI compatibility) |
| `pnpm run lint` | ESLint |
| `pnpm run typecheck` | TypeScript |
| `pnpm run test:e2e` | Playwright functional tests |
| `pnpm run db:start` / `db:stop` / `db:reset` / `db:seed` | Local Supabase |
| Command | Purpose |
| -------------------- | ------------------------------------ |
| `pnpm run dev` | Dev server (Turbopack) |
| `pnpm run build` | Static export to `out/` |
| `pnpm run generate` | Alias for `build` (CI compatibility) |
| `pnpm run lint` | ESLint |
| `pnpm run typecheck` | TypeScript |
| `pnpm run test:e2e` | Playwright functional tests |

## Quality gate (before PR)

Expand All @@ -44,14 +41,12 @@ pnpm run typecheck
pnpm run build
```

Requires Supabase env vars (`SUPABASE_URL`, `SUPABASE_PUBLISHABLE_KEY` for
build; `SUPABASE_SECRET_KEY` for seed) — see `.env.example`.
CV data lives in `content/gabor-pichner.yaml` — edit it and rebuild.

## Docker (optional)

```bash
# Requires .env.local with SUPABASE_* and running Docker daemon
bash scripts/prepare-supabase-for-build.sh
# Requires a running Docker daemon
docker compose up --build
# → http://localhost:8000
```
Expand All @@ -66,5 +61,5 @@ Uses the root `Dockerfile` (Next.js build inside Docker + nginx with gzip).

## Stack

Next.js App Router · shadcn/ui · Supabase · static export · Playwright ·
Next.js App Router · shadcn/ui · YAML content · static export · Playwright ·
Lighthouse · semantic-release
4 changes: 2 additions & 2 deletions SKILLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Concise skills and responsibilities for agents working on this repository.

- **Next.js / React maintenance**: App Router, static export, shadcn/ui
components.
- **Supabase data layer**: Migrations, seed script, build-time fetch.
- **YAML content layer**: `content/*.yaml` loaded at build time.
- **TypeScript quality**: Keep type checks passing and fix surfaced issues.
- **Lint/format hygiene**: ESLint and Prettier rules respected.
- **CI design**: pnpm-based workflows — fast, deterministic, actionable.
Expand All @@ -20,5 +20,5 @@ Concise skills and responsibilities for agents working on this repository.
- `pnpm install --frozen-lockfile`
- `pnpm run lint`
- `pnpm run typecheck`
- `pnpm run build` (with Supabase env vars set)
- `pnpm run build`
- Keep workflow steps minimal and avoid redundant build stages.
11 changes: 0 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile
extra_hosts:
- host.docker.internal:host-gateway
args:
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL:-https://95gabor.me}
secrets:
- supabase_url
- supabase_publishable_key
image: ghcr.io/95gabor/cv:latest
ports:
- '8000:80'

secrets:
supabase_url:
environment: SUPABASE_URL
supabase_publishable_key:
environment: SUPABASE_PUBLISHABLE_KEY
20 changes: 10 additions & 10 deletions docs/.ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ needs.
## Stack (v2 branch)

**Next.js 16** · App Router · static export · **shadcn/ui** · **Tailwind v4** ·
**Supabase** (build-time fetch) · **pnpm**
**YAML content** (build-time read) · **pnpm**

## Active projects

| Project | Status |
| --------------------------------------------------------------------------- | ------------------------------------------------ |
| [next-shadcn-supabase-rewrite](../projects/next-shadcn-supabase-rewrite.md) | Phases 1–5 done on `v2`; Phase 6 cutover pending |
| Project | Status |
| --------------------------------------------------------------------------- | --------------------------------------------------- |
| [next-shadcn-supabase-rewrite](../projects/next-shadcn-supabase-rewrite.md) | Superseded: Supabase dropped, content is YAML again |

## Agent roles

| Role | Focus |
| -------------------- | --------------------------------------------- |
| **Dependency Agent** | pnpm updates in controlled batches |
| **Quality Agent** | lint, typecheck, build before PR |
| **CI Agent** | GitHub Actions — pnpm, Supabase in CI, `out/` |
| **Release Agent** | semantic-release, tag workflow, publish |
| Role | Focus |
| -------------------- | --------------------------------------- |
| **Dependency Agent** | pnpm updates in controlled batches |
| **Quality Agent** | lint, typecheck, build before PR |
| **CI Agent** | GitHub Actions — pnpm, `out/` |
| **Release Agent** | semantic-release, tag workflow, publish |

See also root [`SKILLS.md`](../../SKILLS.md).

Expand Down
Loading
Loading