A dynamic digital portfolio and blog platform developed with Next.js and modern web technologies to showcase my projects, experiences, and personal technology ecosystem.
The personal site of Demir Cücü: a bilingual (Turkish and English) portfolio with a blog, projects synchronised from GitHub, an experience timeline, a skill tree and its own admin panel.
Live: www.demircucu.com
| Light | Dark |
|---|---|
![]() |
![]() |
![]() |
![]() |
Public site
/tr and /en, with light and dark themes.Admin panel (/admin)
flowchart LR
visitor([Browser])
github[(GitHub)]
subgraph vercel [Vercel]
app[Next.js 16 App Router<br/>PPR, use cache, proxy.ts]
api[Route handlers<br/>beacon, uploads, webhook]
cron[Vercel Schedules<br/>daily sync and analytics]
end
subgraph supabase [Supabase]
auth[Auth]
storage[Storage]
db[(PostgreSQL)]
end
visitor --> app
visitor --> api
app -- Prisma --> db
api -- Prisma --> db
app --> auth
api --> storage
github -- webhook --> api
cron --> api
api -- GitHub App --> github
Public pages are partially prerendered: a static shell, content from tagged "use cache"
functions, and viewer-specific parts streamed in. Only the application talks to the database
(row level security with no client grants). The full picture, including the data model and each
flow, is in docs/architecture.md.
| Area | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Cache Components), React 19, TypeScript |
| Styling | Tailwind CSS 4, shadcn/ui on Base UI, Geist |
| Internationalisation | next-intl (tr, en) |
| Database | PostgreSQL on Supabase, Prisma 7 with @prisma/adapter-pg |
| Auth and files | Supabase Auth, Supabase Storage, sharp |
| Content | unified (remark, rehype, rehype-sanitize), Shiki, Mermaid, react-pdf |
| Charts | Recharts |
| Hosting | Vercel (functions in icn1, Vercel Schedules) |
| Testing | Vitest, Playwright, axe-core, Lighthouse CI |
| Quality | ESLint, Prettier, commitlint, Husky, CodeQL, Dependabot, gitleaks |
app/
[locale]/ pages and layouts per language (admin, auth, blog, projects, ...)
actions/ server actions
api/ route handlers (analytics beacon, uploads, GitHub webhook, cron jobs)
components/ UI (components/ui: generated shadcn primitives)
lib/ domain logic: data access, analytics, auth, cache, github, media, tags, ...
messages/ interface text (tr.json, en.json)
prisma/ schema, migrations, seed
e2e/ Playwright specs
tests/ integration and Supabase test suites
scripts/ operational scripts (database checks, storage, Lighthouse report)
docs/ architecture, testing, security review, GitHub sync, analytics, ...
Requirements: Node.js 24 (.nvmrc), npm, Docker (for the local Supabase stack and the test
database), and the Supabase CLI (installed as a dev dependency, run with npx supabase).
git clone https://github.com/Decuayer/demircucu.com.git
cd demircucu.com
npm ci
# Local Supabase (Auth, Storage, PostgreSQL on port 54322) and the test database (port 54329)
npx supabase start
npm run db:up
cp .env.example .env.local
# Fill in from `npx supabase status`: API URL, publishable key, secret key, and set
# DATABASE_URL=DIRECT_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
npx prisma migrate deploy # schema
npx tsx prisma/seed.ts # sample content, tags and two profiles
(set -a; . ./.env.local; set +a; npx tsx scripts/ensure-storage-bucket.ts --apply) # media bucket
npm run dev # http://localhost:3000
An admin account: register at http://localhost:3000/tr/auth/register, open the confirmation
e-mail in the local mail catcher (http://127.0.0.1:54324), then make the account an admin in
Supabase Studio (http://127.0.0.1:54323) with
UPDATE "Profile" SET role = 'ADMIN' WHERE email = 'you@example.com';.
The scripts that write to a database refuse anything but a local one unless they are explicitly
pointed at staging (scripts/assert-local-db.ts).
Copy .env.example to .env.local; it documents every value. Summary:
| Variable | Required | Purpose |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
yes | Supabase project URL |
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY |
yes | Publishable key; the database grants it nothing |
SUPABASE_SERVICE_ROLE_KEY |
yes | Server-only secret key for storage uploads and deletes |
DATABASE_URL |
yes | Runtime connection; in production the Supabase transaction pooler (port 6543) |
DIRECT_URL |
yes | Prisma CLI connection (direct or session mode); migrations |
DATABASE_POOL_MAX |
no | Connections per server instance (default 3) |
SHADOW_DATABASE_URL |
development | Shadow database for prisma migrate dev |
TEST_DATABASE_URL |
tests | Integration test database; must be local |
NEXT_PUBLIC_APP_URL |
yes (not Preview) | Base URL for metadata and auth e-mail links; Previews derive theirs from Vercel |
GITHUB_OWNER |
no | Whose public repositories become projects |
GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY |
for the sync | GitHub App credentials (Metadata and Contents read-only) |
GITHUB_APP_INSTALLATION_ID |
no | Looked up from the owner when empty |
GITHUB_WEBHOOK_SECRET |
for the webhook | Verifies X-Hub-Signature-256 |
GITHUB_TOKEN |
no | Fallback without an App: a read-only fine-grained token |
CRON_SECRET |
in production | Bearer secret Vercel Schedules send to /api/cron/* |
| Command | What it does |
|---|---|
npm run dev |
Development server |
npm run build, npm start |
Production build and server |
npm run lint, npm run typecheck |
ESLint (no warnings allowed), TypeScript |
npm run format, npm run format:check |
Prettier |
npm test |
Unit tests |
npm run test:integration |
Integration tests against the local test database |
npm run test:coverage |
Unit and integration tests with the merged coverage report |
npm run test:supabase |
Row level security and the auth trigger on the local Supabase stack |
npm run e2e:prepare && npm run e2e:build && npm run test:e2e |
End-to-end tests on a production build |
npm run lighthouse |
Lighthouse report for five pages (after e2e:build) |
npm run db:up, npm run db:down |
Start or stop the local test database (Docker) |
npm run db:migrate, npm run db:seed, npm run db:reset |
Migrations and seed, local databases only |
The owner's public repositories become projects. A GitHub App webhook syncs a repository as soon as its default branch changes or it is renamed, archived or made public or private; a daily schedule and a "Sync now" button in the admin cover everything else. Only one run happens at a time and each is recorded.
For each repository the sync reads the metadata, and when something changed (checked with
pushed_at and ETags, so an unchanged day costs one API request) renders the README: GitHub's
sanitising rules, images and PDFs mirrored into Storage, Shiki highlighting, Mermaid diagrams.
Topics and languages become tags. Titles, summaries, the live URL and ordering set in the admin are
never overwritten; a repository that disappears unpublishes its project. Renamed repositories keep
their old URLs as redirects. Details and the GitHub App setup:
docs/github-sync.md.
Projects, experience and blog posts share one tag table. Tags form a tree whose roots are the
categories, each with a kind (language, framework, library, database, tool, platform, cloud,
concept, domain, topic), an optional translation, an icon and a skill flag. Aliases map spellings
such as nextjs or next-js to one tag, so GitHub topics and manual tags converge. Tags from
GitHub (topics, languages over 10 %) are maintained by the sync; manual tags belong to the admin.
The skills page shows the tree with how often each skill is used, and every skill has a page
listing where it appears.
Page views are counted by the site itself, with no third-party service and no cookies or local storage. Visitors who send Do Not Track or Global Privacy Control are not counted, nor are bots, prefetches and admins. A visitor is a daily salted hash of IP and user agent; the salt is deleted after its day, so visits on different days cannot be linked. Paths are stored without query strings, and referrers and outbound links as host names only. Raw rows are kept for 90 days, daily aggregates permanently. Details: docs/analytics.md; the policy for visitors is on the site's privacy page.
| Layer | Tool | Scope |
|---|---|---|
| Unit | Vitest (jsdom, node) | Domain logic, route handlers, server actions with mocks, components |
| Integration | Vitest + PostgreSQL | Server actions, cache invalidation, rate limits, tag rules, migrations on a real database |
| Supabase | Vitest + Supabase CLI | Row level security lockdown and the profile trigger |
| End to end | Playwright | Chromium in full; WebKit and phones for smoke tests and the accessibility gate on main |
| Performance | Lighthouse CI | Five key pages, mobile, reported on main and nightly |
Coverage is measured over unit and integration tests together; the build fails below the floors (library code at least 85 % of lines, everything in scope at least 70 %). See docs/testing.md.
main through a pull request. Required checks: lint, format, types and
Prisma schema; unit tests; integration tests with coverage; a production build against a
read-only database; Supabase and end-to-end tests with the accessibility gate; dependency
review; a secret scan; the Vercel Preview. CodeQL blocks new high-severity findings. Squash
merges only (docs/branch-protection.md).main. The database region (Seoul) and the function region (icn1) match.main, a nightly run and pull requests that touch headers, styles, layout or dependencies add
WebKit, phones and the full accessibility matrix, and a failure there opens an issue. Pull
requests that only change documentation skip them (docs/testing.md).Authorisation is checked on the server for every action and route; input is validated with zod; rich text is sanitised when saved and when read; uploads are verified from their bytes; sign-in, registration, comments and the contact form are rate limited; responses carry a Content Security Policy and the usual hardening headers. The review, with each finding and its fix, is in docs/security-review.md.
To report a vulnerability, use GitHub's private reporting ("Report a vulnerability" under the repository's Security tab) rather than an issue; see SECURITY.md.
This is a personal site, but corrections and suggestions are welcome through issues and pull requests; see CONTRIBUTING.md.
The source code is released under the MIT License. The content (blog posts, project and experience descriptions, images, logos, the CV and other personal material, including the screenshots in this repository) is not covered by it: all rights reserved. See NOTICE.