ogrechkoandClaude Sonnet 5 ea6c43f5af Fix production build: npm registry flakiness, stray package-lock.json dir, TS error
- registry.npmjs.org was intermittently ETIMEDOUT mid-download from this
  host; switched to registry.npmmirror.com (also raised npm's own retry
  budget as a second line of defense).
- frontend/package-lock.json on disk was actually an empty directory
  (untracked, root-owned — a stray artifact, likely from an old bad
  bind-mount), which broke `COPY . .` once npm install got past it.
- documents/page.tsx had a real type error (selectedItem.file narrowing
  didn't survive into the .map() closure) that `next dev` never
  surfaced but `next build`'s stricter check does — fixed by hoisting
  the narrowed array into selectedFiles once instead of re-narrowing
  selectedItem.file at each use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh2UXUQUVBWroWEnn1FLFG
2026-09-03 05:18:49 +00:00

KKPAB Site

Modernized rebuild of kkpab26.ru using:

  • Django + Django REST Framework for content management API
  • Next.js for the public website
  • PostgreSQL for production data
  • Nginx for reverse proxy and static/media delivery

Structure

  • backend/ Django API and admin
  • frontend/ Next.js public website
  • deploy/ deployment templates

Local setup

Backend

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py loaddata content/fixtures/initial_data.json
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:7788

Frontend

cd frontend
npm install
cp .env.local.example .env.local
npm run dev

Frontend expects API at http://localhost:7788/api.

Production notes

  • build frontend with npm run build
  • run Django with gunicorn
  • route /api, /admin, /media, /static to Django
  • route / to Next.js
S
Description
No description provided
Readme
125 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rich Text Format 67.6%
TypeScript 17.6%
Python 8.2%
CSS 6.2%
Dockerfile 0.4%