S
Sheba ISP ERPDOCS
Backend Modules

Backend Overview & Engineering Standards

Overview of the 13 backend apps, shared design patterns, serializers, viewsets, and models.

Backend Overview & Engineering Standards

IMPLEMENTED

The backend is built with Django 6.1 and Django REST Framework (DRF) 3.18. All applications reside under backend/apps/.


1. Application Inventory (13 Apps, 52 Models)

ApplicationPathModel CountKey Models
apps.corebackend/apps/core10Tenant, TenantDomain, AuditLog, SaaSPackage, DatabaseBackup
apps.authenticationbackend/apps/authentication6StaffProfile, Role, Permission, StaffMembership, Reseller
apps.customersbackend/apps/customers1Customer
apps.billingbackend/apps/billing5Package, Invoice, Recharge, Offer, ResellerPricing
apps.financebackend/apps/finance6BillingAccount, InvoiceLine, LedgerEntry, Adjustment, IdempotencyKey
apps.paymentsbackend/apps/payments5PaymentGateway, PaymentTransaction, InboundPaymentEvent, SmsLog
apps.networkbackend/apps/network5POPBranch, Router, OLT, ONU, UserSession
apps.supportbackend/apps/support2Ticket, TicketReply
apps.hrbackend/apps/hr5Employee, Attendance, LeaveRequest, AdvanceSalary, PayrollRecord
apps.storebackend/apps/store3ItemCategory, StoreItem, StockTransaction
apps.tasksbackend/apps/tasks1Task
apps.callcenterbackend/apps/callcenter3CallLog, VoiceSetting, VoiceTemplate
apps.reportsbackend/apps/reports0Analytical endpoints (DashboardAnalyticsView)

2. Standardized ViewSet Structure

All API endpoints follow a consistent structure:

  • Inherit from viewsets.ModelViewSet or rest_framework.views.APIView.
  • Apply rest_framework.authentication.TokenAuthentication.
  • Enforce apps.core.permissions.IsTenantMember.
  • Restrict get_queryset() strictly to request.tenant.
  • Wrap financial and hardware mutations in transaction.atomic() and distributed_lock().

On this page