How syntaxraw/civic-forge-miniproject works
CivicForge lets residents report and corroborate civic issues, while staff track progress and hand issues off to departments. The main flow runs from report submission through duplicate detection, trust/spam checks, priority scoring and in-memory storage; browsing, maps, leaderboard and staff actions are distinct product branches. The README documents live updates and optional translation. Sampled source supports the issue-route integrations; unsampled routes are represented at their exact paths, with uncertain internal links omitted.
Main entry points: issues.js Issue routes · App.jsx Page routing · api.js HTTP client · IssueDetail.jsx Issue detail
Components 27
Web experience
- Page routing
client/src/App.jsx - Sign in and register
client/src/pages/AuthPages.jsx - Browser auth state
client/src/auth.jsx - Issue feed
client/src/pages/Home.jsx - Issue reporting
client/src/pages/Report.jsx - Issue detail
client/src/pages/IssueDetail.jsx - Priority view
client/src/pages/Priority.jsx - Issue map
client/src/pages/MapPage.jsx - Leaderboard
client/src/pages/Leaderboard.jsx - Issue card
client/src/components/IssueCard.jsx - Map renderer
client/src/components/MapView.jsx - Status display
client/src/components/StatusBadge.jsx
API and access
- HTTP client
client/src/api.js - Live event listener
client/src/useRealtime.js - Express entry
server/src/index.js - Auth routes
server/src/routes/auth.js - Session middleware
server/src/middleware/auth.js
Issue lifecycle
- Issue routes
server/src/routes/issues.js - In-memory state
server/src/store.js - Duplicate matching
server/src/services/dedupe.js - Priority scoring
server/src/services/priority.js - Trust and spam
server/src/services/trust.js - Photo upload
server/src/middleware/upload.js - WebSocket broadcasts
server/src/services/realtime.js - Optional translation
server/src/services/translate.js
Community features
- Stats and misc routes
server/src/routes/misc.js
Other components
- Resident or staff
Connections 46
- Resident or staff → Page routing: uses
client/src/App.jsx - Page routing → Issue feed: routes to
client/src/App.jsx - Page routing → Issue reporting: routes to
client/src/App.jsx - Page routing → Issue detail: routes to
client/src/App.jsx - Page routing → Priority view: routes to
client/src/App.jsx - Page routing → Issue map: routes to
client/src/App.jsx - Page routing → Leaderboard: routes to
client/src/App.jsx - Page routing → Sign in and register: routes to
client/src/App.jsx - Sign in and register → Browser auth state: uses
client/src/pages/AuthPages.jsx - Browser auth state → HTTP client: calls
client/src/auth.jsx - Issue feed → HTTP client: loads issues
client/src/pages/Home.jsx - Issue feed → Issue card: renders
client/src/pages/Home.jsx - Issue feed → Live event listener: subscribes
client/src/pages/Home.jsx - Issue reporting → HTTP client: submits report
client/src/pages/Report.jsx - Issue reporting → Map renderer: selects location
client/src/pages/Report.jsx - Issue detail → HTTP client: loads and acts
client/src/pages/IssueDetail.jsx - Issue detail → Live event listener: subscribes
client/src/pages/IssueDetail.jsx - Issue detail → Map renderer: renders location
client/src/pages/IssueDetail.jsx - Issue detail → Status display: renders progress
client/src/pages/IssueDetail.jsx - Priority view → HTTP client: loads ranking
client/src/pages/Priority.jsx - Priority view → Issue card: renders
client/src/pages/Priority.jsx - Issue map → HTTP client: loads map issues
client/src/pages/MapPage.jsx - Issue map → Map renderer: renders
client/src/pages/MapPage.jsx - Issue map → Live event listener: subscribes
client/src/pages/MapPage.jsx - Leaderboard → HTTP client: loads standings
client/src/pages/Leaderboard.jsx - Issue card → HTTP client: sends upvote
client/src/components/IssueCard.jsx - Issue card → Status display: renders status
client/src/components/IssueCard.jsx - HTTP client → Express entry: calls API
README.md - Express entry → Auth routes: mounts routes
server/src/index.js - Express entry → Issue routes: mounts routes
server/src/index.js - Express entry → Stats and misc routes: mounts routes
server/src/index.js - Express entry → WebSocket broadcasts: starts service
server/src/index.js - Auth routes → In-memory state: reads and writes
server/src/routes/auth.js - Auth routes → Session middleware: sets sessions
server/src/routes/auth.js - Session middleware → In-memory state: loads users
server/src/middleware/auth.js - Issue routes → In-memory state: reads and writes
server/src/routes/issues.js - Issue routes → Session middleware: checks access
server/src/routes/issues.js - Issue routes → Photo upload: accepts photos
server/src/routes/issues.js - Issue routes → Duplicate matching: checks duplicates
server/src/routes/issues.js - Issue routes → Priority scoring: scores issues
server/src/routes/issues.js - Issue routes → Trust and spam: checks trust
server/src/routes/issues.js - Issue routes → WebSocket broadcasts: broadcasts updates
server/src/routes/issues.js - Issue routes → Optional translation: translates detail
server/src/routes/issues.js - Stats and misc routes → In-memory state: reads state
server/src/routes/misc.js - Stats and misc routes → Optional translation: uses translation
server/src/routes/misc.js - Live event listener → WebSocket broadcasts: receives updates
client/src/useRealtime.js