3.4 KiB
3.4 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
Do not use main as the default development branch.
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/media/templates/: PDF HTML templates
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