How jack26-bit/notice_board works
Digital Notice Board is a React/FastAPI application for student registration and notice browsing, plus JWT-protected administrator notice management. Students authenticate, then the routed feed fetches searchable, category-filtered notices and renders cards; admins log in and create, edit, or delete notices. The backend validates requests, applies role checks and notice filtering, and persists users and notices through SQLAlchemy. The README documents polling, urgent/pinned notices, NEW badges, dark mode, and TV mode; some frontend presentation details are documented but not sampled. Relationships are limited to shown imports/calls and documented API behavior.
Main entry points: App.jsx App routing · api.js API client · main.py FastAPI endpoints · AuthForm.jsx Student auth form
Components 18
Web application
- App routing
frontend/src/App.jsx - Navigation bar
frontend/src/components/Navbar.jsx - API client
frontend/src/api.js
Identity and access
- Student auth form
frontend/src/components/AuthForm.jsx - Admin login
frontend/src/components/Login.jsx - Auth context
frontend/src/AuthContext.jsx - JWT and credentials
backend/auth.py
Notice experience
- Notice feed
frontend/src/components/NoticeFeed.jsx - Notice card
frontend/src/components/NoticeCard.jsx - Notice manager
frontend/src/components/AdminPanel.jsx - Notice editor
frontend/src/components/NoticeForm.jsx
API service
- FastAPI endpoints
backend/main.py - Request schemas
backend/schemas.py
Persistence
- User and notice models
backend/models.py - DB session setup
backend/database.py - SQL database
Other components
- Student / viewer
- Administrator
Connections 23
- Student / viewer → App routing: opens
README.md - Administrator → App routing: uses
README.md - App routing → Notice feed: routes to
frontend/src/App.jsx - App routing → Notice manager: routes to
frontend/src/App.jsx - App routing → Admin login: shows
frontend/src/App.jsx - App routing → Student auth form: routes to
frontend/src/App.jsx - App routing → Navigation bar: renders
frontend/src/App.jsx - Student auth form → Auth context: logs in
frontend/src/components/AuthForm.jsx - Student auth form → API client: calls auth
frontend/src/components/AuthForm.jsx - Auth context → API client: loads profile
frontend/src/AuthContext.jsx - Navigation bar → Auth context: reads auth
frontend/src/components/Navbar.jsx - Admin login → API client: requests token
frontend/src/components/Login.jsx - Notice feed → API client: fetches notices
frontend/src/components/NoticeFeed.jsx - Notice feed → Notice card: renders
frontend/src/components/NoticeFeed.jsx - Notice manager → API client: manages notices
frontend/src/components/AdminPanel.jsx - Notice manager → Notice editor: renders
frontend/src/components/AdminPanel.jsx - API client → FastAPI endpoints: HTTP requests
README.md - FastAPI endpoints → Request schemas: validates with
backend/main.py - FastAPI endpoints → JWT and credentials: checks tokens
backend/main.py - FastAPI endpoints → User and notice models: queries
backend/main.py - FastAPI endpoints → DB session setup: opens sessions
backend/main.py - User and notice models → DB session setup: uses base
backend/models.py - DB session setup → SQL database: connects
backend/database.py