FAQ - osama1998H/Moca GitHub Wiki

Frequently Asked Questions

Why Go instead of Python (like Frappe)?

Go provides compiled performance, strong typing, easy concurrency (goroutines), and single-binary deployment. These are critical for a multitenant framework serving many sites from a single process cluster.

Why PostgreSQL instead of MySQL/MariaDB?

PostgreSQL offers schema-per-tenant isolation, native JSONB for dynamic fields, Row-Level Security (RLS) policies, and advanced indexing. See Architecture Decisions for the full ADR.

How does Moca compare to Frappe?

Moca is inspired by Frappe's metadata-driven philosophy but redesigned from scratch:

Aspect Frappe Moca
Language Python Go
Database MariaDB PostgreSQL 16+
Frontend Custom JS (Frappe UI) React 19 + TypeScript
Multitenancy Separate databases Schema-per-tenant (single cluster)
Queue Redis Queue (RQ) Redis Streams with DLQ
Events Hooks only Kafka + Redis pub/sub + transactional outbox
Search Whoosh / custom Meilisearch

Can I use Moca without the React frontend?

Yes. Pass --skip-desk when initializing: moca init my-api --skip-desk. The REST API works independently.

How does multitenancy work?

Each tenant (site) gets its own PostgreSQL schema within a shared database cluster. Connection pools enforce schema isolation via search_path. See Multitenancy.

What is a MetaType?

A MetaType is the core primitive -- a JSON/YAML definition that describes a document type (fields, validation, permissions, lifecycle). One MetaType definition auto-generates the database table, REST API, search index, and React form/list views. See MetaType System.

Related