Skip to content

Commit 6cbc6d5

Browse files
committed
Deploy site + cookbook: Add comprehensive RustAPI cookbook documentation
Introduces a new, structured documentation set for RustAPI, including sections on getting started, core concepts, crate deep dives, and practical recipes. Updates SUMMARY.md to reflect the new organization and adds detailed guides on handlers, performance, testing, crate internals, and common development tasks such as CRUD resources, JWT authentication, database integration, file uploads, middleware, and production tuning. 3eb5c23
1 parent 87d8d6e commit 6cbc6d5

37 files changed

Lines changed: 6975 additions & 521 deletions

cookbook/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
const path_to_root = "";
3838
const default_light_theme = "light";
3939
const default_dark_theme = "navy";
40-
window.path_to_searchindex_js = "searchindex-8e0dcf21.js";
40+
window.path_to_searchindex_js = "searchindex-19cf8ce6.js";
4141
</script>
4242
<!-- Start loading toc.js asap -->
43-
<script src="toc-2cada9e7.js"></script>
43+
<script src="toc-163c7333.js"></script>
4444
</head>
4545
<body>
4646
<div id="mdbook-help-container">

cookbook/concepts/handlers.html

Lines changed: 371 additions & 0 deletions
Large diffs are not rendered by default.

cookbook/concepts/index.html

Lines changed: 243 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 85 additions & 28 deletions
Large diffs are not rendered by default.

cookbook/concepts/testing.html

Lines changed: 364 additions & 0 deletions
Large diffs are not rendered by default.

cookbook/crates/cargo_rustapi.html

Lines changed: 259 additions & 0 deletions
Large diffs are not rendered by default.

cookbook/architecture/testing_strategy.html renamed to cookbook/crates/index.html

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
6-
<title>Testing Pyramid - RustAPI Architecture Cookbook</title>
6+
<title>Part III: Crate Deep Dives - RustAPI Architecture Cookbook</title>
77

88

99
<!-- Custom HTML head -->
@@ -36,10 +36,10 @@
3636
const path_to_root = "../";
3737
const default_light_theme = "light";
3838
const default_dark_theme = "navy";
39-
window.path_to_searchindex_js = "../searchindex-8e0dcf21.js";
39+
window.path_to_searchindex_js = "../searchindex-19cf8ce6.js";
4040
</script>
4141
<!-- Start loading toc.js asap -->
42-
<script src="../toc-2cada9e7.js"></script>
42+
<script src="../toc-163c7333.js"></script>
4343
</head>
4444
<body>
4545
<div id="mdbook-help-container">
@@ -147,7 +147,7 @@ <h1 class="menu-title">RustAPI Architecture Cookbook</h1>
147147
<a href="https://github.com/Tuntii/RustAPI" title="Git repository" aria-label="Git repository">
148148
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg></span>
149149
</a>
150-
<a href="https://github.com/Tuntii/RustAPI/edit/master/docs/cookbook/src/architecture/testing_strategy.md" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
150+
<a href="https://github.com/Tuntii/RustAPI/edit/master/docs/cookbook/src/crates/README.md" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
151151
<span class=fa-svg id="git-edit-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M421.7 220.3l-11.3 11.3-22.6 22.6-205 205c-6.6 6.6-14.8 11.5-23.8 14.1L30.8 511c-8.4 2.5-17.5 .2-23.7-6.1S-1.5 489.7 1 481.2L38.7 353.1c2.6-9 7.5-17.2 14.1-23.8l205-205 22.6-22.6 11.3-11.3 33.9 33.9 62.1 62.1 33.9 33.9zM96 353.9l-9.3 9.3c-.9 .9-1.6 2.1-2 3.4l-25.3 86 86-25.3c1.3-.4 2.5-1.1 3.4-2l9.3-9.3H112c-8.8 0-16-7.2-16-16V353.9zM453.3 19.3l39.4 39.4c25 25 25 65.5 0 90.5l-14.5 14.5-22.6 22.6-11.3 11.3-33.9-33.9-62.1-62.1L314.3 67.7l11.3-11.3 22.6-22.6 14.5-14.5c25-25 65.5-25 90.5 0z"/></svg></span>
152152
</a>
153153

@@ -181,47 +181,27 @@ <h1 class="menu-title">RustAPI Architecture Cookbook</h1>
181181

