| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Turn neighborhood noise into coordinated action.
AI-assisted community coordination for mutual aid, safety, and resources — map-first reporting, trust-weighted matching, live local news, municipal-ready analytics, and a background integrity layer governments can trust.
**Built at YHack 2026 **
Neighborhoods run on goodwill and spreadsheets, not a shared operating picture.
“We get twenty messages a day. I don’t know which block to prioritize first — or who already stepped up.” — Community organizer (illustrative)
Commune gives neighborhoods a single coordination stack:
Report on a map → Urgency + trust scoring → Smart matches → Health + integrity signals for residents and gov
One demo neighborhood. One stack. Map + metrics + optional Hex analytics runtime.
See PLATFORM_DATA_CONTEXT.md §9b–9c and backend/.env.example for env names.
┌─────────────────────┐ ┌─────────────────────┐
│ Frontend (Vite) │ HTTP │ Backend (Express) │
│ React 18 + TS │ ◄─────► │ TypeScript │
│ Port 5173 │ /api │ Port 3001 │
│ MapLibre · Motion │ │ better-sqlite3 │
└─────────────────────┘ └──────────┬──────────┘
│ │
│ SSE /api/news/stream │ Schedulers: news poll, health snapshots
│ │
▼ ▼
Optional VITE_API_URL SQLite (issues, matches, events,
→ remote Railway API resources, anchors, news, metrics)
Integrations (optional, env-driven): K2 Think V2 · OpenAI · GNews · Hex API · Solana devnet.
| Technology | Purpose |
|---|---|
| React 18 | UI |
| TypeScript | Type safety |
| Vite 6 | Dev server & build |
| Tailwind CSS v4 | Styling (@tailwindcss/vite) |
| Motion | Animations |
| MapLibre GL | Interactive map |
| React Router 7 | Routing |
| Lucide React | Icons |
| Recharts | Charts (dashboard / health) |
| Radix UI + shadcn-style primitives | ui/src/app/components/ui/* |
| Sonner | Toasts |
| Technology | Purpose |
|---|---|
| Node.js 18+ | Runtime |
| Express | HTTP API |
| TypeScript | Type safety |
| better-sqlite3 | Embedded SQL |
| h3-js | Hexagonal spatial aggregation |
| dotenv | Configuration |
| cors | Cross-origin |
| tsx | Dev watch / seed scripts |
| OpenAI SDK | K2-compatible client + OpenAI models |
| @solana/web3.js | Devnet anchoring |
| Technology | Purpose |
|---|---|
| K2 Think V2 | Chat agent, consequence text, news impact, anchor explanations (MBZUAI-IFM/K2-Think-v2) |
| OpenAI | Fallback models (e.g. gpt-4o-mini) if K2 key absent |
| GNews | Live article polling + geocoding |
| Hex | Published project runs + optional notebook CRUD |
| Solana devnet | Background integrity memos |
Variable names only — see backend/.env.example and docs/TEAM_CREDENTIALS_DISCORD.md. Never commit real keys.
git clone https://github.com/candpixie/yhack.git
cd yhack
# Backend
cd backend
npm install
cp .env.example .env
# Edit .env locally — do not commit secrets
npm run seed
npm run dev
# API: http://localhost:3001
# Frontend (new terminal)
cd ../ui
npm install
npm run dev
# UI: http://localhost:5173 (proxies /api → :3001)Run UI only with a shared deployed API:
cd ui
echo 'VITE_API_URL=https://YOUR-RAILWAY-OR-API-ORIGIN' > .env.local
npm run devDetails: docs/HACKATHON_TEAM_SETUP.md.
cd yhack
npm run build # installs ui + backend deps, builds both
npm run start # seed + node backend dist (serves ui/dist when built)Environment variables (optional, in backend/.env):
yhack/ ├── backend/ │ ├── src/ │ │ ├── index.ts # Express app, static ui/dist, route mount │ │ ├── db.ts # SQLite schema │ │ ├── seed.ts # Demo data │ │ ├── routes/ │ │ │ ├── issues.ts │ │ │ ├── matches.ts │ │ │ ├── community.ts │ │ │ ├── resources.ts │ │ │ ├── health.ts │ │ │ ├── anchor.ts │ │ │ ├── chat.ts │ │ │ ├── news.ts │ │ │ ├── dashboard.ts │ │ │ └── hex.ts │ │ └── services/ # matching, trust, urgency, agent, solana, newsFetcher, etc. │ ├── .env.example │ └── package.json ├── ui/ │ ├── src/ │ │ ├── app/ │ │ │ ├── App.tsx │ │ │ ├── routes.tsx │ │ │ ├── components/ # MapView, NewsPage, DashboardPage, ChatPanel, … │ │ │ ├── context/ # MapFocusContext │ │ │ └── lib/ # api.ts, mapStyle.ts │ │ └── styles/ │ ├── vite.config.ts │ └── package.json ├── docs/ │ ├── HACKATHON_TEAM_SETUP.md │ └── TEAM_CREDENTIALS_DISCORD.md ├── PLATFORM_DATA_CONTEXT.md # Data model & metrics reference ├── package.json # Root build/start orchestration ├── railway.toml ├── vercel.json └── README.md
Base URL: {origin}/api (local: http://localhost:3001/api).
| Area | Example endpoints | Notes |
|---|---|---|
| Issues | GET/POST /issues, GET /issues/:id, PATCH .../status, POST .../verify, .../escalate, .../volunteer | Reports & lifecycle |
| Matches | GET /matches, GET /matches/:id, GET /matches/for-issue/:issueId, PATCH /matches/:id/status | Triggers Hex briefing on confirm/complete |
| Community | GET /community/alerts, GET /community/summary-metrics | Alerts & summaries |
| Resources | GET/POST /resources, PATCH .../claim, POST .../exchange, GET .../exchanges, POST .../chat | Offers, requests, barter |
| Health | GET /health, GET /health/snapshots | Metrics & snapshots |
| Anchor | GET /anchor, GET /anchor/:id, GET /anchor/explain | Integrity + K2 explanation |
| Chat | POST /chat | { messages } → reply, tool_results, optional map_focus |
| News | GET /news/recent, GET /news/stream (SSE) | GNews + seed articles |
| Dashboard | GET /dashboard/hex, /stats, /timeline | Gov analytics |
| Hex | POST /hex/investigation, POST /hex/trigger-report, GET /hex/briefing | Notebooks + briefing runs |
| Events | GET /events | Platform audit trail |
| System | GET /ping | Health check |
Illustrative numbers from the bundled seed + metrics (see PLATFORM_DATA_CONTEXT.md §10):
| Metric | Demo value | Context |
|---|---|---|
| Issues (demo set) | 6+ reports | Food, safety, infrastructure, volunteer offers |
| People affected (rolled up) | 200+ in narrative | Pantry, school crossing, etc. |
| Critical open | 2 | Food pantry, unsafe crossing |
| Match success rate | 82% | Shown on Gov dashboard |
| Avg response time | 18h | Health metric storyline |
| Anchored records | 3 | Issues + match (devnet / sim) |
| Live news articles | 8 seed + API | Brooklyn-relevant when GNews enabled |
From ui/src/styles/theme.css (light shell):
| Token | Role |
|---|---|
| --commune-bg-primary | #FAFAF8 — page background |
| --commune-bg-secondary | #F2F0EB — panels |
| --commune-text-primary | #1A1917 — primary text |
| --commune-text-secondary | #6B6860 — secondary |
| --commune-blue | #2563EB — links / accents |
| --commune-red | #DC2626 — critical urgency |
| --commune-amber | #D97706 — urgent |
| --commune-green | #16A34A — low / positive |
| --commune-map-base | #E8E0CC — map chrome |
Urgency labels drive pin colors and dashboard semantics (critical → urgent → moderate → low).
| Doc | Purpose |
|---|---|
| PLATFORM_DATA_CONTEXT.md | Tables, metrics, scoring, gov pitch numbers |
| docs/HACKATHON_TEAM_SETUP.md | Teammates + VITE_API_URL |
| docs/TEAM_CREDENTIALS_DISCORD.md | Env variable reference (no secrets) |
react · typescript · vite · tailwindcss · motion · maplibre-gl · react-router · recharts · lucide-react · sonner · express · better-sqlite3 · h3-js · openai · @solana/web3.js
Built at YHack 2026 — Commune team (add names / roles as you like).
No LICENSE file is present in this repository root yet. Add one (e.g. MIT, Apache-2.0, or hackathon-specific terms) before public distribution.
Every unresolved need is a coordination failure. Commune turns neighborhood signal into shared action.
Questions or issues? Open a GitHub issue on candpixie/yhack. Also on yhackynot.study
| Back | FazBrowse Home | New Git URL |