lad-website/RESUME.md

7.2 KiB
Raw Permalink Blame History

LAD Website — Session Resume Guide

Last updated: 2026-05-25 Repo: https://gitea.sigd.net/chaulmark/lad-website Local clone: /home/chaulmark/websites/lad-website Last commit: 82e17d3 (Fix PDF download links — route through Next.js /api/uploads proxy) Dev URL: https://lad.sigd.net → Caddy on 10.8.0.10 → 10.8.0.165:3000


Stack

Layer Technology Notes
Frontend Next.js 16, React 19.2, Tailwind CSS v4 /frontend/
Backend Express 5, TypeScript, MongoDB, Redis /backend/
CMS (source) Directus at https://db.lad1908.org Being replaced — data migrated
Infra Docker Compose + Nginx /docker-compose.yml
Git host Gitea at gitea.sigd.net user: chaulmark

Brand Reference

Item Value
Organization Louisiana Association of the Deaf (LAD)
Founded 1908
Brand color #13AE3A (green)
LAD logo https://db.lad1908.org/assets/5cdfa81d-ffc8-4cae-a178-5db3bfbaaeb8
Deaf Focus logo https://db.lad1908.org/assets/c15110fe-d25a-4863-8e9c-055bfad3c710
General contact info@lad1908.org
Deaf Focus interpreting request@deaffocus.org / (225) 319-5586 / Fax (225) 308-4025
Hours MonFri 9am4pm
Scraped content LAD_CONTENT.md in repo root

What Has Been Done

Rebrand (complete)

  • All "Olathe Club of the Deaf" / "OCD" references replaced with LAD throughout
  • Brand color switched from blue to LAD green (#13AE3A) in globals.css
  • Navigation, Footer, layout metadata all updated

Package Upgrades (complete)

  • Frontend: Next.js 15→16, React 18→19.2, axios added
  • Backend: Express 4→5, Mongoose 8→9, bcrypt 5→6, helmet 7→8, Zod 3→4

Pages (all complete)

Page File Status
Home app/page.tsx Announcement banner, real events, LAD copy
About app/about/page.tsx 201921 board, 10 affiliated orgs, history
Updates app/updates/page.tsx Wired to GET /api/updates?status=published
Events app/events/page.tsx Wired to GET /api/events?status=published
Minutes app/minutes/page.tsx Wired to GET /api/documents, PDF proxy links
Deaf Focus app/deaf-focus/page.tsx Wired to GET /api/articles?status=published
Contact app/contact/page.tsx Real LAD contact info
Membership app/membership/page.tsx LAD copy, fees TBD (contact-us prompt)
Donate app/donate/page.tsx LAD nonprofit info

Backend Models (all complete)

Model File Notes
Event models/Event.ts + directusId, photoUrl, photoCaption
Document models/Document.ts + directusId, directusAssetId, 3 new minute types
Member models/Member.ts Duplicate index warning fixed
Video models/Video.ts Unchanged
Update models/Update.ts News/update posts
Article models/Article.ts Deaf Focus articles

All models have full CRUD routes at /api/{collection}.

Data Migration (complete — local only)

Migration script: backend/scripts/migrate-directus.ts Run with: npx tsx scripts/migrate-directus.ts from /backend/

Local migration results:

  • 233 updates
  • 148 events
  • 201 public minutes PDFs downloaded to uploads/documents/
  • 6 Deaf Focus articles
  • 230 members-only PDFs — skipped, need manual upload via admin panel

Frontend API Wiring (complete)

  • All 4 dynamic pages fetch from Express backend via async Server Components
  • 1-hour revalidation cache ({ next: { revalidate: 3600 } })
  • Graceful empty-state fallback if backend is unreachable
  • PDF downloads use Next.js proxy route /api/uploads/[...path] — reads from ../backend/uploads/ on filesystem, works through Caddy without exposing backend port
  • frontend/.env.local (gitignored): BACKEND_URL=http://localhost:4000
  • frontend/.env.example: documents env vars for production

Infrastructure (complete)

  • mongo-init/01-init.js — creates lad_db user from env vars
  • docker-compose.yml — fully rebranded
  • backend/.env.example — template for all production env vars
  • backend/src/index.ts — serves /uploads as static files

What Still Needs To Be Done

1. Production Deploy on 10.4.0.205

  • Create backend/.env on server from .env.example with real credentials
  • Add Caddy entry on 10.4.0.205 for lad1908.org
  • docker compose up -d
  • Run migration: docker exec lad-backend npx tsx scripts/migrate-directus.ts
  • Set NEXT_PUBLIC_BACKEND_URL in frontend/.env to public-facing backend URL

2. Admin Panel

  • Verify JWT login at /admin/login
  • Auth middleware: backend/src/middleware/auth.ts
  • Test CRUD for all 6 collections
  • Upload the 230 members-only PDFs via /admin/documents

File Structure Reference

lad-website/
├── frontend/
│   └── src/app/
│       ├── page.tsx              ✅ Homepage
│       ├── about/page.tsx        ✅ Board + orgs
│       ├── updates/page.tsx      ✅ API wired
│       ├── events/page.tsx       ✅ API wired
│       ├── minutes/page.tsx      ✅ API wired + PDF proxy
│       ├── deaf-focus/page.tsx   ✅ API wired
│       ├── contact/page.tsx      ✅ LAD contact info
│       ├── membership/page.tsx   ✅ LAD copy
│       ├── donate/page.tsx       ✅ LAD nonprofit
│       ├── api/uploads/[...path] ✅ PDF proxy (reads ../backend/uploads/)
│       └── admin/                (full CRUD panel — needs auth verification)
├── backend/
│   ├── src/
│   │   ├── models/               (Event, Document, Member, Video, Update, Article)
│   │   ├── controllers/          (full CRUD for all 6)
│   │   ├── routes/               (REST API)
│   │   └── middleware/auth.ts    (JWT)
│   ├── scripts/
│   │   └── migrate-directus.ts  ✅ Directus→MongoDB migration
│   ├── uploads/                  (populated by migration — gitignored contents)
│   ├── .env.example              ✅ Production env template
│   └── .gitignore                ✅
├── mongo-init/01-init.js         ✅ Creates lad_db user
├── docker-compose.yml            ✅ lad_db, lad-mongo-data
├── LAD_CONTENT.md                (all scraped content)
└── RESUME.md                     (this file)

Environment / Shell Notes

  • EDQUOT issue: Shell has had recurring disk quota problems from Chrome cache. If bash commands fail silently (exit code 1, no output), check ~/.npm/_cacache, ~/.cache/tracker3, ~/.config/chrome-cdp-profile
  • Dev server: cd ~/websites/lad-website/frontend && npm run dev -- --hostname 0.0.0.0
  • Backend dev: cd ~/websites/lad-website/backend && npm run dev
  • MongoDB (local dev): sudo mongod --dbpath /var/lib/mongodb --logpath /var/log/mongodb/mongod.log --fork
  • Gitea token: embedded in remote URL

How to Resume

  1. cd ~/websites/lad-website
  2. git log --oneline -3 — confirm at 82e17d3 or later
  3. Verify MongoDB is running: curl -s http://localhost:4000/health (start backend if needed)
  4. Next task: production deploy on 10.4.0.205, then admin panel verification