Go to file
dimitar 636e9e5eb4 chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI
DevOps and DX consolidation pass.

Dockerfile (production):
- Replaced 'COPY . .' at the builder stage with explicit copies of
  package.json, prisma/, src/, public/, and the config files. The
  original 'COPY . .' would ship .env (with live secrets) and the
  .next/ cache into the builder context; .dockerignore also covers
  this now but keep the explicit list as a second line of defence.
- Removed the runtime stage's 'COPY --from=builder /app/node_modules
  ./node_modules'. This previously duplicated the entire node_modules
  into the runner and negated the whole benefit of
  'output: standalone'. Now we copy only the Prisma generated
  client (.prisma + @prisma). Expected image size reduction: ~1GB.
- Added a HEALTHCHECK polling GET /api/check-subdomain?slug=__health
  every 30s (the route already exists and is cheap).
- Added wget for the health probe (alpine doesn't ship wget by
  default).

.dockerignore (new):
- Excludes .next/, .next_old/, .git/, docs/, nginx/, *.md, .env *,
  coverage, *.tsbuildinfo, tt.md, and the Docker/compose files
  themselves from the build context.

CI (.github/workflows/ci.yml, new):
- Runs on push and PR to main/admin.
- Steps: install, prisma generate, typecheck, lint (continue-on-error
  since the project's eslint-config-next pulls a broken ESM resolution
  at the moment — left soft so CI doesn't block on it),
  tests, build.
- Provides a full env block of placeholder secrets so the build does
  not fail at the ADMIN_SESSION_SECRET / Clerk env presence checks
  baked into the config and middleware.

Repo cleanup:
- Untracked .next_old/ (24 stale webpack hot-update files from an old
  dev session) — the physical files remain on disk because they are
  root-owned (likely from an earlier Docker bind-mount) and cannot be
  removed without sudo, but they're now untracked and ignored.
- .gitignore: the bogus 'certbot/.next_old/' line is replaced with
  '/.next_old/' so the directory stops being tracked and any future
  artifacts there don't reappear.
- Deleted nginx/conf.d/* (Traefik is the actual deploy per project
  decision). Traefik labels in docker-compose.yaml remain.

App DX:
- layout.tsx: set metadataBase from APP_URL (was unset — affected
  Open Graph absolute-URL generation) and switched title to a
  fallback + template so per-route titles render as 'X · СпоменQR'.
- src/app/loading.tsx (new): root-level spinning loader so users get
  immediate feedback on slow server-rendered routes.
- src/app/error.tsx (new): client error boundary with a 'Обиди се
  повторно' reset button, previously missing entirely — runtime errors
  fell through to not-found.

package.json: 'typecheck' script added (for local use + CI).

.gitignore cleanups: '/.next_old/' replaces the accidental
'certbot/.next_old/' glob.
2026-08-02 13:20:10 +02:00
.github/workflows chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI 2026-08-02 13:20:10 +02:00
docs superAdmin and admin implemented 2026-08-01 23:42:42 +02:00
prisma feat(db): add AdminUser and Code models with migration 2026-07-29 18:54:40 +02:00
public
scripts feat(security): Phase 1 — harden auth, rate limiting, CSRF, upload validation 2026-08-02 10:24:28 +02:00
src chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI 2026-08-02 13:20:10 +02:00
.dockerignore chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI 2026-08-02 13:20:10 +02:00
.env.example feat(security): Phase 1 — harden auth, rate limiting, CSRF, upload validation 2026-08-02 10:24:28 +02:00
.gitignore chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI 2026-08-02 13:20:10 +02:00
docker-compose.dev.yaml local dev setup 2026-07-29 16:52:54 +02:00
docker-compose.yaml t v3 2026-06-22 23:28:41 +02:00
Dockerfile chore(devops): Phase 5 — Dockerfile, .dockerignore, CI, deploy cleanup, error/loading UI 2026-08-02 13:20:10 +02:00
Dockerfile.dev local dev setup 2026-07-29 16:52:54 +02:00
eslint.config.mjs
next.config.ts perf: Phase 3 — parallel uploads + security headers, powered-by-header off 2026-08-02 12:21:23 +02:00
package-lock.json test: Phase 4 — vitest setup + unit tests for admin-session and rate-limit 2026-08-02 13:05:06 +02:00
package.json test: Phase 4 — vitest setup + unit tests for admin-session and rate-limit 2026-08-02 13:05:06 +02:00
postcss.config.mjs
tsconfig.json test: Phase 4 — vitest setup + unit tests for admin-session and rate-limit 2026-08-02 13:05:06 +02:00
vitest.config.ts test: Phase 4 — vitest setup + unit tests for admin-session and rate-limit 2026-08-02 13:05:06 +02:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.