Overview
Discover what makes Open Food Network powerful
Open Food Network (OFN) is a fully self‑hosted, open‑source e‑commerce platform tailored for local food producers, co‑ops, and food hubs. From a developer standpoint it is a Ruby on Rails monolith that exposes a rich set of RESTful APIs, background job queues, and a plugin architecture for extending store functionality. The application is built to scale horizontally via standard Rails deployment patterns, and it supports containerization (Docker) out of the box, making it compatible with Kubernetes or any Docker‑based hosting stack.
Language & Framework
Database
Background Jobs
Search & Full‑Text
Overview
Open Food Network (OFN) is a fully self‑hosted, open‑source e‑commerce platform tailored for local food producers, co‑ops, and food hubs. From a developer standpoint it is a Ruby on Rails monolith that exposes a rich set of RESTful APIs, background job queues, and a plugin architecture for extending store functionality. The application is built to scale horizontally via standard Rails deployment patterns, and it supports containerization (Docker) out of the box, making it compatible with Kubernetes or any Docker‑based hosting stack.
Technical Stack & Architecture
- Language & Framework: Ruby 3.x + Rails 7, following the conventional Rails MVC pattern with modular engines for marketplace and store features.
- Database: PostgreSQL is the primary data store; schema migrations are managed through ActiveRecord.
- Background Jobs: Sidekiq (Redis backed) handles asynchronous tasks such as order processing, email delivery, and inventory sync.
- Search & Full‑Text: Elasticsearch is optionally integrated for advanced product search and faceted filtering.
- Web Server & Asset Pipeline: Puma serves the application; Webpacker (or Rails 7’s import‑maps) bundles JavaScript and CSS.
- Testing: RSpec + Capybara for unit and integration tests, with BrowserStack integration for cross‑browser coverage.
The codebase is split into several Rails engines (spree, storefront, marketplace) that can be enabled or disabled via configuration, providing a clean separation of concerns while still sharing common models and services.
Core Capabilities & APIs
- Marketplace API: Exposes CRUD endpoints for products, orders, customers, and inventory. Developers can consume or extend these endpoints to build custom front‑ends or third‑party integrations.
- Webhooks: Configurable event hooks (order creation, payment status change, shipment update) that notify external services in real time.
- Payment Integration: Built‑in adapters for Stripe, PayPal, and Braintree; additional payment gateways can be added by implementing the
PaymentGatewayinterface. - Shipping & Fulfilment: Supports multiple shipping zones, rates, and carrier integrations (e.g., Shippo).
- Analytics & Reporting: Exportable CSV/JSON reports and a built‑in dashboard for sales, inventory, and customer metrics.
The platform’s modularity allows developers to expose only the APIs they need while keeping sensitive business logic encapsulated within the engines.
Deployment & Infrastructure
OFN ships with Ansible playbooks (ofn-install) that automate provisioning of a LAMP/LEMP stack, PostgreSQL, Redis, Elasticsearch, and optional services. Docker images are available for each engine, enabling deployment on:
- Bare‑metal or VMs: Standard Rails deployment with Puma and Nginx.
- Docker Compose: A single
docker-compose.ymlcan spin up the full stack locally or in CI. - Kubernetes: Helm charts are available, and the application is stateless aside from database persistence, making it suitable for horizontal scaling.
High availability can be achieved by clustering Sidekiq workers and using PostgreSQL replication. The application’s stateless nature means that multiple instances can run behind a load balancer without session affinity.
Integration & Extensibility
- Plugin System: Developers can create custom Rails engines that hook into OFN’s lifecycle events. The
ofn-pluginsrepository provides a starter template. - Custom Themes: Storefronts can be themed via CSS/HTML overrides; the engine exposes view paths that can be overridden in a separate Rails app.
- API Extensions: New endpoints can be added by extending existing controllers or creating new ones; authentication is handled via Devise and JWT tokens.
- Webhooks & Callbacks: External services can subscribe to order events, inventory changes, or payment status updates.
The open‑source nature means that any modification can be contributed back to the community, fostering a collaborative ecosystem.
Developer Experience
- Documentation: The project hosts comprehensive guides (
GETTING_STARTED,CONTRIBUTING,SUPPORT) and a dedicated User Guide. API documentation is auto‑generated with Swagger/OpenAPI. - Community: Active Slack channels (
#dev,#testing) and a public GitHub issue tracker facilitate rapid onboarding. - Testing Infrastructure: Automated tests run on GitHub Actions; developers can contribute to the test suite using RSpec/Capybara.
- Licensing: AGPL‑3.0 ensures that any derivative works remain open source, which is attractive for organizations prioritizing transparency.
Use Cases
- Local Food Hubs: Deploy a self‑hosted marketplace to list seasonal produce, manage subscriptions, and handle deliveries.
- Co‑ops & Farmers Markets: Provide a unified online storefront that aggregates multiple vendors under one domain.
- Community‑Supported Agriculture (CSA) Platforms: Use the subscription and order management APIs to automate weekly box deliveries.
- Non‑Profit Food Distribution: Leverage the flexible pricing and discount engines to run food bank programs or subsidized schemes.
Advantages for Developers
- Full Control: Self‑hosting removes vendor lock‑in; data and custom logic remain on your infrastructure.
- Extensible Architecture:
Open SourceReady to get started?
Join the community and start self-hosting Open Food Network today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps

Fossil
All-in-one distributed SCM with built‑in web tools
django-wiki
Collaborative wiki built on Django, supporting Markdown editing
Apache OpenMeetings
All-in-one web video conferencing and collaboration platform
clink
Ultra‑minimal URL shortener in C
Stalwart Mail Server
Secure, scalable mail and collaboration platform
Lidarr
Automated music collection manager for torrent and Usenet users
