4.6 KiB
Contributing Guide
Purpose
This repository is the standalone productized Workdock platform.
Use this file as the quick-start guide for future coders. It complements:
DEPLOYMENT.mdbackend/workflows/templates/workflows/project_wiki.htmlbackend/workflows/templates/workflows/developer_handbook.html
If you change architecture, deployment flow, or operational behavior, update the relevant documentation in the same branch.
Branch Policy
develop: active integration branchmain: stable branch for production promotion- short-lived feature branches: branch from
develop, merge back intodevelop - customer release branches: branch from
mainfor a frozen customer line when a customer must not receive future feature work automatically
Do not use main as the default development branch.
Customer release policy
For customer-specific deliveries such as TUBCO, use a dedicated release branch from the current stable line.
Recommended pattern:
release/tubco-v1: customer maintenance branchtubco-baseline-2026-03: baseline tag taken from the same stable point
Rule:
- new product features continue on
develop - customer release branches only receive approved:
- bug fixes
- security updates
- UI improvements
Do not let a customer deployment track develop directly.
Dual Remote Workflow
This repository now has two different Git remotes with different purposes:
origin: the normal GitHub product remotetubco: the TUBCO customer remote
Use the helper command to avoid mixing them up:
./scripts/git_remote_target.sh status
Common commands:
./scripts/git_remote_target.sh push-origin
./scripts/git_remote_target.sh push-tubco release/tubco-v1
./scripts/git_remote_target.sh set-own-identity
./scripts/git_remote_target.sh set-tubco-identity
Default rule:
- normal product work goes to
origin - TUBCO pushes happen only when explicitly requested
Current Delivery Model
- GitHub Actions is used for CI
- the current test server is local/LAN-only
- deployment to the test server is manual from a LAN-connected machine
Standard test deployment command:
./scripts/deploy_test_from_mac.sh
Why:
- GitHub-hosted runners cannot reliably reach the private LAN target at
192.168.2.55
Architecture Summary
Main stack:
- Django
- Celery
- PostgreSQL
- Redis
- Caddy
Important repository areas:
backend/config/: Django configurationbackend/workflows/: application codebackend/workflows/templates/workflows/: templates and in-app documentationbackend/workflows/static/workflows/: CSS and JSbackend/workflows/pdf_assets/: default PDF HTML templates and default letterhead
Current backend modularization:
views.py: thin route wrapper layer- split view modules:
request_views.pyaccount_views.pyadmin_config_views.pyform_builder_views.pyobservability_views.pyintegration_admin_views.pywelcome_email_views.pyintro_builder_views.py
tasks.py: async task entrypoints/orchestrationpdf_rendering.pyandpdf_sections.py: PDF renderingemail_workflows.pyandnotification_dispatch.py: mail/notification orchestrationmodels.py: stable import facade over split model modules
Engineering Rules
- Preserve runtime behavior while refactoring.
- Prefer shared UI/system primitives over page-local one-off patterns.
- Do not silently overwrite environment-specific configuration data.
- Treat database-backed admin configuration as runtime state, not seed data.
- Update docs when workflow or architecture changes.
Code vs Data
Not all visible behavior comes from code.
Code-driven:
- page layout
- permissions
- routing
- task behavior
- deploy scripts
Database-driven:
- app registry order and visibility
- branding and company config
- builder settings
- intro checklist items
- notification templates and rules
If local UI and server UI differ, check the database-backed config before assuming a code drift.
Testing Rules
Minimum validation after non-trivial changes:
docker compose exec -T web python manage.py check
docker compose exec -T web python manage.py test
Also verify specifically when changing:
- PDFs
- deployment/config
- templates/UI
Documentation Rules
Keep these current:
DEPLOYMENT.mdPRODUCTIZATION_ROADMAP.mdbackend/workflows/templates/workflows/project_wiki.htmlbackend/workflows/templates/workflows/developer_handbook.html
Recommended Change Flow
- Start from
develop - Implement the change
- Validate locally
- Update docs if needed
- Push to GitHub
- Let CI run
- Deploy from the Mac if runtime verification is needed
- Promote
developtomainwhen stable