Digital notice board platform with:
- Backend: FastAPI + SQLAlchemy + SQLite
- Frontend: Next.js 14 (App Router) + TypeScript + Tailwind
- Optional AI: Gemini notice drafting
- Renders a live display board from a published layout version
- Lets you build layouts in an admin builder UI
- Supports tile-based content (
notice,clock,ticker,banner,image,emergency, etc.) - Exposes REST APIs for notices, layouts/tiles, and AI draft generation
Run from repo root so DB path stays at ./data/noticeboard.db.
pip install -r backend/requirements.txt
$env:PYTHONPATH="backend"
python -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8001Backend health check:
curl http://127.0.0.1:8001/healthcd frontend
npm install
$env:API_URL="http://127.0.0.1:8001"
npm run dev- Display: http://localhost:3000/ (also
/display) - Admin: http://localhost:3000/admin
- Builder: http://localhost:3000/admin/builder
- Open
/admin/builder - Add tiles from the left palette
- Drag tiles in the grid canvas
- Edit tile properties in the right inspector (type, position, size, z-index, notice link)
- Click Publish
- Open
/to view the published board
- Add tile
- Move tile by drag and drop
- Edit tile fields in inspector
- Assign notices to notice tiles
- Delete tile
- Publish layout version
Base URL: http://127.0.0.1:8001/api
GET /display/bundle- returns rendered tile bundle used by the frontend display
GET /noticesPOST /noticesGET /notices/{notice_id}PATCH /notices/{notice_id}DELETE /notices/{notice_id}
GET /layoutsPOST /layoutsGET /layouts/{layout_id}POST /layouts/{layout_id}/versions/{version_id}/tilesPATCH /layouts/{layout_id}/versions/{version_id}/tiles/{tile_id}DELETE /layouts/{layout_id}/versions/{version_id}/tiles/{tile_id}POST /layouts/{layout_id}/versions/{version_id}/publish
POST /ai/draft-notice
API_URL- backend base URL used by server-side fetches (default:http://127.0.0.1:8001)
Notes:
- Browser
/api/*requests are proxied by Next.js rewrites - Server-side display fetches use
API_URLdirectly
Copy backend/.env.example to backend/.env and set:
GEMINI_API_KEY(required only for AI draft endpoint)
backend/
app/
routers/ # notices, layouts, display, ai
models/ # SQLAlchemy models
schemas/ # Pydantic schemas
services/ # display bundle + ai service
frontend/
app/ # Next.js app routes
components/ # display + builder UI components
lib/ # shared frontend types + grid math
You likely started backend from the wrong cwd and created a different SQLite file. Start backend from repo root with:
$env:PYTHONPATH="backend"
python -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8001- Confirm backend is running on
:8001 - Confirm frontend has
API_URL=http://127.0.0.1:8001 - Check
http://127.0.0.1:8001/api/display/bundledirectly
That means media URLs resolve to missing/unavailable backend media endpoints or files.