Skip to content

Commit f35af44

Browse files
committed
added architecture page based on dk.org
Signed-off-by: bidi <bidi@apidemia.com>
1 parent 19202cd commit f35af44

3 files changed

Lines changed: 650 additions & 11 deletions

File tree

config/autoload/local.php.dist

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ return [
8080
// and is routed in Light\App\RoutesDelegator. Re-adding it here registers the path twice.
8181
'routes' => [
8282
'page' => [
83-
'contact' => 'contact',
84-
'api' => 'api',
85-
'admin' => 'admin',
86-
'queue' => 'queue',
87-
'light' => 'light',
88-
'frontend' => 'frontend',
89-
'dotboost' => 'dotboost',
83+
'contact' => 'contact',
84+
'api' => 'api',
85+
'admin' => 'admin',
86+
'queue' => 'queue',
87+
'light' => 'light',
88+
'frontend' => 'frontend',
89+
'dotboost' => 'dotboost',
90+
'architecture' => 'architecture',
9091
],
9192
],
9293
'twig' => [

src/Page/templates/page/api.html.twig

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
</div>
6464

6565
<div class="pipeline">
66-
<div class="pipeline-label"><span>Request lifecycle</span></div>
66+
<div class="pipeline-label">
67+
<span>Request lifecycle</span>
68+
<span><a href="{{ url('page::architecture') }}">All 19 stages →</a></span>
69+
</div>
6770
<div class="pipeline-track">
6871
<div class="pl-packet" aria-hidden="true"></div>
6972
<div class="pl-step"><span class="name">CORS</span><span class="tag">mezzio-cors</span></div>
@@ -227,9 +230,22 @@
227230
</div>
228231
<p class="lede">Scheduled work that refuses to trample itself.</p>
229232
<p class="desc">
230-
Console commands are registered through <code>dot-cli</code> on top of Symfony Console. The file
231-
locker, enabled by default, writes a lock file per command so a second instance cannot start
232-
while the previous run is still going - the safeguard cron jobs usually lack.
233+
Console commands are registered through <code>dot-cli</code> on top of Symfony Console, and
234+
<code>php ./bin/cli.php route:list</code> prints every endpoint the application exposes. The
235+
file locker, enabled by default, writes a lock file per command so a second instance cannot
236+
start while the previous run is still going - the safeguard cron jobs usually lack.
237+
</p>
238+
</div>
239+
240+
<div class="card" style="--accent:var(--brand-red)">
241+
<div class="card-top">
242+
<div><span class="kicker">Operations · Mail</span><h3>Transactional email</h3></div>
243+
</div>
244+
<p class="lede">Account mail that works before you configure anything.</p>
245+
<p class="desc">
246+
<code>dot-mail</code> wraps Symfony Mailer with templated messages, so account activation and
247+
password reset send out of a fresh install. It joins the request flow only where it is needed -
248+
the rest of the pipeline is unchanged whether a route sends mail or not.
233249
</p>
234250
</div>
235251

@@ -305,12 +321,19 @@
305321
API versions. The same codebase evolves gradually and clients are given notice, instead of every
306322
change forking into another branch you have to keep alive.
307323
</p>
324+
<p class="lede">
325+
The mechanism is <code>DeprecationMiddleware</code>: mark a handler with the
326+
<code>#[ResourceDeprecation]</code> attribute and the response carries <code>sunset</code> and
327+
<code>link</code> headers, so a client learns an endpoint is retiring from the endpoint itself
328+
rather than from a changelog it never read.
329+
</p>
308330
<p class="lede">
309331
Full versioning stays reserved for major, format-level changes - the cases where it genuinely earns
310332
its maintenance cost. The two approaches are not mutually exclusive.
311333
</p>
312334
<div class="hero-ctas">
313335
<a class="btn btn-ghost" href="https://docs.dotkernel.org/api-documentation/v6/tutorials/api-evolution/" target="_blank" rel="noopener">API evolution guide</a>
336+
<a class="btn btn-ghost" href="{{ url('page::architecture') }}">Where it sits in the pipeline</a>
314337
</div>
315338
</div>
316339
<div class="callout">

0 commit comments

Comments
 (0)