page:blueprints:professional training:member portal:django
Professional Training: Member Portal Using Django
Summary
A member portal blueprint for professional training built with Django on Ample. Domain schema:
- course_groups (certification, cohort, start_at, end_at): Certification cohorts
- memberships (course_group_id, participant_email, employer, role): Participants and trainers
- sessions (course_group_id, starts_at, module, location_or_link): Training sessions
- materials (course_group_id, module, object_key, visibility): Course materials and exam guides
- document_access (document_id, principal_reference, role, granted_at): Who may read which document.
Public information includes the certification catalog, cohort dates, and trainer credentials. Exam results, employer billing, and participant identity are kept out of scope until further review. Exam results and certifications are personal records; only cohort logistics and materials are modeled.
Technical basis verified on Django: A role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok).
Framework and Workload
- Framework: Django
- Workload: Member portal
- Industry: Professional training
Prerequisites
- A Django project (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template)
- A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
- Bucket credentials from
ample bucket createpassed as encrypted S3_* environment variables - Review of which professional training data classes may be handled; this blueprint models public information only.
Resource Requirements
- Primitive: Compute
- Primitive: Postgres
- Primitive: S3-compatible object storage
Infrastructure Requirements
- Compute: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- Postgres: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
- S3-compatible Object Storage: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.
Workflow Steps
- Model the Professional Training Domain: Create the tables course_groups, memberships, sessions, materials, document_access. Certification cohorts live in course_groups; keep sensitive classes (exam results, employer billing, participant identity) out of this schema.
- Authorize Access to Materials: By membership and role (401, 403 negative tests)
- Store Materials: In the private bucket and stream them through the app.
- Deploy and Verify: The negative tests and an authorized download.
- Verify Self-Test(s): From the example and own acceptance checks for the professional training workflow.
Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Components:
- App server: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0
- Managed PostgreSQL database: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0
- Note: Always-on monthly price; apps and databases auto-pause when idle. Buckets are allocation-priced per quota and not included.
Limitations
- The technical basis verified with the pattern fixture; the professional training schema and workflow are an original design and were not executed separately.
- No health, financial, privacy, or compliance claims are made. Only cohort logistics and materials are modeled.
- Public content until actual data-handling requirements have been reviewed.
- Verified on the python-3.12 template; sizing limits are unknown.
Examples
- Django Pattern Fixture: Verified private document library basis for this blueprint. Source: tests/deploy-canaries/django-patterns.
Success Checks
- App responds on its public URL (path: /, expect: ample canary django patterns)
- Private-document-library self-test from the example (path: /p/private-document-library, expect: see the pattern fixture checks)