docs: add architecture and veins documentation
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- System overview, artery hierarchy, build flow, room config diagrams
- Veins docs: Jira, Slack, Google OAuth
- Shunts docs: MercadoPago mock
- DOT source files with generated SVGs
- HTML viewers with navigation and full-screen mode

Solves:
- Freelance work standardization
- Missing infrastructure replication (shunts)
- Reliable testing environment (BDD -> Gherkin -> Tests)
This commit is contained in:
buenosairesam
2026-01-02 22:09:13 -03:00
parent 05e7ead081
commit 22356fed66
22 changed files with 2887 additions and 0 deletions

172
docs/veins/index.html Normal file
View File

@@ -0,0 +1,172 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Veins & Shunts - Soleprint</title>
<link rel="stylesheet" href="../architecture/styles.css" />
</head>
<body>
<header>
<h1>Veins & Shunts</h1>
<p class="subtitle">API Connectors & Mock Services</p>
</header>
<main>
<section class="findings-section">
<p style="margin-bottom: 1rem;"><a href="../index.html" style="color: var(--accent);">← Back to Docs</a></p>
</section>
<!-- Veins -->
<section class="graph-section">
<h2 style="color: var(--accent); margin-bottom: 1rem;">Veins (Stateless API Connectors)</h2>
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">
Veins are stateless connectors to external APIs. They handle authentication and provide a clean interface for the rest of the application.
</p>
</section>
<section class="graph-section" id="jira">
<div class="graph-header-row">
<h2>Jira</h2>
<a href="graph.html?g=jira" class="view-btn">View Full</a>
</div>
<a href="graph.html?g=jira" class="graph-preview">
<img src="jira.svg" alt="Jira Vein" />
</a>
<div class="graph-details">
<p>Connect to Jira Cloud for issue tracking.</p>
<h4>Capabilities</h4>
<ul>
<li>Get/create/update issues</li>
<li>JQL search</li>
<li>Transition issues between statuses</li>
<li>List projects</li>
</ul>
<h4>Auth</h4>
<p>API Token (Basic Auth with email + token)</p>
</div>
</section>
<section class="graph-section" id="slack">
<div class="graph-header-row">
<h2>Slack</h2>
<a href="graph.html?g=slack" class="view-btn">View Full</a>
</div>
<a href="graph.html?g=slack" class="graph-preview">
<img src="slack.svg" alt="Slack Vein" />
</a>
<div class="graph-details">
<p>Send messages and interact with Slack workspaces.</p>
<h4>Capabilities</h4>
<ul>
<li>Post messages to channels</li>
<li>List channels and users</li>
<li>Upload files</li>
<li>Webhook integration</li>
</ul>
<h4>Auth</h4>
<p>Bot Token (Bearer)</p>
</div>
</section>
<section class="graph-section" id="google">
<div class="graph-header-row">
<h2>Google</h2>
<a href="graph.html?g=google" class="view-btn">View Full</a>
</div>
<a href="graph.html?g=google" class="graph-preview">
<img src="google.svg" alt="Google Vein" />
</a>
<div class="graph-details">
<p>Access Google Sheets, Calendar, Drive via OAuth 2.0.</p>
<h4>Capabilities</h4>
<ul>
<li>Read/write Sheets</li>
<li>Calendar events</li>
<li>Drive file access</li>
</ul>
<h4>Auth</h4>
<p>OAuth 2.0 with refresh tokens</p>
</div>
</section>
<!-- Shunts -->
<section class="graph-section" style="margin-top: 3rem;">
<h2 style="color: var(--accent); margin-bottom: 1rem;">Shunts (Mock Connectors)</h2>
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">
Shunts are fake connectors for testing. They mimic real APIs but let you control the responses.
Perfect for testing payment flows, webhook handling, and integration scenarios without needing real credentials.
</p>
</section>
<section class="graph-section" id="mercadopago">
<div class="graph-header-row">
<h2>MercadoPago Shunt</h2>
<a href="graph.html?g=mercadopago-shunt" class="view-btn">View Full</a>
</div>
<a href="graph.html?g=mercadopago-shunt" class="graph-preview">
<img src="mercadopago-shunt.svg" alt="MercadoPago Shunt" />
</a>
<div class="graph-details">
<p>Mock MercadoPago payment API for testing payment flows.</p>
<h4>Features</h4>
<ul>
<li>Fake payment creation</li>
<li>Configurable responses (approved/pending/rejected)</li>
<li>Webhook callbacks</li>
<li>Config UI to set next response</li>
</ul>
<h4>Use Case</h4>
<p>Test checkout flows without real payments. Set the shunt to return "approved" or "rejected" and verify your app handles each case.</p>
</div>
</section>
<!-- Pattern -->
<section class="tech-section">
<h2>Vein Pattern</h2>
<div class="tech-grid">
<div class="tech-column">
<h3>Structure</h3>
<ul>
<li>artery/veins/{name}/</li>
<li>__init__.py (exports)</li>
<li>client.py (API client)</li>
<li>models.py (types)</li>
<li>templates/ (test UI)</li>
</ul>
</div>
<div class="tech-column">
<h3>Base Class</h3>
<ul>
<li>Extends artery/veins/base.py</li>
<li>Common auth handling</li>
<li>Request/response logging</li>
<li>Error handling</li>
</ul>
</div>
<div class="tech-column">
<h3>OAuth</h3>
<ul>
<li>artery/oauth.py</li>
<li>Token storage</li>
<li>Refresh flow</li>
<li>Callback handling</li>
</ul>
</div>
<div class="tech-column">
<h3>Config</h3>
<ul>
<li>cfg/{room}/data/veins.json</li>
<li>Per-room credentials</li>
<li>Enable/disable veins</li>
</ul>
</div>
</div>
</section>
</main>
<footer>
<p>Soleprint - Veins & Shunts Documentation</p>
</footer>
</body>
</html>