teluzia.Cloud Engineer · Day 155
CHAPTER 23 · FLAGSHIP CAPSTONE

Requirements, architecture and repo plan

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Requirements is today's starting point. Define POST /tasks, GET /health and a maximum accepted payload before choosing services. An acceptance test expects valid input to return 201 and malformed input to return 400. You will connect this with architecture and repository plan. The lesson's artifact brings these decisions together: Create requirements.md, architecture.md and a repository tree for a tiny task API; map every service to a requirement and acceptance check.

Think of it this way

A capstone plan resembles a building brief: requirements define the rooms, architecture connects them, and the repository stores the construction records.

TOPIC 01 / 03Step by step

Requirements

Define a small service's functional behavior and nonfunctional constraints. Agree on health endpoint, data handling, budget boundary and recovery expectation before choosing infrastructure. Define POST /tasks, GET /health and a maximum accepted payload before choosing services. An acceptance test expects valid input to return 201 and malformed input to return 400.

WORKED EXAMPLE
Define POST /tasks, GET /health and a maximum accepted payload before choosing services. An acceptance test expects valid input to return 201 and malformed input to return 400.

An acceptance criterion is an observable required result; scope defines included behavior; a constraint limits allowable design choices. Imagine the task API needs persistence after restart but not user accounts in its first version. That requirement changes storage choice, while adding an identity system may be unnecessary scope. Specify valid and invalid input, response semantics, health behavior and data-retention expectations before implementation. Give each nonfunctional requirement a checkable interpretation, such as a documented recovery procedure rather than the word reliable. Narrow scope makes the capstone reproducible and easier to review, but omissions must be explicit. Trace every chosen component back to a requirement, and maintain a deferred list so optional complexity does not quietly become essential to finishing the demonstration.

Why this matters

An acceptance test expects valid input to return 201 and malformed input to return 400.

A common trap

Choosing services should come before deciding the required user behavior.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Requirements

Define a small service's functional behavior and nonfunctional constraints. Agree on health endpoint, data handling, budget boundary and recovery expectation before choosing infrastructure. Define POST /tasks, GET /health and a maximum accepted payload before choosing services. An acceptance test expects valid input to return 201 and malformed input to return 400.

WORKED EXAMPLE
Define POST /tasks, GET /health and a maximum accepted payload before choosing services. An acceptance test expects valid input to return 201 and malformed input to return 400.

An acceptance criterion is an observable required result; scope defines included behavior; a constraint limits allowable design choices. Imagine the task API needs persistence after restart but not user accounts in its first version. That requirement changes storage choice, while adding an identity system may be unnecessary scope. Specify valid and invalid input, response semantics, health behavior and data-retention expectations before implementation. Give each nonfunctional requirement a checkable interpretation, such as a documented recovery procedure rather than the word reliable. Narrow scope makes the capstone reproducible and easier to review, but omissions must be explicit. Trace every chosen component back to a requirement, and maintain a deferred list so optional complexity does not quietly become essential to finishing the demonstration.

Why this matters

An acceptance test expects valid input to return 201 and malformed input to return 400.

A common trap

Choosing services should come before deciding the required user behavior.

Architecture

Draw request, deployment and telemetry paths separately. Mark network and identity trust boundaries; every component should serve a requirement rather than decorate a portfolio diagram. Separate client-to-API traffic, pipeline-to-deployment actions and app-to-logs telemetry. Mark the public boundary and the role used to write data so security review follows real paths.

WORKED EXAMPLE
Separate client-to-API traffic, pipeline-to-deployment actions and app-to-logs telemetry. Mark the public boundary and the role used to write data so security review follows real paths.

A request path carries user work; a control path changes the deployment; a telemetry path reports operation. Imagine CI has permission to update the service but the running application should only write task data. Draw these identities and paths separately so deployment permissions are not accidentally copied into the runtime role. Mark ingress, egress, dependency endpoints and where secrets are obtained. Include failure behavior when data storage or telemetry is unavailable. A combined diagram is compact but can obscure different trust boundaries; separate views may be clearer for review. Integration matters more than the number of services: confirm that ports, roles, health endpoint and deployment target agree across the application, infrastructure and pipeline documents before building each part independently. Check every cross-component identifier.

Why this matters

Mark the public boundary and the role used to write data so security review follows real paths.

A common trap

Every portfolio architecture improves by adding unrelated components.

Repository plan

Separate application, infrastructure, pipeline and documentation directories. Define configuration ownership and secret exclusions; a README should explain prerequisites and teardown before anyone deploys. Use app/, infra/, .github/workflows/ and docs/. Keep .terraform/, state, local environment files and keys out of version control; provide example configuration with harmless placeholders.

WORKED EXAMPLE
Use app/, infra/, .github/workflows/ and docs/. Keep .terraform/, state, local environment files and keys out of version control; provide example configuration with harmless placeholders.

A repository boundary groups related ownership; a configuration example communicates expected input; a generated artifact is output not normally authored by hand. Imagine the app expects DATABASE_URL while the pipeline supplies DB_URL. A shared configuration contract and example file should reveal the mismatch before deployment. Organize app code, infrastructure, workflow and documentation so changes affecting multiple components can be reviewed together. Keep secrets and state out of the public repository, and provide harmless placeholders rather than deleting every useful configuration example. Clear separation helps navigation but should not fragment one release's evidence across unrelated repositories unnecessarily. Define setup order, tool prerequisites and teardown responsibility, then check that a fresh reader can find the commands and files needed to reproduce the intended bounded environment.

Why this matters

Keep .terraform/, state, local environment files and keys out of version control; provide example configuration with harmless placeholders.

A common trap

State files and credentials belong in the public repository.

KEEP THESE WITH YOU

Today’s takeaways

Requirements: Define a small service's functional behavior and nonfunctional constraints.

Architecture: Draw request, deployment and telemetry paths separately.

Repository plan: Separate application, infrastructure, pipeline and documentation directories.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed