Create the data model and API routes for a real-time needs/offers board. Community members post what they need (shelter, water, medical, transport, labor) or what they can offer. Data model: - Post: { id, type: 'need'|'offer', category, description, location: {lat, lng, address}, contact, status: 'active'|'matched'|'resolved', urgency: 'critical'|'high'|'medium'|'low', createdAt, expiresAt } - Match: { id, needId, offerId, status: 'proposed'|'confirmed'|'completed', createdAt } API routes: 1. POST /api/posts.create a need or offer (no auth required.disaster context) 2. GET /api/posts?type=need&category=shelter&lat=X&lng=Y&radiusKm=Z.filter and search 3. PATCH /api/posts/:id.update status 4. POST /api/matches.propose a match between a need and offer Validate all inputs with zod. Include geospatial filtering (Haversine distance). No authentication required.speed over security in crisis contexts.
No contributions yet.