A PostgREST-style, FastAPI-powered, multi-tenant headless CMS designed specifically for ecommerce applications. Each client (store) operates with its own isolated database, while APIs provide intuitive CRUD access to products, categories, customers, and orders.
- PostgREST-inspired: Familiar query syntax for developers and LLMs
- Ecommerce-focused: Universal schema optimized for online stores
- Multi-database flexibility: SQLite for development, PostgreSQL for production
- Multi-platform ready: APIs consumable by frontends, mobile apps, and AI systems
- Core entities: Products, Categories, Customers, Orders, Order Items, Product Images
- Extensibility: JSONB metadata fields for custom attributes
- Relationships: Proper foreign key constraints and hierarchical support
- Tenant identification:
{userId + projectId}combination - URL structure:
https://domain.com/{tenant}/{table} - Database isolation: Dynamic DB connection binding per request
- Auto-provisioning: Automatic tenant database creation on first access
- Query operators:
eq,lt,lte,gt,gte,like,ilike,in,is.null - Modifiers:
select,order,limit,offset - Simplicity: No stored procedures or complex RPCs
- Consistency: Uniform API across all entities
- Complete product lifecycle management
- Hierarchical category organization
- Customer relationship management
- Order processing and tracking
- Media/image management system
- Natural language to SQL translation via PostgREST syntax
- Stable, predictable schema structure
- Extensible through structured metadata
- Backend: FastAPI (Python 3.9+)
- Database: SQLAlchemy ORM with Alembic migrations
- Development DB: SQLite
- Production DB: PostgreSQL
- Authentication: JWT tokens
- Deployment: Docker + Docker Compose
# List products under $100, sorted by price
GET /u123p456/products?price=lt.100&order=price.asc&limit=10
# Search products by name
GET /u123p456/products?name=ilike.*ring*&select=id,name,price
# Get products in specific categories
GET /u123p456/products?category_id=in.(1,2,3)# Create a new product
POST /u123p456/products
{
"name": "Diamond Ring",
"price": 2500.00,
"category_id": 1,
"metadata": {"color": "gold", "size": "7", "clarity": "VS1"}
}
# Update customer information
PATCH /u123p456/customers?id=eq.42
{
"email": "newemail@example.com",
"updated_at": "2025-01-15T10:30:00Z"
}
# Bulk delete old orders
DELETE /u123p456/orders?created_at=lt.2024-01-01- Python 3.9+
- Docker & Docker Compose
- PostgreSQL (for production testing)
git clone <repository>
cd doxiiCMS
pip install -r requirements.txt
alembic upgrade head
uvicorn main:app --reload
