FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
Git ContextDeveloper Guide
Coding Standards
Docsgit-contextDeveloper GuideCoding Standards
GitHub Live Sync

Coding Standards

Live technical documentation fetched from GitHub repository omghante/metapilot/docs/developer/coding-standards.md

Coding Standards Specification

Quality rules, linters, and code formatting standards for Python and TypeScript codebases.

Python / Django Backend Rules

  • PEP 8 Compliance: Enforced via
    ruff
    and
    black
    .
  • Imports: Group imports in standard PEP 8 order (Standard Library, Third-Party, Django, Local Apps).
  • Docstrings: All public classes, ViewSets, services, and models must include triple-quoted docstrings.
  • Type Annotations: Mandatory for service functions and utility methods:
    python
    def get_config(cls, tenant: Tenant, provider: str, key_name: str) -> str | None:
    

TypeScript / Next.js Frontend Rules

  • Strict TypeScript:
    noImplicitAny
    ,
    strictNullChecks
    enabled in
    tsconfig.json
    .
  • Component Formatting: Functional React components with explicit prop interfaces:
    tsx
    interface Props {
      tenantId: string;
      onClose: () => void;
    }
    export const TenantModal: React.FC<Props> = ({ tenantId, onClose }) => { ... };
    
  • Styling: Vanilla CSS design tokens (
    globals.css
    ); no inline styling or ad-hoc Tailwind unless specified.