# Professional Training: Event Registration Using Django

## Summary
A event registration 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;  
- **events** (seq, record_type, record_id, kind, at): application-owned history written in the same transaction.

Public information: certification catalog, cohort dates, trainer credentials. Kept out of scope until handling is reviewed: exam results, employer billing, participant identity. Exam results and certifications are personal records; only cohort logistics and materials are modeled.

Technical basis verified on Django: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected).

## Requirements
### Resource Requirements
- **primitive:compute**
- **primitive:postgres**
- **primitive:s3-compatible-object-storage**

### Infrastructure Requirements
1. **Compute**  
   Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
   
2. **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.
   
3. **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
1. **Model the professional training domain**: Create the tables course_groups, memberships, sessions, materials, events.
   - Certification cohorts live in course_groups; keep the sensitive classes (exam results, employer billing, participant identity) out of this schema.

2. **Workflow Step 1**: Model sessions with capacity and registrations with status.
3. **Workflow Step 2**: Register transactionally with a capacity check and an event per registration.
4. **Workflow Step 3**: Reject stale concurrent updates.
5. **Workflow Step 4**: Deploy and verify history and conflict handling.
6. **Deploy**:  Run the synchronous deploy once and read the result.

## Limitations
- The technical basis (transactional workflows on Django) was verified with the pattern fixture; the professional training schema and workflow are an original design for this blueprint and were not executed as a separate application.
- No health, financial, privacy or other compliance claim is made. Exam results and certifications are personal records; only cohort logistics and materials are modeled.
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.

## Cost Estimate
- **Currency**: USD  
- **Monthly Amount**: $10.00  
- **Basis**: size prices from pricing.toml at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty

### Components
1. **App server**: Size - s-1vcpu-1gb, Quantity - 1.0, Monthly Amount - $5.00
2. **Managed PostgreSQL database**: Size - s-1vcpu-1gb, Quantity - 1.0, Monthly Amount - $5.00

Note: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle.
