Documentation Overview
All documentation pages organized by domain. Use the sidebar for persistent navigation or browse by section below.
Core Infrastructure
Core
Base models, validators, fields, caching, and utilities shared across all domains.
| Page | Description |
|---|---|
| Overview | Base models, mixins, revision tracking |
| Models | SanityIntegratedModel, SoftDeleteMixin, base mixins |
| Validators | Input sanitizers and validation classes |
| Fields | EncryptedJSONField and custom field types |
| Utilities | Encryption, performance logging, and analytics helpers |
| Caching | Redis-backed DRF response caching and invalidation |
| Exceptions | Secure error handling and exception classes |
| Admin | Editorial Sanity widgets, sync-health mixins, deletion guard |
| Examples | Usage examples |
Integrations
Bidirectional Sanity CMS sync, webhook processing, and reference resolution.
| Page | Description |
|---|---|
| Overview | Sync architecture and webhook pipeline |
| Models | WebhookEvent, SyncAuditLog, OutboundMutationLog |
| Adapters | Domain sync adapters |
| Serializers | Sync serializers |
| Services | Sync utilities and helpers |
| Validators | Outbound reference-shape validator and schema-to-data parity classifier |
| Signals | Sync signal handlers |
| Tasks | Celery webhook processing pipeline |
| Views | Webhook endpoints |
| Reference Resolver | Resolves Sanity _ref references to Django foreign keys |
| Sync Context | Thread-local loop prevention for bidirectional sync |
| Reference Logic | Domain-specific reference resolution patterns |
| Examples | Integration examples |
Business Domains
Users
User management, authentication flows, and role-based access control.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | User, Employee, Customer, Manager, VIP, Influencer |
| Authentication | Email/password and PIN authentication |
| Permissions | Role-based access control |
| Serializers | User API serializers |
| Services | User service layer |
| Signals | Role sync signals |
| Views | User endpoints |
| Analytics Service | Customer and employee analytics aggregation |
| Backends | Token authentication backend |
| Examples | Usage examples |
Products
Product catalog, variants, inventory, and Elasticsearch search.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Product, ProductVariant, InventoryLevel |
| Serializers | Product API serializers |
| Services | Product service layer |
| Signals | Variant sync signals |
| Views | Product endpoints with caching |
| Search | Elasticsearch integration |
| Smart Filters | Dynamic filter availability and smart aggregations |
| Tasks | Celery tasks for manifests, snapshots, and inventory reconcile |
| Analytics Service | Inventory analytics aggregation and trends |
| Examples | Usage examples |
Stores
Multi-location store management, tax jurisdictions, and operating hours.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Store, TaxJurisdiction, ComplianceCheck |
| Serializers | Store API serializers |
| Services | Store service layer |
| Signals | Store cache invalidation |
| Views | Store endpoints |
| Dashboard Home | Dashboard home KPIs, top products, low stock alerts |
| Examples | Usage examples |
Zones
Zone-based inventory assignment, planograms, and par levels.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Zone, ZoneInventory, ParLevel, Planogram |
| Serializers | Zone API serializers |
| Services | ZoneAssignmentService |
| Signals | Zone cache invalidation |
| Views | Zone endpoints |
| Examples | Usage examples |
Transactions
POS transaction lifecycle, returns, store credit, and cash drawer management.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | SaleTransaction, Return, StoreCredit, CashDrawer |
| Serializers | Transaction API serializers |
| Services | Transaction, return, and cash drawer services |
| Signals | Transaction lifecycle signals |
| Views | Transaction endpoints |
| Pickup | Pickup scheduling, lifecycle, and management |
| Analytics Pre-Aggregation | Daily revenue and inventory summary tables, Celery rollup tasks |
| Examples | Usage examples |
Payments
Payment processing, refunds, and processor webhook handling.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Payment, PaymentMethod, PaymentProcessor, Refund |
| Serializers | Payment API serializers |
| Services | Payment processing service |
| Signals | Payment automation |
| Views | Payment endpoints |
| Webhooks | Payment processor webhook handling |
| Examples | Usage examples |
Promotions
Promotional campaigns, discount codes, and A/B testing.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | PromotionalCampaign, PromoCode, ABTest |
| Serializers | Promotion API serializers |
| Services | Discount calculation and campaign service |
| Signals | Cache invalidation and sync signals |
| Views | Promotion endpoints |
| Examples | Usage examples |
Compliance
Industry-agnostic compliance scaffold: age verification, tax classification, purchase limits, regulated customer onboarding, KYC vendor integration, compliance reports, and Metrc state track integration.
| Page | Description |
|---|---|
| Overview | Architecture, profile model accessors, endpoint summary |
| Models | Abstract bases, cannabis concrete models, ComplianceReport |
| Services | Age verification, tax classification, employee gate, onboarding, report orchestration, purchase limits, recall |
| Signals | Profile sync, return snapshots, Metrc tag sync, destruction events |
| Views | Purchase limits, age verification, onboarding, pending-credential review, KYC webhook, reports |
| Adapters | KYCVendorAdapter base, VerificationResult, PersonaAdapter |
| Webhooks | Persona HMAC-signed webhook with signature verification and state gating |
| Validators | Permit and credential payload validators, dispatcher |
| Utilities | credential_utils and permit_utils lookups |
Procurement
Supplier and purchase-order management: Sanity-synced suppliers and POs, compliance verification slot, receiving-driven inventory updates, and reorder-level monitoring.
| Page | Description |
|---|---|
| Overview | Ownership model, endpoint summary, Sanity integration |
| Models | Supplier, PurchaseOrder (status machine, compliance_verification), PurchaseOrderLineItem |
| Serializers | Sanity ref resolution, compliance-verification handling |
| Views | Supplier and purchase-order endpoints |
| Signals | Outbound sync, status snapshots, receiving-driven inventory updates, PO total-cost maintenance |
| Tasks | Reorder-level checks (daily), alerting |
| Analytics Service | Procurement summary, supplier performance, lead-time performance |
| Examples | Usage examples |
Cash Management
Cashier shift tracking and physical drawer-count reconciliation. No HTTP API surface; models only.
| Page | Description |
|---|---|
| Overview | Domain overview and ownership model |
| Models | CashierShift, DrawerCount |
Advanced Operations
POS Gateway
Real-time POS terminal integration via WebSockets.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | TerminalSession, InventoryReservation |
| Authentication | JWT-based terminal authentication |
| Consumers | WebSocket consumer classes |
| Serializers | POS API serializers |
| Services | Gateway service layer |
| Signals | Terminal event signals |
| Views | POS REST endpoints |
| Broadcast | WebSocketBroadcaster and channel management |
| Infrastructure | App config, URL routing, and deployment |
| Examples | Usage examples |
Tasks
Task management, delivery scheduling, and notifications.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Task, DeliverySchedule |
| Serializers | Task API serializers |
| Services | Task service layer |
| Signals | Notification signals |
| Views | Task endpoints |
| Examples | Usage examples |
Web Auth
Web authentication, session management, and security middleware.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | Auth session models |
| Authentication | Authentication backends |
| Middleware | Security middleware |
| Serializers | Auth serializers |
| Services | Auth services |
| Signals | Session lifecycle signals |
| Views | Auth endpoints |
| Examples | Usage examples |
Web Commerce
Web checkout, cart management, guest sessions, and reservations.
| Page | Description |
|---|---|
| Overview | Domain overview and quick links |
| Models | CheckoutSession, ReservationContext |
| Serializers | Checkout flow serializers |
| Services | Cart, checkout, and reservation services |
| Middleware | Cart validation and session middleware |
| Signals | Checkout lifecycle event handlers |
| Tasks | Periodic cleanup and maintenance tasks |
| Views | Commerce API endpoints |
Analytics
Composed dashboard endpoints that aggregate data from multiple domains into unified page payloads.
| Page | Description |
|---|---|
| Overview | Architecture, response envelope, query parameters |
| Views | All 12 analytics endpoints — Commerce, Operations, People, Growth, System |
| Services | ActiveOperationsService, InfrastructureService |
Sanity Studio
Content editing workflows for the Sanity CMS.
| Page | Description |
|---|---|
| Overview | Content types, sync flow, field transformation reference |
| Products | Product creation and organization |
| Product Variants | Variant creation with attributes and pricing |
| Product Attributes | Attribute type definitions and values |
| Inventory Levels | Per-store stock management |
| Planograms | Visual merchandising blueprints |
| Stores | Store setup with operating hours and configuration |
| Users | User management with five role types |
| Promo Codes | Discount code configuration |
| Campaigns | Campaign coordination and targeting |
| A/B Tests | Split testing configuration and results |