WEBVTT

00:00:00.035 --> 00:00:03.286
Architecture describes how parts of a system fit together

00:00:03.611 --> 00:00:05.851
and what each part is responsible for.

00:00:06.455 --> 00:00:09.601
You can think of it as a map of rooms and doors, not a

00:00:09.671 --> 00:00:11.494
shopping list of software brands.

00:00:12.005 --> 00:00:15.488
For the inquiry tracker, a form collects details, a

00:00:15.604 --> 00:00:19.133
service validates them, storage keeps an inquiry record,

00:00:19.458 --> 00:00:22.071
and a private view shows the owner what needs attention.

00:00:22.454 --> 00:00:25.705
A useful map says which part can change a record and how

00:00:25.821 --> 00:00:27.539
information moves among parts.

00:00:27.803 --> 00:00:30.612
Start with the organizer submitting a fictional request.

00:00:30.938 --> 00:00:32.923
The form sends the fields to a service.

00:00:33.306 --> 00:00:36.325
The service checks required information and either rejects

00:00:36.371 --> 00:00:39.262
it with a useful explanation or saves one record.

00:00:39.703 --> 00:00:42.535
The owner then opens the private list and marks that

00:00:42.582 --> 00:00:43.325
record handled.

00:00:43.766 --> 00:00:45.392
Draw arrows for these moves.

00:00:45.566 --> 00:00:48.758
Identify the source of truth: the authoritative record

00:00:48.793 --> 00:00:50.337
that determines current status.

00:00:50.779 --> 00:00:54.378
If a copy or summary exists elsewhere, say how it stays

00:00:54.436 --> 00:00:55.980
consistent with that record.

00:00:56.303 --> 00:00:59.356
A workflow is a sequence of states and transitions.

00:00:59.739 --> 00:01:03.234
A state is a condition, such as new or handled.

00:01:03.559 --> 00:01:06.195
A transition is the action that changes it.

00:01:06.798 --> 00:01:10.409
List who can perform each transition and what happens if

00:01:10.467 --> 00:01:11.106
it fails.

00:01:11.547 --> 00:01:15.714
For example, if saving a submitted form fails, do not show

00:01:15.772 --> 00:01:17.073
a false success message.

00:01:17.584 --> 00:01:20.347
Show a useful error and preserve the user's input where

00:01:20.382 --> 00:01:20.997
possible.

00:01:21.438 --> 00:01:25.200
A clear workflow helps test more than the happy path, the

00:01:25.293 --> 00:01:27.023
sequence where nothing goes wrong.

00:01:27.310 --> 00:01:29.992
A trust boundary is a point where information crosses from

00:01:30.038 --> 00:01:32.917
a less trusted place to a more trusted one.

00:01:33.301 --> 00:01:36.830
A public visitor can enter text; the system must validate

00:01:36.865 --> 00:01:38.409
that text before relying on it.

00:01:38.792 --> 00:01:41.834
A private owner view should require appropriate access.

00:01:42.275 --> 00:01:45.189
Describe who may read or change each record and whether

00:01:45.270 --> 00:01:46.989
any information leaves the system.

00:01:47.592 --> 00:01:50.507
Do not allow an AI-generated guess to decide who is

00:01:50.599 --> 00:01:52.724
authorized or where money and messages go.

00:01:53.328 --> 00:01:56.602
Those important rules need deterministic checks: rules

00:01:56.683 --> 00:01:59.388
implemented so the same permitted input produces the

00:01:59.434 --> 00:02:00.386
expected result.

00:02:00.695 --> 00:02:03.806
Suppose the visitor presses submit twice because the

00:02:03.864 --> 00:02:04.851
network was slow.

00:02:05.234 --> 00:02:08.532
Without a design for duplicates, the owner may receive two

00:02:08.624 --> 00:02:09.182
records.

00:02:09.623 --> 00:02:12.943
Idempotency means repeating the same operation safely

