Project Workshop — Job Board Platform
This is a portfolio submission, not a copy-and-run tutorial. A reviewer must be able to clone it, configure it without guessing, execute the critical path, observe a deliberate failure, run the tests, and understand the most important…
- What you are building
- Architecture
- Acceptance criteria
- Suggested repository structure
- Build plan: vertical slices
Django · DRF · Celery · Channels · Redis · PostgreSQL · Docker
Expected effort: 15–24 focused hours · Minimum meaningful tests: 40What you are building
This is a portfolio submission, not a copy-and-run tutorial. A reviewer must be able to clone it, configure it without guessing, execute the critical path, observe a deliberate failure, run the tests, and understand the most important design decision from the README.
Architecture
Critical interaction
Ownership table
| Boundary | Owns | Must not own |
|---|---|---|
| Interface | Parsing, protocol validation, identity extraction, status or presentation mapping | Core business invariants |
| Application/domain | Authorization inputs, state transitions, orchestration, transaction intent | Framework globals or raw transport objects |
| Repository/gateway | One persistence or external protocol, bounded retries, error translation | Product policy |
| Background/UI projection | Recoverable derived state and delivery progress | Hidden authoritative truth |
| Operations | Configuration, health, deployment, telemetry, recovery | Business decisions encoded only in dashboards |
Acceptance criteria
| ID | Required behavior | Evidence |
|---|---|---|
| AC-1.1 | Custom AbstractUser produces the specified behavior inside Models & auth | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-1.2 | Company/JobListing/Application/Notification models produces the specified behavior inside Models & auth | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-1.3 | JWT auth integration produces the specified behavior inside Models & auth | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-2.1 | Jobs CRUD (employer) + PostgreSQL FTS search produces the specified behavior inside API endpoints | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-2.2 | Applications: apply/list/status update produces the specified behavior inside API endpoints | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-2.3 | cursor pagination + rate limiting (5 apps/hr) produces the specified behavior inside API endpoints | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-3.1 | Celery: confirmation email + daily digest produces the specified behavior inside Async & background | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-3.2 | Channels: real-time status updates produces the specified behavior inside Async & background | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-3.3 | Beat: expire_old_listings command produces the specified behavior inside Async & background | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-4.1 | Docker Compose: django/postgres/redis/celery/beat produces the specified behavior inside Infrastructure | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
| AC-4.2 | 40 test cases produces the specified behavior inside Infrastructure | Automated assertion, reproducible command, plan, trace, metric, or accessible browser check |
Suggested repository structure
1project/2├── manage.py3├── config/{settings,urls,asgi,celery}.py4├── domain/5│ ├── models.py6│ ├── services.py7│ ├── selectors.py8│ ├── serializers-or-schema.py9│ ├── views-or-resolvers.py10│ ├── permissions.py11│ ├── tasks.py12│ └── consumers.py13├── templates/14├── tests/{unit,api,integration}/15├── pyproject.toml16└── compose.yamlBuild plan: vertical slices
| Milestone | Capability | First implementation | Exit condition |
|---|---|---|---|
| 1 | Models & auth | Custom AbstractUser; Company/JobListing/Application/Notification models; JWT auth integration | Demonstration plus focused tests |
| 2 | API endpoints | Jobs CRUD (employer) + PostgreSQL FTS search; Applications: apply/list/status update; cursor pagination + rate limiting (5 apps/hr) | Demonstration plus focused tests |
| 3 | Async & background | Celery: confirmation email + daily digest; Channels: real-time status updates; Beat: expire_old_listings command | Demonstration plus focused tests |
| 4 | Infrastructure | Docker Compose: django/postgres/redis/celery/beat; 40 test cases | Demonstration plus focused tests |
| 5 | Hardening and delivery | Security, recovery, telemetry, performance, documentation | Full acceptance suite and recorded demonstration |
For each milestone, first create a failing acceptance test or a reproducible command. Implement the thinnest path to an observable result, add the nearest durable invariant, inject one expected failure, and refactor only after evidence protects the behavior.
Reference vertical slice
1class Application(models.Model):2 class Status(models.TextChoices):3 SUBMITTED = "submitted"4 REVIEW = "review"5 ACCEPTED = "accepted"6 REJECTED = "rejected"7
8 candidate = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)9 job = models.ForeignKey(JobListing, on_delete=models.CASCADE)10 status = models.CharField(max_length=16, choices=Status, default=Status.SUBMITTED)11
12 class Meta:13 constraints = [14 models.UniqueConstraint(fields=("candidate", "job"), name="one_application_per_job")15 ]16
17@transaction.atomic18def apply(candidate, job):19 return Application.objects.get_or_create(candidate=candidate, job=job)Expected result
1Concurrent duplicate submissions converge on one candidate/job application row.Code reading
| Line | Code | Explanation |
|---|---|---|
| 1 | class Application(models.Model): | Creates a class namespace and binds the resulting class object to this name. |
| 2 | class Status(models.TextChoices): | Creates a class namespace and binds the resulting class object to this name. |
| 3 | SUBMITTED = "submitted" | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 4 | REVIEW = "review" | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 5 | ACCEPTED = "accepted" | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 6 | REJECTED = "rejected" | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 8 | candidate = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 9 | job = models.ForeignKey(JobListing, on_delete=models.CASCADE) | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 10 | status = models.CharField(max_length=16, choices=Status, default=Status.SUBMITTED) | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 12 | class Meta: | Creates a class namespace and binds the resulting class object to this name. |
| 13 | constraints = [ | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 14 | models.UniqueConstraint(fields=("candidate", "job"), name="one_application_per_job") | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 15 | ] | Implements the next python statement in the example's data flow. |
| 17 | @transaction.atomic | Applies a decorator or framework annotation before the following definition is bound. |
| 18 | def apply(candidate, job): | Defines a function; its parameters form the explicit input boundary. |
| 19 | return Application.objects.get_or_create(candidate=candidate, job=job) | Returns the observable result to the caller and ends this invocation. |
Risk register
| Area | Failure to reproduce | Required design response |
|---|---|---|
| Models & auth | Decoding is not validation, and a valid token does not grant every resource. | Enforce object ownership and roles on the server for every path. |
| API endpoints | Application throttles are not a substitute for edge protection, and offset pagination drifts under concurrent writes. | Use deterministic unique ordering and return retry metadata. |
| Async & background | Do not load an unbounded table into memory or make partial failure impossible to resume. | Make reruns safe, support dry-run and batching, and emit progress. |
| Infrastructure | Chasing a case count or line percentage with shallow assertions creates confidence without protecting product behavior. | Create a test matrix by risk and source boundary, give every case a meaningful assertion, and report important untested risks alongside coverage. |
Engineering checklist for this stack
- To do: deliver reviewable vertical slices
- To do: keep authoritative and derived state distinct
- To do: make every external effect retry-safe
- To do: integrate security and observability before the final sprint
- To do: publish reproducible demo and failure evidence
Test strategy
Implement at least 40 meaningful cases. A long list of shallow happy-path tests does not satisfy the requirement.
| Risk class | Minimum | Examples |
|---|---|---|
| Happy path and contract | 2 | Correct output, status/schema, durable state |
| Validation and boundaries | 2 | Empty, malformed, extreme, unsupported transition |
| Authorization or trust boundary | 1 | Missing identity, wrong tenant/role, injection or unsafe content |
| Failure and recovery | 2 | Timeout, retry, rollback, reconnect, dependency outage |
| Duplicate or concurrency | 1 | Same identity twice, racing update, redelivery |
| Performance and operations | 32 | Query bound, lag, p95, resource limit, telemetry |
Representative test scaffold
1def test_list_is_authorized_and_query_bounded(api_client, member, project, django_assert_num_queries):2 api_client.force_authenticate(member)3 with django_assert_num_queries(3):4 response = api_client.get("/api/resources/")5 assert response.status_code == 2006 assert all(item["project_id"] == str(project.id) for item in response.data["results"])Failure drills
- Stop the primary external dependency during the critical path. Capture the failure, cleanup, telemetry, and recovery.
- Repeat the same operation with the same stable identity. Prove one logical outcome or document why repetition is forbidden.
- Crash after durable state changes but before the response, acknowledgement, or projection. Re-run and reconcile.
- Submit the largest supported input and one slightly larger input.
- Remove one permission and prove denial without state change or information leakage.
- Roll back the change or restore the dependency, then run a smoke test and reconciliation check.
Performance experiment
State the dataset, payload distribution, concurrency, rate, duration, cache state, and resource limits before measuring. Publish p50, p95, p99, throughput, error rate, and the technology-specific correctness signal such as query count, consumer lag, duplicate effects, rendered updates, token cost, or recall. Change one variable at a time and retain raw output.
Submission package
- Complete source with a locked/reproducible environment.
- README.md with problem, architecture, setup, commands, configuration, assumptions, and trade-offs.
- Acceptance and risk-focused tests with a short explanation of what mocks intentionally do not cover.
- One design record explaining the most consequential choice and a rejected alternative.
- Security notes, sample non-secret configuration, and cleanup commands.
- A demonstration record: terminal transcript, screenshots, trace, query plan, or metrics dashboard.
- A 5–8 minute walkthrough following input → validation → state → failure → evidence.
Grading rubric
| Dimension | Weight | Full-credit evidence |
|---|---|---|
| Product behavior | 25 | Acceptance criteria pass through real public boundaries |
| Architecture and ownership | 20 | Responsibilities and state authority are explicit |
| Tests and recovery | 20 | Important negative, duplicate, concurrent, and outage cases pass |
| Security and data correctness | 15 | Least privilege, validation, constraints, and secret handling are demonstrated |
| Performance and operations | 10 | Reproducible measurement, useful telemetry, and rollback/recovery |
| Documentation and explanation | 10 | A new reviewer can reproduce and defend the result |
Mastery check
How well can you recall this?
Finished this lesson?