Neighbourly is a hyper-local marketplace that lets providers publish services and seekers book time slots. Stage 1 delivers a single-neighborhood MVP with local JSON persistence, role-aware UI, and core booking validation.
- Users (provider/seeker) with verification flag.
- Service listings with time slots.
- Booking requests with slot locking and cancellation.
- Local JSON storage on the backend.
- REST API + frontend integration.
- Postgres-backed data model with H3 geo indexing.
- Auth + RBAC (member vs moderator) with JWTs.
- Radius-based discovery filters + advanced query filters.
- Request throttling across API routes.
- WebSocket-based realtime messaging with Redis pub/sub.
- Redis caching for high-traffic service discovery.
- Audit logging for critical actions.
- Moderator dashboard endpoints and UI.
- Frontend: React (JSX) + Zustand + Framer Motion + Lenis
- Backend: Node.js + Express
- Storage: Stage 1 local JSON, Stage 2 Postgres
backend/
data/
docs/
src/
controllers/
routes/
services/
utils/
frontend/
src/
api/
components/
store/
styles/
- User: { id, name, role, verified, createdAt }
- Service: { id, providerId, title, category, description, price, slots[], createdAt }
- Slot: { id, start, end, available }
- Booking: { id, serviceId, seekerId, slotId, status, createdAt }
- JSON storage keeps Stage 1 lightweight while mirroring collection-based data access for an easy migration to SQL.
- Controllers + routes separate business rules (e.g., booking validation) from HTTP plumbing.
- Zustand provides a single source of truth for the MVP UI without introducing heavy state frameworks.
services/db.jsabstracts persistence, making it straightforward to swap in a database layer.- Roles and slot availability rules are centralized so adding auth, RBAC, and real-time updates later is isolated.
- API endpoints already align with future filtering + messaging expansion in Stage 2/3.
- Stage 1 does not require authentication; users are selected from a list.
- Slots are defined by providers at creation time; seekers can only book a listed slot.
cd backend
npm install
npm run dev
Server runs at http://localhost:4000.
cd frontend
npm install
npm run dev
App runs at http://localhost:5173.
If needed, add a .env file using frontend/.env.example to point at the API.
Follow STAGE2_SETUP.md to configure Postgres, JWT secrets, and H3 settings.
Follow STAGE3_SETUP.md to configure Redis, WebSockets, and audit logging.
- Create two users: one provider, one seeker.
- Select the provider and publish a service with a slot.
- Select the seeker and book the slot from the marketplace.
- Verify the slot shows as taken and appears in bookings.
- Cancel the booking and verify the slot is available again.
See backend/docs/api.md.