Skip to content

Commit 5ece64f

Browse files
committed
sandbox changes
1 parent ccda124 commit 5ece64f

File tree

5 files changed

+26
-15
lines changed

5 files changed

+26
-15
lines changed

sandbox/README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ npx serve .
4040

4141
## 📦 Example Categories
4242

43-
**75+ interactive examples across 14 feature categories**
43+
**89 interactive examples across 16 feature categories**
4444

4545
### 📦 **Basic Usage**
4646
Core HTTP operations with Luminara's helper methods:
@@ -167,6 +167,13 @@ Automatic in-flight duplicate prevention (10 examples):
167167
- **Error Propagation** - Failed requests share errors with duplicates
168168
- **Integration with Retry** - Deduplication + retry work together
169169

170+
### 🍪 **Cookie Jar Plugin**
171+
Server-side cookie management with automatic Cookie/Set-Cookie header handling (4 examples):
172+
- **Basic Cookie Management** - Automatic cookie storage and transmission
173+
- **Manual Cookie Operations** - Direct access to cookie jar for CRUD operations
174+
- **Shared Cookie Jar** - Share cookies across multiple client instances
175+
- **SSR Usage Pattern** - Server-side rendering cookie persistence
176+
170177
## 🏗️ Architecture
171178

172179
### **Separation of Concerns**
@@ -192,7 +199,9 @@ sandbox/
192199
├── verboseLogging.js # 📝 Debugging and tracing
193200
├── customDriver.js # 🚗 Driver extensibility
194201
├── debouncer.js # ⏱️ Request debouncing
195-
└── deduplicator.js # 🔄 Duplicate prevention
202+
├── deduplicator.js # 🔄 Duplicate prevention
203+
├── requestHedging.js # 🏎️ Request hedging
204+
└── cookieJarPlugin.js # 🍪 Cookie jar plugin
196205
```
197206

198207
### **Layer Responsibilities**
@@ -298,13 +307,17 @@ The sandbox demonstrates the universal API that works consistently across all th
298307
3. **⏱️ Timeout** - Understand timeout handling
299308
4. **🔄 Retry** - Explore retry mechanisms
300309
5. **📈 Backoff Strategies** - Master advanced retry patterns
301-
6. **� Rate Limiting** - Control request flow with token bucket algorithm
302-
7. **�📦 Response Types** - Learn response handling options
303-
8. **🔌 Interceptors** - Implement request/response middleware
304-
9. **🛠️ Error Handling** - Master comprehensive error scenarios
305-
10. **📊 Stats System** - Explore real-time metrics and analytics
306-
10. **📝 Verbose Logging** - Learn debugging and tracing techniques
307-
11. **�🚗 Custom Driver** - Explore extensibility options
310+
6. **🚦 Rate Limiting** - Control request flow with token bucket algorithm
311+
7. **🏎️ Request Hedging** - Optimize latency with concurrent requests
312+
8. **📦 Response Types** - Learn response handling options
313+
9. **🔌 Interceptors** - Implement request/response middleware
314+
10. **🛠️ Error Handling** - Master comprehensive error scenarios
315+
11. **📊 Stats System** - Explore real-time metrics and analytics
316+
12. **📝 Verbose Logging** - Learn debugging and tracing techniques
317+
13. **🚗 Custom Driver** - Explore extensibility options
318+
14. **⏱️ Debouncer** - Prevent redundant rapid-fire requests
319+
15. **🔄 Request Deduplicator** - Eliminate concurrent duplicate requests
320+
16. **🍪 Cookie Jar Plugin** - Server-side cookie management
308321

309322
Each category builds upon previous concepts, providing a comprehensive understanding of Luminara's capabilities.
310323

sandbox/examples/cookieJarPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createLuminara } from '../../dist/index.mjs';
22

33
export const cookieJarPlugin = {
44
title: '🍪 Cookie Jar Plugin',
5+
docUrl: 'https://github.com/miller-28/luminara/blob/master/docs/plugins/cookie-jar.md',
56
examples: [
67
{
78
id: 'cookie-jar-basic',

sandbox/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ <h3>⚡ Core Architecture</h3>
9999
<h3>🔄 Request Lifecycle (Orchestration Layer)</h3>
100100
<ul>
101101
<li><a href="#interceptor-request" class="feature-link"><strong>Enhanced interceptor architecture</strong></a> - Deterministic order, mutable context, retry-aware</li>
102+
<li><a href="#cookie-jar-basic" class="feature-link"><strong>Plugin system</strong></a> - Extensible architecture with official plugins (<a href="https://www.npmjs.com/package/luminara-cookie-jar" target="_blank" rel="noopener noreferrer" class="link">cookie-jar</a>)</li>
102103
<li><a href="#stats-enabled-default" class="feature-link"><strong>Comprehensive stats system</strong></a> - Real-time metrics, analytics, and query interface</li>
103104
<li><a href="#verbose-comprehensive" class="feature-link"><strong>Verbose logging system</strong></a> - Detailed debugging and request tracing</li>
104105
</ul>

sandbox/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ class SandboxUI {
302302
feature_title: feature.title
303303
});
304304
}
305-
const docUrl = `https://github.com/miller-28/luminara/tree/master/docs/features/${docFilename}.md`;
305+
// Use custom docUrl if provided, otherwise use default pattern
306+
const docUrl = feature.docUrl || `https://github.com/miller-28/luminara/tree/master/docs/features/${docFilename}.md`;
306307
window.open(docUrl, '_blank', 'noopener,noreferrer');
307308
};
308309
headerButtonContainer.appendChild(docsBtn);

sandbox/sitemap.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<changefreq>weekly</changefreq>
66
<priority>1.0</priority>
77
</url>
8-
<url>
9-
<loc>https://luminara.website/docs/</loc>
10-
<changefreq>weekly</changefreq>
11-
<priority>0.8</priority>
12-
</url>
138
<url>
149
<loc>https://luminara.website/benchmark</loc>
1510
<changefreq>weekly</changefreq>

0 commit comments

Comments
 (0)