Case study / 01
DemoPlast
A lead survives even when integrations fail.
- Role
- Backend engineering
- Context
- Commercial project showcase
- Status
- Live
- Core
- Django / PostgreSQL / HTMX
Context
DemoPlast is an anonymized showcase of a real commercial project: a six-page product catalog and lead-generation site for a manufacturer. Client data is replaced, while the architecture and engineering decisions remain intact.
The product needed an indexable catalog, fast forms, editable business details and reliable delivery to email, Telegram and amoCRM. It also had to handle personal data deliberately instead of treating compliance as a document added after launch.
Lead flow
Validate at the boundary
Django validates consent, rate limits and the honeypot before the application accepts a submission.
Persist before integration
PostgreSQL receives the lead first and becomes the source of truth. No external service sits on the critical request path.
Fan out independent work
The dispatcher queues email, Telegram and amoCRM as separate django-q2 tasks rather than one fragile notification chain.
Retry one channel at a time
A CRM outage or expired OAuth token can be retried without losing the submission or blocking the other delivery channels.
Decisions
Monolith over microservices
Six pages, a catalog and a form do not justify distributed deployment complexity. One Django application keeps ownership and operations explicit.
Server rendering over a SPA
Django templates keep the catalog indexable. HTMX adds fragment updates and validation feedback without turning the form into a separate client application.
Privacy inside the system
Consent is validated and timestamped, analytics wait for cookie consent, and Sentry strips names, phone numbers and form bodies before an event leaves the process.
What shipped
The public repository preserves the production architecture while remaining safe to run without real credentials.
- Functional demo mode with generated catalog, images and leads.
- Tests for persistence, channel failures, services, consent-gated analytics and the Sentry scrubber.
- Automated image build and deployment through GitHub Actions, GHCR, Docker Compose and Traefik.
- Bilingual technical documentation with runbooks and architecture decision records.