Skip to content

Commit c4ce975

Browse files
committed
f
1 parent 5c90e62 commit c4ce975

2 files changed

Lines changed: 137 additions & 118 deletions

File tree

Lines changed: 134 additions & 0 deletions
Loading

README.md

Lines changed: 3 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -47,124 +47,9 @@ A Rack middleware implementing the JSON-RPC 2.0 protocol that integrates easily
4747

4848
The gem integrates seamlessly into your Rack-based application:
4949

50-
<svg viewBox="0 0 800 420" xmlns="http://www.w3.org/2000/svg" style="width:100%;display:block;">
51-
<defs>
52-
<pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse">
53-
<circle cx="1" cy="1" r="0.9" fill="rgba(11,13,11,0.10)"/>
54-
</pattern>
55-
<clipPath id="stack-clip">
56-
<rect x="52" y="64" width="700" height="288" rx="6"/>
57-
</clipPath>
58-
</defs>
59-
60-
<!-- Background -->
61-
<rect width="800" height="420" fill="#faf7f2"/>
62-
<rect width="800" height="420" fill="url(#dots)" opacity="0.6"/>
63-
64-
<!-- Direction indicator -->
65-
<text x="28" y="52" fill="#78716c" font-size="8" font-family="'Geist Mono', monospace"
66-
text-anchor="middle" letter-spacing="0.10em">APP</text>
67-
<line x1="28" y1="60" x2="28" y2="340" stroke="rgba(120,113,108,0.35)" stroke-width="0.8"/>
68-
<text x="28" y="356" fill="#78716c" font-size="8" font-family="'Geist Mono', monospace"
69-
text-anchor="middle" letter-spacing="0.10em">HTTP</text>
70-
71-
<!-- Stack layers (clipped to rounded container) -->
72-
<g clip-path="url(#stack-clip)">
73-
74-
<!-- Layer fills -->
75-
<rect x="52" y="64" width="700" height="72" fill="#faf7f2"/>
76-
<rect x="52" y="136" width="700" height="72" fill="rgba(181,82,58,0.08)"/>
77-
<rect x="52" y="208" width="700" height="72" fill="#f2ede4"/>
78-
<rect x="52" y="280" width="700" height="72" fill="#faf7f2"/>
79-
80-
<!-- Hairline dividers -->
81-
<line x1="52" y1="136" x2="752" y2="136" stroke="rgba(28,25,23,0.12)" stroke-width="1"/>
82-
<line x1="52" y1="208" x2="752" y2="208" stroke="rgba(28,25,23,0.12)" stroke-width="1"/>
83-
<line x1="52" y1="280" x2="752" y2="280" stroke="rgba(28,25,23,0.12)" stroke-width="1"/>
84-
85-
<!-- Focal left accent bar -->
86-
<rect x="52" y="136" width="4" height="72" fill="#b5523a"/>
87-
88-
<!-- ===== LAYER 4: Your Application (y=64, center y=100) ===== -->
89-
<!-- Index tag -->
90-
<rect x="72" y="92" width="36" height="16" rx="2"
91-
fill="transparent" stroke="rgba(28,25,23,0.28)" stroke-width="0.8"/>
92-
<text x="90" y="100" fill="rgba(28,25,23,0.55)" font-size="8"
93-
font-family="'Geist Mono', monospace" text-anchor="middle"
94-
dominant-baseline="middle" letter-spacing="0.08em">APP</text>
95-
<!-- Layer name -->
96-
<text x="124" y="100" fill="#1c1917" font-size="16" font-weight="600"
97-
font-family="'Geist', sans-serif" dominant-baseline="middle">Your Application</text>
98-
<!-- Framework mini-boxes -->
99-
<rect x="364" y="88" width="64" height="24" rx="4"
100-
fill="white" stroke="rgba(28,25,23,0.18)" stroke-width="1"/>
101-
<text x="396" y="100" fill="#57534e" font-size="12" font-weight="500"
102-
font-family="'Geist', sans-serif" text-anchor="middle" dominant-baseline="middle">Rails</text>
103-
<rect x="436" y="88" width="72" height="24" rx="4"
104-
fill="white" stroke="rgba(28,25,23,0.18)" stroke-width="1"/>
105-
<text x="472" y="100" fill="#57534e" font-size="12" font-weight="500"
106-
font-family="'Geist', sans-serif" text-anchor="middle" dominant-baseline="middle">Sinatra</text>
107-
<rect x="516" y="88" width="128" height="24" rx="4"
108-
fill="white" stroke="rgba(28,25,23,0.18)" stroke-width="1"/>
109-
<text x="580" y="100" fill="#57534e" font-size="12" font-weight="500"
110-
font-family="'Geist', sans-serif" text-anchor="middle" dominant-baseline="middle">Other Rack</text>
111-
112-
<!-- ===== LAYER 3: JSON-RPC Middleware — FOCAL (y=136, center y=172) ===== -->
113-
<!-- Index tag -->
114-
<rect x="72" y="164" width="32" height="16" rx="2"
115-
fill="transparent" stroke="rgba(181,82,58,0.50)" stroke-width="0.8"/>
116-
<text x="88" y="172" fill="rgba(181,82,58,0.80)" font-size="8"
117-
font-family="'Geist Mono', monospace" text-anchor="middle"
118-
dominant-baseline="middle" letter-spacing="0.08em">MW</text>
119-
<!-- Layer name -->
120-
<text x="124" y="172" fill="#b5523a" font-size="16" font-weight="600"
121-
font-family="'Geist', sans-serif" dominant-baseline="middle">JSON-RPC Middleware</text>
122-
<!-- Sublabel (two lines, right-aligned) -->
123-
<text x="744" y="164" fill="#b5523a" font-size="8"
124-
font-family="'Geist Mono', monospace" text-anchor="end">jsonrpc-middleware</text>
125-
<text x="744" y="180" fill="#78716c" font-size="8"
126-
font-family="'Geist Mono', monospace" text-anchor="end">JSON-RPC 2.0 spec</text>
127-
128-
<!-- ===== LAYER 2: Rack (y=208, center y=244) ===== -->
129-
<!-- Index tag -->
130-
<rect x="72" y="236" width="40" height="16" rx="2"
131-
fill="transparent" stroke="rgba(87,83,78,0.28)" stroke-width="0.8"/>
132-
<text x="92" y="244" fill="rgba(87,83,78,0.65)" font-size="8"
133-
font-family="'Geist Mono', monospace" text-anchor="middle"
134-
dominant-baseline="middle" letter-spacing="0.08em">RACK</text>
135-
<!-- Layer name -->
136-
<text x="124" y="244" fill="#1c1917" font-size="16" font-weight="600"
137-
font-family="'Geist', sans-serif" dominant-baseline="middle">Rack</text>
138-
<!-- Sublabel -->
139-
<text x="744" y="244" fill="#78716c" font-size="8"
140-
font-family="'Geist Mono', monospace" text-anchor="end"
141-
dominant-baseline="middle">rack specification</text>
142-
143-
<!-- ===== LAYER 1: HTTP (y=280, center y=316) ===== -->
144-
<!-- Index tag -->
145-
<rect x="72" y="308" width="40" height="16" rx="2"
146-
fill="transparent" stroke="rgba(87,83,78,0.22)" stroke-width="0.8"/>
147-
<text x="92" y="316" fill="rgba(87,83,78,0.55)" font-size="8"
148-
font-family="'Geist Mono', monospace" text-anchor="middle"
149-
dominant-baseline="middle" letter-spacing="0.08em">HTTP</text>
150-
<!-- Layer name -->
151-
<text x="124" y="316" fill="#1c1917" font-size="16" font-weight="600"
152-
font-family="'Geist', sans-serif" dominant-baseline="middle">HTTP</text>
153-
<!-- Sublabel -->
154-
<text x="744" y="316" fill="#78716c" font-size="8"
155-
font-family="'Geist Mono', monospace" text-anchor="end"
156-
dominant-baseline="middle">transport layer</text>
157-
158-
</g>
159-
160-
<!-- Outer stack border (above clip, rounded corners visible) -->
161-
<rect x="52" y="64" width="700" height="288" rx="6"
162-
fill="none" stroke="rgba(28,25,23,0.25)" stroke-width="1"/>
163-
164-
<!-- Focal layer outline (above clip) -->
165-
<rect x="52" y="136" width="700" height="72"
166-
fill="none" stroke="#b5523a" stroke-width="1.2"/>
167-
</svg>
50+
<p align="center">
51+
<img alt="Architecture diagram" src="./.github/images/architecture-diagram.svg" width="800" height="400" style="max-width: 100%;">
52+
</p>
16853

16954
## 📦 Installation
17055

0 commit comments

Comments
 (0)