00:02:13.268 --> 00:02:15.440
without duplicating its intended effect.

00:02:15.881 --> 00:02:17.994
There are different ways to achieve it, and the right

00:02:18.017 --> 00:02:19.469
approach depends on the system.

00:02:19.852 --> 00:02:22.812
The architecture should name the problem, the proposed

00:02:22.859 --> 00:02:26.376
identity or retry rule, and how the system reconciles an

00:02:26.493 --> 00:02:29.349
uncertain result before doing the operation again.

00:02:29.664 --> 00:02:33.100
A useful beginner architecture includes a simple diagram,

00:02:33.425 --> 00:02:37.547
component responsibilities, data flow, source of truth,

00:02:37.721 --> 00:02:41.854
user permissions, external integrations, failure behavior,

00:02:41.947 --> 00:02:43.642
and an operator recovery path.

00:02:44.153 --> 00:02:46.138
It also notes important alternatives.

00:02:46.579 --> 00:02:49.435
You do not need to select every framework to understand

00:02:49.482 --> 00:02:50.225
the design.

00:02:50.736 --> 00:02:53.754
Ask the agent to explain the diagram in everyday language,

00:02:54.079 --> 00:02:57.655
then trace one successful inquiry and one failed inquiry

00:02:57.702 --> 00:02:58.178
through it.

00:02:58.689 --> 00:03:01.986
If the explanation contradicts the agreed journey, fix the

00:03:02.044 --> 00:03:04.261
design before turning it into a build contract.

00:03:04.590 --> 00:03:07.341
Draw the organizer and owner outside the system boundary.

00:03:07.666 --> 00:03:11.927
Inside it, draw a public form, validation service, inquiry

00:03:11.985 --> 00:03:13.959
store, and private owner view.

00:03:14.563 --> 00:03:17.570
Label an arrow from the form to validation "submitted

00:03:17.616 --> 00:03:21.203
fields," and an arrow to the store "validated inquiry."

00:03:21.645 --> 00:03:25.011
The store returns a saved identifier, which lets the form

00:03:25.081 --> 00:03:26.393
show a real confirmation.

00:03:26.718 --> 00:03:29.365
The private view reads that record and can request an

00:03:29.412 --> 00:03:30.584
allowed status change.

00:03:31.025 --> 00:03:34.474
A text description alongside the diagram makes the same

00:03:34.508 --> 00:03:36.320
information available to a screen reader.

00:03:36.601 --> 00:03:38.308
Now imagine the store is unavailable.

00:03:38.691 --> 00:03:41.095
The validation service cannot truthfully report a

00:03:41.153 --> 00:03:42.151
successful save.

00:03:42.592 --> 00:03:44.810
It returns a failure the form can display.

00:03:45.251 --> 00:03:47.979
The visitor sees an explanation and an appropriate next

00:03:48.002 --> 00:03:51.579
step; the owner sees an operator diagnostic that avoids

00:03:51.613 --> 00:03:53.506
exposing the visitor's private details.

00:03:53.947 --> 00:03:57.128
Once storage returns, the visitor can retry under the

00:03:57.186 --> 00:03:58.835
agreed duplicate-handling rule.

00:03:59.439 --> 00:04:02.446
Drawing this path reveals a design need that a diagram of

00:04:02.515 --> 00:04:04.187
only successful arrows would miss.

00:04:04.512 --> 00:04:06.579
Who is allowed to mark an inquiry handled?

00:04:07.020 --> 00:04:09.655
The private view should not infer permission merely

00:04:09.702 --> 00:04:11.745
because someone knows a record identifier.

00:04:12.128 --> 00:04:15.739
An access mechanism should verify the user's identity and

00:04:15.797 --> 00:04:17.934
check the operation against trusted rules.

00:04:18.444 --> 00:04:21.150
Keep the decision as a concrete responsibility in the

00:04:21.196 --> 00:04:21.916
architecture.