182182
<div id="mdbook-content" class="content">
183183
<main>
184-
<h1 id="the-testing-pyramid"><a class="header" href="#the-testing-pyramid">The Testing Pyramid</a></h1>
185-
<p>A healthy project requires a balanced testing strategy. RustAPI relies on three layers of verification.</p>
186-
<h2 id="1-unit-tests-the-base"><a class="header" href="#1-unit-tests-the-base">1. Unit Tests (The Base)</a></h2>
187-
<p><strong>Where</strong>: Helper modules, core logic snippets, utility functions.
188-
<strong>Goal</strong>: Verify logic in isolation.
189-
<strong>Command</strong>: <code>cargo test</code></p>
190-
<pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
191-
</span><span class="boring">fn main() {
192-
</span>#[test]
193-
fn test_email_validation() {
194-
assert!(validate_email("test@example.com").is_ok());
195-
}
196-
<span class="boring">}</span></code></pre>
197-
<h2 id="2-integration--flow-tests-the-middle"><a class="header" href="#2-integration--flow-tests-the-middle">2. Integration / Flow Tests (The Middle)</a></h2>
198-
<p><strong>Where</strong>: <code>tests/integration/</code> and specific “Action” tests.
199-
<strong>Goal</strong>: Verify that components work together. Does the Action talk to the database correctly?
200-
<strong>Mocking</strong>: We use mocking for external services (Stripe, AWS) but favor real database containers (Testcontainers) for data integrity.</p>
201-
<h2 id="3-end-to-end--benchmarks-the-top"><a class="header" href="#3-end-to-end--benchmarks-the-top">3. End-to-End &amp; Benchmarks (The Top)</a></h2>
202-
<p><strong>Where</strong>: <code>benches/</code> and CI simulation scripts.
203-
<strong>Goal</strong>: Performance verification and full system sanity.
204-
<strong>Tool</strong>: <code>check_quality.ps1</code> runs the full suite.</p>
205-
<h2 id="continuous-integration-strategy"><a class="header" href="#continuous-integration-strategy">Continuous Integration Strategy</a></h2>
206-
<p>We do not push code that fails locally.</p>
207-
<ul>
208-
<li>Run <code>scripts/simulate_ci.ps1</code> before every push.</li>
209-
<li>This script runs <code>fmt</code>, <code>clippy</code>, and <code>test</code> in a production-like environment.</li>
210-
</ul>
184+
<h1 id="crate-deep-dives"><a class="header" href="#crate-deep-dives">Crate Deep Dives</a></h1>
211185
<blockquote class="blockquote-tag blockquote-tag-warning">
212186
<p class="blockquote-tag-title"><svg viewbox="0 0 16 16" width="18" height="18"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>Warning</p>
213-
<p>Dead code is technical debt. Use the quality check script to find and eliminate unused logic regularly.</p>
187+
<p>This section is for those who want to understand the framework’s internal organs. You don’t need to know this to <em>use</em> RustAPI, but it helps if you want to <em>master</em> it.</p>
214188
</blockquote>
189+
<p>RustAPI is a collection of focused, interoperable crates. Each crate has a specific philosophy and “Lens” through which it views the world.</p>
190+
<ul>
191+
<li><strong><a href="rustapi_core.html">rustapi-core</a></strong>: The Engine</li>
192+
<li><strong><a href="rustapi_macros.html">rustapi-macros</a></strong>: The Magic</li>
193+
<li><strong><a href="rustapi_validation.html">rustapi-validate</a></strong>: The Gatekeeper</li>
194+
</ul>
215195

216196
</main>
217197

218198
<nav class="nav-wrapper" aria-label="Page navigation">
219199
<!-- Mobile navigation buttons -->
220-
<a rel="prev" href="../architecture/performance.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
200+
<a rel="prev" href="../concepts/testing.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
221201
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg></span>
222202
</a>
223203

224-
<a rel="next prefetch" href="../recipes/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
204+
<a rel="next prefetch" href="../crates/rustapi_core.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
225205
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/></svg></span>
226206
</a>
227207

@@ -231,11 +211,11 @@ <h2 id="continuous-integration-strategy"><a class="header" href="#continuous-int
231211
</div>
232212

233213
<nav class="nav-wide-wrapper" aria-label="Page navigation">
234-
<a rel="prev" href="../architecture/performance.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
214+
<a rel="prev" href="../concepts/testing.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
235215
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg></span>
236216
</a>
237217

238-
<a rel="next prefetch" href="../recipes/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
218+
<a rel="next prefetch" href="../crates/rustapi_core.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
239219
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/></svg></span>
240220
</a>
241221
</nav>

0 commit comments

Comments
 (0)