MCPSERV.CLUB
CSA Admin

CSA Admin

Self-Hosted

Effortless CSA & ACP management platform

Active(93)
61stars
0views
Updated 6 hours ago

Overview

Discover what makes CSA Admin powerful

ACP Admin is a self‑hosted, open‑source web application built to streamline the day‑to‑day operations of Community Supported Agriculture (CSA), ACP, and Solawi organisations. From a developer’s perspective it is essentially a **Ruby on Rails** SaaS platform that runs in a multi‑tenant architecture, with each organisation (or “tenant”) isolated behind its own subdomain. The core of the system is a tightly coupled set of domain‑driven models (members, baskets, deliveries, invoices) that expose a RESTful API for programmatic access and can be extended via webhooks or custom plugins.

Framework

Database

Background Jobs

Email

Overview

ACP Admin is a self‑hosted, open‑source web application built to streamline the day‑to‑day operations of Community Supported Agriculture (CSA), ACP, and Solawi organisations. From a developer’s perspective it is essentially a Ruby on Rails SaaS platform that runs in a multi‑tenant architecture, with each organisation (or “tenant”) isolated behind its own subdomain. The core of the system is a tightly coupled set of domain‑driven models (members, baskets, deliveries, invoices) that expose a RESTful API for programmatic access and can be extended via webhooks or custom plugins.

Technical Stack

  • Framework: Ruby on Rails 7.x (latest stable release) with a conventional MVC structure.
  • Database: SQLite3 is the default for development and small deployments, but the schema is fully compatible with PostgreSQL; migrations are written to be agnostic of the underlying DB.
  • Background Jobs: Rails’ ActiveJob interface backed by SolidQueue (a lightweight, SQLite‑based queue).
  • Email: Transactional and bulk newsletters are routed through Postmark, with templating support for dynamic content.
  • Internationalisation: i18n gem powers full multi‑language support (English, French, German, Italian) with locale files bundled in the repo.
  • Testing & Security: Continuous integration runs unit, integration, and security scans via GitHub Actions.

Architecture & Core Capabilities

ACP Admin follows a tenant‑per‑subdomain pattern. A Tenant model holds configuration (admin/members hostnames, branding, locale) and a shared database schema. All business logic is encapsulated in service objects (Member::Create, Basket::Calculate) that enforce transactional integrity and domain rules. The public API is split into:

  • Member API – CRUD operations, membership status transitions, basket assignments.
  • Delivery API – schedule generation (bi‑weekly, seasonal), exception handling for absences.
  • Billing API – invoice generation with QR‑code references, EBICS import for bank statements.
  • Event API – activity registration and form handling.

Each endpoint returns JSON with HATEOAS links, enabling developers to build custom dashboards or mobile apps. Webhooks can be registered per tenant to receive real‑time notifications for events such as new member sign‑ups or overdue invoices.

Deployment & Infrastructure

The application is deliberately lightweight, making it ideal for containerised deployment. A single Dockerfile (based on Ruby slim images) exposes the standard Rails ports, and a companion docker-compose.yml can spin up PostgreSQL, Redis (optional for SolidQueue), and a Postmark test client. For production, the recommended stack is:

  1. Web server – Puma behind Nginx (or Caddy) with SSL termination via Let’s Encrypt.
  2. Background workerssolidqueue processes launched with systemd or Docker Swarm/Kubernetes Jobs.
  3. Database – PostgreSQL 15+ for concurrency and full‑text search; migrations can be run with rails db:migrate.
  4. Storage – Static assets served via CDN; uploads stored in S3 or local filesystem (configurable).

Scalability is handled by the stateless nature of Rails requests; horizontal scaling simply requires additional worker pods or container instances behind a load balancer. SolidQueue’s SQLite backend is suitable for low‑volume queues; for high throughput, swapping to Redis or Sidekiq is straightforward.

Integration & Extensibility

ACP Admin exposes a RESTful API and a GraphQL endpoint (via graphql-ruby) for advanced use cases. Developers can:

  • Create custom plugins by adding Rails engines that hook into the tenant lifecycle (after_create_tenant).
  • Extend models with concerns or STI subclasses to add organisation‑specific fields.
  • Use webhooks for external payment gateways or ERP systems; the payloads are JSON‑serialisable and include authentication via HMAC signatures.
  • Consume the public API to build single‑page applications or mobile clients using React/Vue/Flutter.

The codebase is heavily documented with YARD and inline comments, and the community maintains a public issue tracker for feature requests. The MIT licence ensures that any customisations remain free to use and distribute.

Use Cases

  • Small CSA farms that need an affordable, self‑hosted solution to manage 5–20 members and a few dozen baskets.
  • Regional cooperatives that require multi‑tenant support to host several local farms under a single infrastructure.
  • Agri‑tech startups building a SaaS offering for the CSA niche; ACP Admin can serve as the core engine with custom UI layers.
  • Non‑profit organisations wanting full control over member data and compliance with local data protection laws.

Advantages

  • Performance & Flexibility: Rails’ convention‑over‑configuration speeds development, while the modular architecture allows selective feature toggling.
  • Open Source & Licensing: MIT licence removes vendor lock‑in, enabling full auditability and redistribution.
  • Low Operational Overhead: SQLite support for quick prototypes, PostgreSQL for production, and a single‑container Docker image simplify DevOps.
  • Rich Feature Set: From automated invoicing with QR codes to EBICS bank statement imports, the application covers most CSA operational needs out of the box.
  • Developer Experience: Clean API design, comprehensive test suite, and a welcoming community make onboarding new contributors straightforward

Open SourceReady to get started?

Join the community and start self-hosting CSA Admin today