00:04:22.357 --> 00:04:25.828
The exact identity provider can remain undecided until the

00:04:25.875 --> 00:04:28.464
project is ready to choose it; the need for an

00:04:28.533 --> 00:04:31.018
authorization boundary does not have to wait for a brand

00:04:31.076 --> 00:04:31.448
name.

00:04:31.758 --> 00:04:34.591
The owner may want a count of new inquiries and a detail

00:04:34.637 --> 00:04:34.997
view.

00:04:35.508 --> 00:04:38.654
These are two views of one authoritative record, not

00:04:38.701 --> 00:04:41.034
independent systems that each decide the status.

00:04:41.476 --> 00:04:45.121
If a count is cached, explain how it is refreshed and what

00:04:45.179 --> 00:04:46.433
happens if it is stale.

00:04:46.874 --> 00:04:50.055
A source of truth simplifies disagreements: when the count

00:04:50.113 --> 00:04:53.260
and detail view differ, the design says which record

00:04:53.306 --> 00:04:55.280
governs and how to repair the summary.

00:04:55.721 --> 00:04:58.113
It also helps tests target the right behavior.

00:04:58.432 --> 00:05:02.588
Imagine a user clicks submit twice or a response is lost

00:05:02.646 --> 00:05:04.086
after the server saves the record.

00:05:04.469 --> 00:05:07.023
The client may not know whether a retry will create a

00:05:07.070 --> 00:05:07.627
duplicate.

00:05:08.068 --> 00:05:11.772
The design can use an operation identifier, a uniqueness

00:05:11.841 --> 00:05:15.266
rule, or another suitable method; the correct choice

00:05:15.301 --> 00:05:17.089
depends on the existing system.

00:05:17.600 --> 00:05:20.943
Document the intended effect and how an uncertain outcome

00:05:20.966 --> 00:05:21.953
will be reconciled.

00:05:22.464 --> 00:05:26.133
"Just retry" is not enough when an operation can send a

00:05:26.203 --> 00:05:29.616
message, charge money, or create a duplicate record.

00:05:29.857 --> 00:05:32.144
Ask a beginner to follow the arrows and explain what

00:05:32.190 --> 00:05:34.234
happens from submission to confirmation.

00:05:34.675 --> 00:05:37.554
Then ask where access is checked and what happens if

00:05:37.601 --> 00:05:38.483
storage fails.

00:05:38.924 --> 00:05:41.943
If the answers cannot be found, add a clear label or note.

00:05:42.326 --> 00:05:45.902
The exercise does not require complex diagrams or a

00:05:45.960 --> 00:05:47.458
particular drawing application.

00:05:47.899 --> 00:05:51.545
A few boxes, arrows, and a plain-language description can

00:05:51.591 --> 00:05:54.772
be a better design conversation than a crowded chart full

00:05:54.819 --> 00:05:56.630
of unexplained technology names.

00:05:56.908 --> 00:05:59.637
Once the responsibilities and paths are understandable,

00:06:00.078 --> 00:06:03.294
the build specification can define the exact behavior at

00:06:03.340 --> 00:06:03.979
each point.

00:06:04.362 --> 00:06:08.750
The diagram may say "validate inquiry"; the spec explains

00:06:08.878 --> 00:06:12.605
which fields are required, what error appears, and whether

00:06:12.663 --> 00:06:14.428
a failed submission creates a record.

00:06:15.031 --> 00:06:16.297
Keep the two consistent.

00:06:16.680 --> 00:06:19.977
If the specification reveals an unaddressed failure path,

00:06:20.674 --> 00:06:22.067
revise the architecture.

00:06:22.764 --> 00:06:25.411
Architecture is a working model that helps people make

00:06:25.446 --> 00:06:28.615
decisions, and it can evolve as long as changes are

00:06:28.662 --> 00:06:30.751
recorded and agreed at the appropriate level.
