bublliodocs

Project structure

Use this page as a code map. For implementation rules, follow the linked workflow for the area you are changing.

Top-level map

bubllio-crm/
├── frontend/        React application
├── src/             Django project and business apps
├── docs/            operator, product, API, and architecture documentation
├── skills/          repeatable implementation and verification workflows
├── compose.yaml     local PostgreSQL service
├── Dockerfile       production backend image
├── pyproject.toml   Python dependencies and package metadata
└── uv.lock          locked Python dependency versions

Local databases, environment files, caches, build output, and editor state are ignored. See the hygiene rules in AGENTS.md.

Backend

src/manage.py is the Django command entry point. Project-wide configuration is under src/bubllio_crm/; business behavior is split into Django apps.

AppOwns
accountsUser-facing account behavior.
accessMemberships, roles, capabilities, and invitations.
onboardingFirst-run setup and installation administration.
organizationsWorkspaces, settings, and SMTP accounts.
companiesCustomer organizations and company activity.
contactsPeople related to companies.
dealsSales opportunities and pipeline stages.
activitiesFollow-ups, calls, meetings, and task state.
subscriptionsServices, recurring billing, charges, and payments.
automationsAutomation rules, execution, and run history.

Inside an app, keep responsibilities predictable:

models.py / models/       persistent data and invariants
serializers.py            API input and output validation
api/ or views.py          HTTP coordination
services/                 reusable business workflows
urls.py                   routes
migrations/               schema history
tests/                    behavior and regression coverage

Read the Django workflow before adding backend behavior. Tenant-scoped changes must also follow the repository tenant-boundary rules.

Frontend

The official React client lives in frontend/ and is deployed independently from Django.

frontend/src/
├── components/      shared UI and application layouts
├── context/         shared React contexts
├── features/        domain hooks, services, schemas, and components
├── i18n/            language setup and translation JSON
├── pages/           route-level composition
├── routes/          TanStack Router configuration
├── services/        shared API client infrastructure
├── styles/          brand tokens and Material UI theme
└── types/           shared API/domain types

Frontend requests follow one direction:

page/component → feature hook → feature service → shared API client → Django

Read the frontend workflow for forms, queries, mutations, routing, and verification.

Configuration

FilePurpose
.env.exampleSafe development placeholders and available settings.
.env.production.exampleProduction checklist without secrets.
src/bubllio_crm/settings.pyDjango settings and installed apps.
src/bubllio_crm/database.pyDATABASE_URL parsing.
compose.yamlOptional local PostgreSQL.
compose.production.yamlGeneric self-hosted production stack.
compose.dokploy.yamlDokploy production stack.

Real .env files and credentials must never be committed.

Where should a change go?

ChangePrimary location
New stored field or invariantOwning Django model plus migration
API validationOwning serializer
Reusable business operationOwning service module
HTTP status/query coordinationView or API module
Raw frontend requestFeature service
Query caching/invalidationFeature hook
Page layout and UI statePage or feature component
Shared visual behaviorfrontend/src/components/
Brand-wide visual tokenfrontend/src/styles/brand.ts
Current technical behaviordocs/architecture/
User workflowdocs/guides/
Future directiondocs/roadmap/

When unsure, start at the documentation home or inspect the nearest existing feature with the same shape.