An open-source, self-hostable food ordering and delivery platform designed for local co-ops.
Lightweight, easy to deploy, community-owned. Eliminates platform middlemen, enabling fair deals between vendors, delivery persons, and customers.
| Layer | Technology | Rationale |
|---|---|---|
| Frontend | Next.js 14 (App Router) | SSR, API routes, easy Vercel deploy |
| Database | Supabase (PostgreSQL) | Auth, real-time, row-level security |
| Auth | Supabase Auth | Email/password, magic links, OAuth |
| Real-time | Supabase Realtime | Order status updates, delivery queue |
| Hosting | Vercel + Supabase | Zero-ops serverless |
| Mobile | PWA | No app store, works on all devices |
- Customer - Browse vendors, place orders, track deliveries
- Vendor - Manage menu, receive orders, coordinate delivery
- Delivery Person - Register availability, accept deliveries, update status
- Co-op Admin - System management and oversight
project-firefly/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (public)/ # Public pages (landing, vendors)
│ │ ├── (customer)/ # Customer pages
│ │ ├── (vendor)/ # Vendor dashboard
│ │ ├── (delivery)/ # Delivery dashboard
│ │ ├── (admin)/ # Admin panel
│ │ ├── api/ # API routes
│ │ └── auth/ # Auth pages
│ ├── components/ # React components
│ │ ├── ui/ # Base UI components
│ │ ├── customer/ # Customer-specific
│ │ ├── vendor/ # Vendor-specific
│ │ └── delivery/ # Delivery-specific
│ ├── lib/
│ │ ├── supabase/ # Supabase client + helpers
│ │ ├── hooks/ # Custom React hooks
│ │ └── utils/ # Utility functions
│ └── types/ # TypeScript types
├── supabase/
│ ├── migrations/ # Database migrations
│ └── seed.sql # Sample data
├── public/ # Static assets
├── docs/ # Documentation
│ ├── SYSTEM_SPEC.md # Full system specification
│ ├── DATA_MODEL.md # Database schema
│ └── API.md # API documentation
└── package.json
- Node.js 18+
- npm or yarn
- Supabase account (free tier works)
- Vercel account (optional, for deployment)
-
Clone the repository
git clone https://github.com/your-org/project-firefly.git cd project-firefly -
Install dependencies
npm install
-
Set up Supabase
- Create a new Supabase project at supabase.com
- Copy your project URL and anon key
-
Configure environment variables
cp .env.example .env.local
Fill in your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your-project-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key -
Run database migrations
npx supabase db push
-
Start the development server
npm run dev
- Create Supabase project
- Run database migrations
- Deploy to Vercel (connect GitHub repo)
- Set environment variables in Vercel dashboard
- Done - your co-op is live
- System Specification - Full system specification and user flows
- Data Model - Database schema and relationships
- API Reference - API routes and endpoints
- Customer Flow: Browse vendors, view menus, place orders, track delivery status
- Vendor Flow: Manage shop, create menus, handle orders, manage delivery pool
- Delivery Flow: Register availability, accept assignments, update delivery status
- Order status changes visible instantly
- New order notifications for vendors
- Delivery assignment offers in real-time
- Live delivery queue status
We welcome contributions! Please read our contributing guidelines before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Built for local food co-ops everywhere. Power to the people, not the platforms.