<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DevPortal - Developer Experience</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
:root {
--primary: #2563eb;
--primary-dark: #1d4ed8;
--secondary: #64748b;
--success: #10b981;
--warning: #f59e0b;
--danger: #ef4444;
--light: #f8fafc;
--dark: #1e293b;
--border: #e2e8f0;
--card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--transition: all 0.2s ease;
}
body {
background-color: var(--light);
color: var(--dark);
line-height: 1.6;
display: flex;
min-height: 100vh;
}
/* Layout */
.app-container {
display: flex;
width: 100%;
}
/* Sidebar */
.sidebar {
width: 260px;
background: white;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
transition: var(--transition);
position: fixed;
height: 100vh;
z-index: 100;
}
.sidebar-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 12px;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-size: 1.25rem;
color: var(--primary);
}
.logo i {
font-size: 1.5rem;
}
.nav-menu {
flex: 1;
padding: 1rem 0;
overflow-y: auto;
}
.nav-item {
display: flex;
align-items: center;
padding: 0.75rem 1.5rem;
color: var(--secondary);
text-decoration: none;
transition: var(--transition);
border-left: 3px solid transparent;
cursor: pointer;
}
.nav-item:hover {
background-color: rgba(37, 99, 235, 0.05);
color: var(--primary);
}
.nav-item.active {
border-left-color: var(--primary);
background-color: rgba(37, 99, 235, 0.05);
color: var(--primary);
font-weight: 600;
}
.nav-item i {
width: 24px;
margin-right: 12px;
text-align: center;
}
.nav-category {
padding: 1.5rem 1rem 0.5rem;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--secondary);
font-weight: 600;
}
.sidebar-footer {
padding: 1rem 1.5rem;
border-top: 1px solid var(--border);
font-size: 0.875rem;
color: var(--secondary);
text-align: center;
}
/* Main Content */
.main-content {
flex: 1;
margin-left: 260px;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Header */
.header {
background: white;
border-bottom: 1px solid var(--border);
padding: 1rem 2rem;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 50;
}
.search-container {
flex: 1;
max-width: 600px;
position: relative;
}
.search-input {
width: 100%;
padding: 0.75rem 1rem 0.75rem 2.5rem;
border: 1px solid var(--border);
border-radius: 0.5rem;
font-size: 1rem;
transition: var(--transition);
}
.search-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.search-icon {
position: absolute;
left: 0.75rem;
top: 50%;
transform: translateY(-50%);
color: var(--secondary);
}
.header-actions {
display: flex;
align-items: center;
gap: 1rem;
margin-left: 2rem;
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
font-size: 1.25rem;
color: var(--dark);
cursor: pointer;
}
/* Content Area */
.content {
flex: 1;
padding: 2rem;
}
.page-title {
font-size: 1.75rem;
margin-bottom: 1.5rem;
color: var(--dark);
}
.page-description {
color: var(--secondary);
margin-bottom: 2rem;
font-size: 1.1rem;
}
/* Content Type Tabs */
.tabs {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
border-bottom: 1px solid var(--border);
}
.tab {
padding: 0.75rem 1rem;
background: none;
border: none;
border-bottom: 3px solid transparent;
color: var(--secondary);
font-weight: 600;
cursor: pointer;
transition: var(--transition);
font-size: 1rem;
}
.tab:hover {
color: var(--primary);
}
.tab.active {
color: var(--primary);
border-bottom-color: var(--primary);
}
/* Cards Grid */
.cards-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.card {
background: white;
border-radius: 0.75rem;
box-shadow: var(--card-shadow);
padding: 1.5rem;
transition: var(--transition);
border: 1px solid var(--border);
cursor: pointer;
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
border-color: var(--primary);
}
.card-type {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 1rem;
font-size: 0.75rem;
font-weight: 600;
margin-bottom: 0.75rem;
}
.type-runbook {
background-color: rgba(37, 99, 235, 0.1);
color: var(--primary);
}
.type-golden-path {
background-color: rgba(16, 185, 129, 0.1);
color: var(--success);
}
.type-diagram {
background-color: rgba(245, 158, 11, 0.1);
color: var(--warning);
}
.card-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 0.75rem;
color: var(--dark);
}
.card-description {
color: var(--secondary);
margin-bottom: 1rem;
font-size: 0.9375rem;
}
.card-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
color: var(--secondary);
padding-top: 0.75rem;
border-top: 1px solid var(--border);
}
.card-tags {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.tag {
background-color: var(--light);
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
color: var(--secondary);
}
/* Detail View */
.detail-view {
display: none;
background: white;
border-radius: 0.75rem;
box-shadow: var(--card-shadow);
border: 1px solid var(--border);
}
.detail-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border);
}
.detail-title-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1rem;
}
.detail-title {
font-size: 1.5rem;
font-weight: 600;
color: var(--dark);
}
.detail-type {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 1rem;
font-size: 0.875rem;
font-weight: 600;
}
.detail-meta {
display: flex;
gap: 1.5rem;
color: var(--secondary);
font-size: 0.875rem;
}
.detail-content {
padding: 1.5rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: none;
border: none;
color: var(--primary);
font-weight: 600;
cursor: pointer;
padding: 0.5rem 0;
margin-bottom: 1rem;
}
.back-button:hover {
text-decoration: underline;
}
/* Runbook specific */
.runbook-steps {
counter-reset: step;
list-style: none;
}
.runbook-step {
position: relative;
padding-left: 2.5rem;
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px dashed var(--border);
}
.runbook-step:last-child {
border-bottom: none;
}
.runbook-step::before {
counter-increment: step;
content: counter(step);
position: absolute;
left: 0;
top: 0.25rem;
width: 1.75rem;
height: 1.75rem;
background-color: var(--primary);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 0.875rem;
}
.step-code {
background-color: var(--light);
padding: 1rem;
border-radius: 0.5rem;
margin: 0.75rem 0;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 0.875rem;
overflow-x: auto;
}
/* Golden Path specific */
.golden-path-checkbox {
display: flex;
align-items: flex-start;
gap: 0.75rem;
margin-bottom: 1rem;
padding: 1rem;
border-radius: 0.5rem;
background-color: var(--light);
cursor: pointer;
transition: var(--transition);
}
.golden-path-checkbox:hover {
background-color: rgba(37, 99, 235, 0.05);
}
.golden-path-checkbox input {
margin-top: 0.25rem;
}
.golden-path-label {
flex: 1;
}
.golden-path-title {
font-weight: 600;
margin-bottom: 0.25rem;
}
.completion-bar {
margin-top: 2rem;
padding: 1rem;
background-color: var(--light);
border-radius: 0.5rem;
}
.completion-label {
display: flex;
justify-content: space-between;
margin-bottom: 0.5rem;
font-weight: 600;
}
.progress-bar {
height: 0.5rem;
background-color: #e2e8f0;
border-radius: 0.25rem;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: var(--success);
width: 0%;
transition: width 0.3s ease;
}
/* Diagram specific */
.diagram-container {
margin: 1.5rem 0;
border: 1px solid var(--border);
border-radius: 0.5rem;
padding: 1rem;
background-color: var(--light);
text-align: center;
}
.diagram-img {
max-width: 100%;
max-height: 500px;
border-radius: 0.25rem;
}
/* Responsive */
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.active {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
.mobile-menu-btn {
display: block;
}
.header {
padding: 1rem;
}
.content {
padding: 1rem;
}
.cards-grid {
grid-template-columns: 1fr;
}
}
/* Utility */
.hidden {
display: none;
}
.fade-in {
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
</style>
</head>
<body>
<div class="app-container">
<!-- Sidebar -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-header">
<div class="logo">
<i class="fas fa-code"></i>
<span>DevPortal</span>
</div>
</div>
<nav class="nav-menu">
<div class="nav-category">Content</div>
<a class="nav-item active" data-page="home">
<i class="fas fa-home"></i>
<span>Home</span>
</a>
<a class="nav-item" data-page="runbooks">
<i class="fas fa-clipboard-list"></i>
<span>Runbooks</span>
</a>
<a class="nav-item" data-page="golden-paths">
<i class="fas fa-route"></i>
<span>Golden Paths</span>
</a>
<a class="nav-item" data-page="diagrams">
<i class="fas fa-project-diagram"></i>
<span>Architecture Diagrams</span>
</a>
<div class="nav-category">Resources</div>
<a class="nav-item" href="#">
<i class="fas fa-book"></i>
<span>Documentation</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-users"></i>
<span>Community</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-cog"></i>
<span>Settings</span>
</a>
</nav>
<div class="sidebar-footer">
<p>v2.4.1 • Developer Experience Team</p>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<!-- Header -->
<header class="header">
<button class="mobile-menu-btn" id="mobileMenuBtn">
<i class="fas fa-bars"></i>
</button>
<div class="search-container">
<i class="fas fa-search search-icon"></i>
<input type="text" class="search-input" id="searchInput" placeholder="Search runbooks, golden paths, diagrams...">
</div>
<div class="header-actions">
<button title="Notifications">
<i class="far fa-bell" style="font-size: 1.25rem; color: var(--secondary);"></i>
</button>
<button title="Help">
<i class="far fa-question-circle" style="font-size: 1.25rem; color: var(--secondary);"></i>
</button>
<div class="user-avatar" title="Profile">
<img src="https://ui-avatars.com/api/?name=Developer&background=2563eb&color=fff"
alt="User" style="width: 40px; height: 40px; border-radius: 50%;">
</div>
</div>
</header>
<!-- Content Area -->
<div class="content" id="contentArea">
<!-- Home Page -->
<section id="homePage" class="page fade-in">
<h1 class="page-title">Developer Experience Portal</h1>
<p class="page-description">
Find runbooks, golden paths, and architecture diagrams to accelerate your development workflow.
</p>
<div class="tabs">
<button class="tab active" data-filter="all">All</button>
<button class="tab" data-filter="runbooks">Runbooks</button>
<button class="tab" data-filter="golden-paths">Golden Paths</button>
<button class="tab" data-filter="diagrams">Diagrams</button>
</div>
<div class="cards-grid" id="homeGrid">
<!-- Cards will be inserted here dynamically -->
</div>
</section>
<!-- Runbooks Page -->
<section id="runbooksPage" class="page hidden fade-in">
<h1 class="page-title">Runbooks</h1>
<p class="page-description">
Step-by-step guides for operational tasks, troubleshooting, and incident response.
</p>
<div class="cards-grid" id="runbooksGrid">
<!-- Cards will be inserted here dynamically -->
</div>
</section>
<!-- Golden Paths Page -->
<section id="goldenPathsPage" class="page hidden fade-in">
<h1 class="page-title">Golden Paths</h1>
<p class="page-description">
Recommended end-to-end workflows for common development scenarios.
</p>
<div class="cards-grid" id="goldenPathsGrid">
<!-- Cards will be inserted here dynamically -->
</div>
</section>
<!-- Diagrams Page -->
<section id="diagramsPage" class="page hidden fade-in">
<h1 class="page-title">Architecture Diagrams</h1>
<p class="page-description">
Visual representations of system architecture, data flows, and infrastructure.
</p>
<div class="cards-grid" id="diagramsGrid">
<!-- Cards will be inserted here dynamically -->
</div>
</section>
<!-- Detail View -->
<div class="detail-view hidden" id="detailView">
<button class="back-button" id="backButton">
<i class="fas fa-arrow-left"></i>
<span>Back to list</span>
</button>
<div class="detail-header">
<div class="detail-title-row">
<h2 class="detail-title" id="detailTitle"></h2>
<span class="detail-type" id="detailType"></span>
</div>
<div class="detail-meta">
<span id="detailCategory"></span>
<span id="detailUpdated"></span>
<span id="detailAuthor"></span>
</div>
</div>
<div class="detail-content" id="detailContent">
<!-- Content will be inserted dynamically -->
</div>
</div>
</div>
</main>
</div>
<!-- Overlay for mobile sidebar -->
<div id="overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99;"></div>
<script>
// Sample Data
const contentData = {
runbooks: [
{
id: 1,
title: "Database Connection Failure Troubleshooting",
description: "Step-by-step guide to diagnose and resolve database connectivity issues in production.",
category: "Infrastructure",
tags: ["database", "troubleshooting", "mysql"],
updated: "2 days ago",
author: "Platform Team",
content: `
<h3>Prerequisites</h3>
<p>Ensure you have the following tools installed: <code>mysql-client</code>, <code>nc</code>, <code>dig</code>.</p>
<h3>Step 1: Verify Network Connectivity</h3>
<p>Check if the database host is reachable:</p>
<div class="step-code">$ ping db-prod.example.com</div>
<p>If ping fails, check firewall rules or network configuration.</p>
<h3>Step 2: Test Port Access</h3>
<p>Use <code>nc</code> to verify the database port (3306) is open:</p>
<div class="step-code">$ nc -zv db-prod.example.com 3306</div>
<h3>Step 3: Check Database Service Status</h3>
<p>SSH into the database server (if authorized) and check service status:</p>
<div class="step-code">$ systemctl status mysql</div>
<h3>Step 4: Validate Credentials</h3>
<p>Test authentication with the mysql client:</p>
<div class="step-code">$ mysql -h db-prod.example.com -u admin -p</div>
<h3>Step 5: Review Logs</h3>
<p>Check database logs for errors:</p>
<div class="step-code">$ tail -f /var/log/mysql/error.log</div>
<h3>Escalation</h3>
<p>If the issue persists after these steps, escalate to the Database On-Call team with the collected diagnostic information.</p>
`
},
{
id: 2,
title: "API Rate Limit Exceeded Response",
description: "How to handle and respond to API rate limit errors from third-party services.",
category: "API",
tags: ["api", "rate-limiting", "errors"],
updated: "1 week ago",
author: "API Team",
content: `
<h3>Understanding Rate Limits</h3>
<p>Third-party APIs often implement rate limiting to prevent abuse. When exceeded, they typically return HTTP 429 status code.</p>
<h3>Step 1: Detect Rate Limit Error</h3>
<p>Check for HTTP 429 status or specific error codes in the response.</p>
<div class="step-code">if (response.status === 429) { /* handle */ }</div>
<h3>Step 2: Read Retry-After Header</h3>
<p>The API should include a <code>Retry-After</code> header indicating how long to wait:</p>
<div class="step-code">const retryAfter = response.headers.get('Retry-After');</div>
<h3>Step 3: Implement Exponential Backoff</h3>
<p>If no header is provided, use exponential backoff with jitter:</p>
<div class="step-code">const delay = Math.random() * (2 ** attempt) * 1000;</div>
<h3>Step 4: Circuit Breaker Pattern</h3>
<p>For repeated failures, implement a circuit breaker to stop requests temporarily:</p>
<div class="step-code">// Pseudocode
if (failureRate > threshold) {
circuitBreaker.open();
}</div>
<h3>Step 5: Cache Responses</h3>
<p>Consider caching API responses to reduce duplicate calls.</p>
<h3>Monitoring</h3>
<p>Set up alerts for rate limit errors to detect patterns and adjust request rates.</p>
`
},
{
id: 3,
title: "Kubernetes Pod CrashLoopBackOff Recovery",
description: "Recover from Kubernetes pods that are repeatedly crashing and restarting.",
category: "Kubernetes",
tags: ["k8s", "containers", "deployment"],
updated: "3 days ago",
author: "SRE Team",
content: `
<h3>Symptom</h3>
<p>Pod status shows <code>CrashLoopBackOff</code> indicating the container repeatedly exits with failure.</p>
<h3>Step 1: Check Pod Logs</h3>
<div class="step-code">$ kubectl logs <pod-name> --previous</div>
<p>The <code>--previous</code> flag shows logs from the previous container instance.</p>
<h3>Step 2: Describe the Pod</h3>
<div class="step-code">$ kubectl describe pod <pod-name></div>
<p>Look for events, OOMKilled status, or configuration errors.</p>
<h3>Step 3: Common Causes</h3>
<ul>
<li><strong>Memory Limit Exceeded:</strong> Increase memory limits or optimize application memory usage.</li>
<li><strong>Missing Environment Variables:</strong> Check ConfigMap/Secret references.</li>
<li><strong>Failed Health Checks:</strong> Adjust liveness/readiness probes.</li>
<li><strong>Permission Issues:</strong> Check SecurityContext and volume mounts.</li>
</ul>
<h3>Step 4: Test with Debug Image</h3>
<p>Temporarily replace the container image with a debug image to investigate:</p>
<div class="step-code">kubectl set image pod/<pod-name> container-name=busybox:latest</div>
<h3>Step 5: Recreate Pod</h3>
<p>After fixing the issue, delete the pod to let the deployment recreate it:</p>
<div class="step-code">$ kubectl delete pod <pod-name></div>
`
},
{
id: 4,
title: "SSL Certificate Expiration Renewal",
description: "Renew and deploy SSL/TLS certificates before they expire.",
category: "Security",
tags: ["ssl", "tls", "certificates", "security"],
updated: "1 month ago",
author: "Security Team",
content: `
<h3>Monitoring Expiration</h3>
<p>Set up alerts for certificates expiring within 30 days.</p>
<h3>Step 1: Check Current Certificates</h3>
<div class="step-code">$ openssl x509 -in certificate.crt -text -noout | grep -A2 "Validity"</div>
<h3>Step 2: Generate CSR (if needed)</h3>
<div class="step-code">$ openssl req -new -newkey rsa:2048 -nodes -keyout private.key -out request.csr</div>
<h3>Step 3: Obtain New Certificate</h3>
<p>Submit CSR to your CA or use Let's Encrypt:</p>
<div class="step-code">$ certbot certonly --nginx -d example.com</div>
<h3>Step 4: Deploy New Certificate</h3>
<p>Update your load balancer, web server, or Kubernetes secret with the new certificate.</p>
<h3>Step 5: Verify Deployment</h3>
<div class="step-code">$ curl -I https://example.com | grep "HTTP/2 200"</div>
<div class="step-code">$ openssl s_client -connect example.com:443 -showcerts</div>
<h3>Step 6: Revoke Old Certificate</h3>
<p>Ensure the old certificate is no longer in use and revoke if necessary.</p>
`
},
{
id: 5,
title: "CI/CD Pipeline Failure Debugging",
description: "Systematic approach to diagnose and fix failing CI/CD pipelines.",
category: "DevOps",
tags: ["ci/cd", "jenkins", "gitlab", "debugging"],
updated: "5 days ago",
author: "DevOps Team",
content: `
<h3>Pipeline Failure Types</h3>
<ul>
<li>Build failures (compilation errors)</li>
<li>Test failures (unit/integration tests)</li>
<li>Deployment failures (infrastructure, permissions)</li>
<li>Timeout or resource constraints</li>
</ul>
<h3>Step 1: Check Logs</h3>
<p>Examine the full logs for the failed stage. Look for error messages and stack traces.</p>
<h3>Step 2: Reproduce Locally</h3>
<p>Clone the repository and run the same commands locally to isolate environment issues.</p>
<h3>Step 3: Verify Dependencies</h3>
<p>Check that all required services (databases, APIs, etc.) are available and properly configured.</p>
<h3>Step 4: Check Resource Limits</h3>
<p>Build agents may run out of memory or disk space. Monitor resource usage.</p>
<h3>Step 5: Rollback if Needed</h3>
<p>If the failure is in deployment, roll back to the previous stable version immediately.</p>
<h3>Step 6: Update Pipeline Configuration</h3>
<p>After identifying the root cause, update the pipeline configuration to prevent recurrence.</p>
`
},
{
id: 6,
title: "Memory Leak Detection in Production",
description: "Techniques to identify and resolve memory leaks in running applications.",
category: "Performance",
tags: ["memory", "profiling", "java", "python"],
updated: "2 weeks ago",
author: "Performance Team",
content: `
<h3>Symptoms</h3>
<p>Gradual increase in memory usage, frequent garbage collection pauses, OutOfMemory errors.</p>
<h3>Step 1: Monitor Memory Metrics</h3>
<p>Use monitoring tools (Prometheus, CloudWatch) to track heap/non-heap memory over time.</p>
<h3>Step 2: Heap Dump Analysis</h3>
<p>Capture a heap dump when memory usage is high:</p>
<div class="step-code"># Java
jmap -dump:live,format=b,file=heap.hprof <pid></div>
<div class="step-code"># Python
import gc; gc.set_debug(gc.DEBUG_LEAK)</div>
<h3>Step 3: Analyze Dump</h3>
<p>Use tools like VisualVM, Eclipse MAT, or Py-Spy to identify retained objects and memory leak suspects.</p>
<h3>Step 4: Common Patterns</h3>
<ul>
<li>Unbounded caches (use Guava/Caffeine with size limits)</li>
<li>Static collections growing indefinitely</li>
<li>Listeners not unregistered</li>
<li>ThreadLocal variables not cleaned</li>
<li>Database connections not closed</li>
</ul>
<h3>Step 5: Test Fix</h3>
<p>Apply suspected fix in a staging environment with load testing to verify memory usage stabilizes.</p>
`
}
],
goldenPaths: [
{
id: 1,
title: "Onboarding a New Microservice",
description: "Complete workflow for creating, deploying, and monitoring a new microservice.",
category: "Microservices",
tags: ["microservices", "onboarding", "ci/cd", "monitoring"],
updated: "1 week ago",
author: "Platform Team",
content: `
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-1">
<div class="golden-path-label">
<div class="golden-path-title">Create service repository</div>
<p>Use the standard template from internal GitHub organization: <code>git clone https://github.com/company/microservice-template</code></p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-2">
<div class="golden-path-label">
<div class="golden-path-title">Define service interface</div>
<p>Write OpenAPI/Swagger specification for REST API or Protobuf for gRPC.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-3">
<div class="golden-path-label">
<div class="golden-path-title">Implement health endpoints</div>
<p>Add <code>/health</code> (liveness) and <code>/ready</code> (readiness) endpoints following company standards.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-4">
<div class="golden-path-label">
<div class="golden-path-title">Add metrics instrumentation</div>
<p>Integrate Prometheus client library and expose <code>/metrics</code> endpoint.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-5">
<div class="golden-path-label">
<div class="golden-path-title">Configure CI/CD pipeline</div>
<p>Add <code>.gitlab-ci.yml</code> or Jenkinsfile using standard stages: build, test, scan, deploy.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-6">
<div class="golden-path-label">
<div class="golden-path-title">Set up Kubernetes deployment</div>
<p>Create Helm chart or K8s manifests in <code>deploy/</code> directory with proper resource limits and probes.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-7">
<div class="golden-path-label">
<div class="golden-path-title">Configure monitoring dashboards</div>
<p>Add service to Grafana dashboard templates and set up SLO alerts.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp1-8">
<div class="golden-path-label">
<div class="golden-path-title">Register in service mesh</div>
<p>Add service to Istio configuration for mTLS and traffic management.</p>
</div>
</div>
<div class="completion-bar">
<div class="completion-label">
<span>Completion</span>
<span id="gp1-progress">0%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="gp1-progress-fill"></div>
</div>
</div>
`
},
{
id: 2,
title: "Deploying a Frontend Application",
description: "Standard procedure for deploying React/Vue applications to production.",
category: "Frontend",
tags: ["react", "vue", "cdn", "deployment"],
updated: "3 days ago",
author: "Web Team",
content: `
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-1">
<div class="golden-path-label">
<div class="golden-path-title">Run static analysis</div>
<p>Execute <code>npm run lint</code> and fix all warnings/errors.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-2">
<div class="golden-path-label">
<div class="golden-path-title">Update environment variables</div>
<p>Verify <code>.env.production</code> contains correct API endpoints and feature flags.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-3">
<div class="golden-path-label">
<div class="golden-path-title">Build production bundle</div>
<p>Run <code>npm run build</code> and verify size is within limits.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-4">
<div class="golden-path-label">
<div class="golden-path-title">Run performance audit</div>
<p>Use Lighthouse to check performance, accessibility, and SEO scores.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-5">
<div class="golden-path-label">
<div class="golden-path-title">Upload to CDN</div>
<p>Use internal deployment script to upload build artifacts to S3/CloudFront with proper cache headers.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-6">
<div class="golden-path-label">
<div class="golden-path-title">Invalidate CDN cache</div>
<p>Invalidate old assets if using versioned filenames, or purge specific paths.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp2-7">
<div class="golden-path-label">
<div class="golden-path-title">Smoke test production</div>
<p>Verify critical user flows on production URL after deployment.</p>
</div>
</div>
<div class="completion-bar">
<div class="completion-label">
<span>Completion</span>
<span id="gp2-progress">0%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="gp2-progress-fill"></div>
</div>
</div>
`
},
{
id: 3,
title: "Setting Up Local Development Environment",
description: "Complete guide to configure your local machine for company projects.",
category: "Onboarding",
tags: ["setup", "local", "tools", "configuration"],
updated: "2 months ago",
author: "DevEx Team",
content: `
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-1">
<div class="golden-path-label">
<div class="golden-path-title">Install system dependencies</div>
<p>Install Git, Docker Desktop, kubectl, Node.js 18+, Python 3.10+, and Java 17 using package manager.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-2">
<div class="golden-path-label">
<div class="golden-path-title">Configure VPN</div>
<p>Install and connect to company VPN for internal resource access.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-3">
<div class="golden-path-label">
<div class="golden-path-title">Set up IDE</div>
<p>Install recommended extensions (code spell checker, gitlens, etc.) and import team settings.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-4">
<div class="golden-path-label">
<div class="golden-path-title">Authenticate with internal registries</div>
<p>Run <code>docker login</code> and <code>gcloud auth login</code> for artifact access.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-5">
<div class="golden-path-label">
<div class="golden-path-title">Clone and run sample project</div>
<p>Clone a simple project, run <code>make bootstrap</code>, and start the development server.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp3-6">
<div class="golden-path-label">
<div class="golden-path-title">Join communication channels</div>
<p>Join Slack channels: #dev-announcements, #team-<your-team>, #help-dev-env.</p>
</div>
</div>
<div class="completion-bar">
<div class="completion-label">
<span>Completion</span>
<span id="gp3-progress">0%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="gp3-progress-fill"></div>
</div>
</div>
`
},
{
id: 4,
title: "Data Migration Procedure",
description: "Safely migrate data between database clusters with minimal downtime.",
category: "Data",
tags: ["database", "migration", "postgres", "aws"],
updated: "1 month ago",
author: "Data Team",
content: `
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-1">
<div class="golden-path-label">
<div class="golden-path-title">Pre-migration assessment</div>
<p>Estimate data size, identify schema differences, and plan cutover strategy.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-2">
<div class="golden-path-label">
<div class="golden-path-title">Set up replication</div>
<p>Configure logical replication from source to target database for initial sync.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-3">
<div class="golden-path-label">
<div class="golden-path-title">Perform initial data load</div>
<p>Use <code>pg_dump</code>/<code>pg_restore</code> or AWS DMS for full copy. Verify row counts.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-4">
<div class="golden-path-label">
<div class="golden-path-title">Test application against target</div>
<p>Point a staging environment to the new database and run full test suite.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-5">
<div class="golden-path-label">
<div class="golden-path-title">Plan cutover window</div>
<p>Schedule maintenance window, notify stakeholders, and prepare rollback plan.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-6">
<div class="golden-path-label">
<div class="golden-path-title">Stop application writes</div>
<p>Put application in read-only mode or stop services to catch up final changes.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-7">
<div class="golden-path-label">
<div class="golden-path-title">Final sync and switch</div>
<p>Apply remaining replication changes, update connection strings, and restart services.</p>
</div>
</div>
<div class="golden-path-checkbox">
<input type="checkbox" id="gp4-8">
<div class="golden-path-label">
<div class="golden-path-title">Post-migration validation</div>
<p>Run smoke tests, monitor metrics, and verify data integrity.</p>
</div>
</div>
<div class="completion-bar">
<div class="completion-label">
<span>Completion</span>
<span id="gp4-progress">0%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="gp4-progress-fill"></div>
</div>
</div>
`
}
],
diagrams: [
{
id: 1,
title: "Service Mesh Architecture",
description: "High-level view of our Istio service mesh topology and data plane components.",
category: "Networking",
tags: ["istio", "service-mesh", "k8s", "microservices"],
updated: "3 weeks ago",
author: "Platform Team",
content: `
<div class="diagram-container">
<!-- Using a placeholder diagram -->
<img src="https://via.placeholder.com/800x500?text=Service+Mesh+Architecture+Diagram"
alt="Service Mesh Architecture" class="diagram-img">
</div>
<h3>Components</h3>
<ul>
<li><strong>Envoy Proxies:</strong> Sidecar proxies deployed alongside each pod.</li>
<li><strong>Istiod:</strong> Central control plane managing configuration.</li>
<li><strong>Ingress Gateway:</strong> Entry point for external traffic.</li>
<li><strong>Egress Gateway:</strong> Controlled exit for outbound traffic.</li>
</ul>
<h3>Traffic Flow</h3>
<ol>
<li>External request enters via Ingress Gateway.</li>
<li>Istio routes request to appropriate service via Envoy sidecar.</li>
<li>Service-to-service communication is encrypted with mTLS.</li>
<li>Telemetry data (metrics, logs, traces) is collected by Mixer and exported to monitoring systems.</li>
</ol>
<h3>Related Runbooks</h3>
<ul>
<li><a href="#" data-type="runbooks" data-id="3">Kubernetes Pod CrashLoopBackOff Recovery</a></li>
<li><a href="#" data-type="runbooks" data-id="2">API Rate Limit Exceeded Response</a></li>
</ul>
`
},
{
id: 2,
title: "Data Pipeline Architecture",
description: "Real-time data processing pipeline from ingestion to analytics.",
category: "Data Engineering",
tags: ["kafka", "spark", "data-lake", "streaming"],
updated: "1 month ago",
author: "Data Team",
content: `
<div class="diagram-container">
<img src="https://via.placeholder.com/800x500?text=Data+Pipeline+Architecture"
alt="Data Pipeline Architecture" class="diagram-img">
</div>
<h3>Pipeline Stages</h3>
<ol>
<li><strong>Ingestion:</strong> Apache Kafka receives events from applications and IoT devices.</li>
<li><strong>Stream Processing:</strong> Apache Flink processes streams in real-time for filtering, enrichment, and anomaly detection.</li>
<li><strong>Storage:</strong> Processed data lands in S3 data lake (raw zone) and is partitioned by date.</li>
<li><strong>Batch Processing:</strong> Daily Spark jobs transform data into curated tables in Redshift.</li>
<li><strong>Serving:</strong> Looker connects to Redshift for business intelligence dashboards.</li>
</ol>
<h3>Monitoring</h3>
<p>Key metrics tracked: Kafka lag, Flink checkpoint duration, Spark job duration, Redshift query performance.</p>
<h3>Related Runbooks</h3>
<ul>
<li><a href="#" data-type="runbooks" data-id="6">Memory Leak Detection in Production</a></li>
<li><a href="#" data-type="golden-paths" data-id="4">Data Migration Procedure</a></li>
</ul>
`
},
{
id: 3,
title: "Multi-Region Deployment Topology",
description: "Active-active deployment across AWS regions with global load balancing.",
category: "Infrastructure",
tags: ["aws", "multi-region", "high-availability", "dns"],
updated: "2 weeks ago",
author: "SRE Team",
content: `
<div class="diagram-container">
<img src="https://via.placeholder.com/800x500?text=Multi-Region+Topology"
alt="Multi-Region Deployment" class="diagram-img">
</div>
<h3>Architecture</h3>
<ul>
<li><strong>Global Accelerator:</strong> Anycast IPs route users to nearest region.</li>
<li><strong>Route 53:</strong> Health checks and failover between regions.</li>
<li><strong>Each Region:</strong> Independent VPC with public/private subnets, auto-scaling groups, and RDS multi-AZ.</li>
<li><strong>Data Sync:</strong> DynamoDB global tables or Cassandra multi-region replication.</li>
<li><strong>Object Storage:</strong> S3 cross-region replication for static assets.</li>
</ul>
<h3>Failover Process</h3>
<ol>
<li>Route 53 detects region health check failure.</li>
<li>Traffic is routed to secondary region within 60 seconds.</li>
<li>Application statelessness ensures no session loss.</li>
<li>Database replication lag is monitored; if > 5 minutes, manual intervention required.</li>
</ol>
<h3>Related Runbooks</h3>
<ul>
<li><a href="#" data-type="runbooks" data-id="4">SSL Certificate Expiration Renewal</a></li>
</ul>
`
},
{
id: 4,
title: "CI/CD Pipeline Architecture",
description: "Complete CI/CD pipeline with security scanning and progressive delivery.",
category: "DevOps",
tags: ["jenkins", "security", "argocd", "gitops"],
updated: "1 week ago",
author: "DevOps Team",
content: `
<div class="diagram-container">
<img src="https://via.placeholder.com/800x500?text=CI%2FCD+Pipeline+Architecture"
alt="CI/CD Pipeline" class="diagram-img">
</div>
<h3>Pipeline Stages</h3>
<ul>
<li><strong>Source:</strong> Git push triggers webhook to Jenkins.</li>
<li><strong>Build:</strong> Container image built and pushed to private registry.</li>
<li><strong>Unit Tests:</strong> Run test suite; fail fast on errors.</li>
<li><strong>Security Scan:</strong> Trivy scans for vulnerabilities, SonarQube for code quality.</li>
<li><strong>Deploy to Staging:</strong> ArgoCD syncs manifests to staging namespace.</li>
<li><strong>Integration Tests:</strong> Automated tests run against staging environment.</li>
<li><strong>Manual Approval:</strong> Slack button for production deployment approval.</li>
<li><strong>Canary Release:</strong> Istio directs 5% traffic to new version, then ramp up.</li>
<li><strong>Rollback:</strong> Automated rollback on SLO breach or manual trigger.</li>
</ul>
<h3>Related Golden Path</h3>
<ul>
<li><a href="#" data-type="golden-paths" data-id="1">Onboarding a New Microservice</a></li>
<li><a href="#" data-type="golden-paths" data-id="2">Deploying a Frontend Application</a></li>
</ul>
`
}
]
};
// DOM Elements
const sidebar = document.getElementById('sidebar');
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
const overlay = document.getElementById('overlay');
const searchInput = document.getElementById('searchInput');
const contentArea = document.getElementById('contentArea');
const homePage = document.getElementById('homePage');
const runbooksPage = document.getElementById('runbooksPage');
const goldenPathsPage = document.getElementById('goldenPathsPage');
const diagramsPage = document.getElementById('diagramsPage');
const detailView = document.getElementById('detailView');
const backButton = document.getElementById('backButton');
const homeGrid = document.getElementById('homeGrid');
const runbooksGrid = document.getElementById('runbooksGrid');
const goldenPathsGrid = document.getElementById('goldenPathsGrid');
const diagramsGrid = document.getElementById('diagramsGrid');
// State
let currentPage = 'home';
let currentFilter = 'all';
// Initialize
document.addEventListener('DOMContentLoaded', function() {
setupNavigation();
setupSearch();
renderHome();
renderAllPages();
setupGoldenPathCheckboxes();
});
// Navigation
function setupNavigation() {
// Sidebar nav items
document.querySelectorAll('.nav-item[data-page]').forEach(item => {
item.addEventListener('click', function() {
const page = this.getAttribute('data-page');
showPage(page);
// Update active class
document.querySelectorAll('.nav-item').forEach(nav => nav.classList.remove('active'));
this.classList.add('active');
// Close mobile sidebar
sidebar.classList.remove('active');
overlay.style.display = 'none';
});
});
// Mobile menu toggle
mobileMenuBtn.addEventListener('click', function() {
sidebar.classList.toggle('active');
overlay.style.display = sidebar.classList.contains('active') ? 'block' : 'none';
});
// Close sidebar when clicking overlay
overlay.addEventListener('click', function() {
sidebar.classList.remove('active');
overlay.style.display = 'none';
});
// Back button
backButton.addEventListener('click', function() {
detailView.classList.add('hidden');
showPage(currentPage);
});
// Tabs on home page
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', function() {
const filter = this.getAttribute('data-filter');
currentFilter = filter;
// Update active tab
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
this.classList.add('active');
renderHome();
});
});
}
function showPage(pageId) {
currentPage = pageId;
// Hide all pages
homePage.classList.add('hidden');
runbooksPage.classList.add('hidden');
goldenPathsPage.classList.add('hidden');
diagramsPage.classList.add('hidden');
detailView.classList.add('hidden');
// Show selected page
switch(pageId) {
case 'home':
homePage.classList.remove('hidden');
renderHome();
break;
case 'runbooks':
runbooksPage.classList.remove('hidden');
break;
case 'golden-paths':
goldenPathsPage.classList.remove('hidden');
break;
case 'diagrams':
diagramsPage.classList.remove('hidden');
break;
}
}
// Rendering
function renderHome() {
// Get all items based on filter
let allItems = [];
if (currentFilter === 'all' || currentFilter === 'runbooks') {
allItems = allItems.concat(contentData.runbooks.map(item => ({...item, type: 'runbooks'})));
}
if (currentFilter === 'all' || currentFilter === 'golden-paths') {
allItems = allItems.concat(contentData.goldenPaths.map(item => ({...item, type: 'golden-paths'})));
}
if (currentFilter === 'all' || currentFilter === 'diagrams') {
allItems = allItems.concat(contentData.diagrams.map(item => ({...item, type: 'diagrams'})));
}
// Filter by search if needed
const searchTerm = searchInput.value.trim().toLowerCase();
if (searchTerm) {
allItems = allItems.filter(item =>
item.title.toLowerCase().includes(searchTerm) ||
item.description.toLowerCase().includes(searchTerm) ||
item.tags.some(tag => tag.toLowerCase().includes(searchTerm))
);
}
// Clear grid and render items
homeGrid.innerHTML = '';
allItems.forEach(item => {
homeGrid.appendChild(createCard(item));
});
// If no items, show message
if (allItems.length === 0) {
homeGrid.innerHTML = `
<div style="grid-column: 1/-1; text-align: center; padding: 2rem; color: var(--secondary);">
<i class="fas fa-search" style="font-size: 2rem; margin-bottom: 1rem; opacity: 0.5;"></i>
<p>No content found matching your criteria.</p>
</div>
`;
}
}
function renderAllPages() {
// Render each page's grid
renderGrid(runbooksGrid, contentData.runbooks, 'runbooks');
renderGrid(goldenPathsGrid, contentData.goldenPaths, 'golden-paths');
renderGrid(diagramsGrid, contentData.diagrams, 'diagrams');
}
function renderGrid(gridElement, items, type) {
gridElement.innerHTML = '';
items.forEach(item => {
gridElement.appendChild(createCard({...item, type}));
});
}
function createCard(item) {
const card = document.createElement('div');
card.className = 'card';
card.setAttribute('data-type', item.type);
card.setAttribute('data-id', item.id);
// Determine type class
let typeClass = 'type-runbook';
let typeLabel = 'Runbook';
if (item.type === 'golden-paths') {
typeClass = 'type-golden-path';
typeLabel = 'Golden Path';
} else if (item.type === 'diagrams') {
typeClass = 'type-diagram';
typeLabel = 'Diagram';
}
// Tags HTML
const tagsHtml = item.tags.map(tag => `<span class="tag">${tag}</span>`).join('');
card.innerHTML = `
<span class="card-type ${typeClass}">${typeLabel}</span>
<h3 class="card-title">${item.title}</h3>
<p class="card-description">${item.description}</p>
<div class="card-meta">
<span>${item.category}</span>
<div class="card-tags">
${tagsHtml}
</div>
</div>
<div class="card-meta" style="margin-top: 0.5rem; font-size: 0.75rem;">
<span>Updated: ${item.updated}</span>
<span>By: ${item.author}</span>
</div>
`;
card.addEventListener('click', function() {
showDetail(item.type, item.id);
});
return card;
}
function showDetail(type, id) {
let item;
let otherType = '';
// Find the item
if (type === 'runbooks') {
item = contentData.runbooks.find(r => r.id === id);
otherType = 'runbooks';
} else if (type === 'golden-paths') {
item = contentData.goldenPaths.find(g => g.id === id);
otherType = 'golden-paths';
} else if (type === 'diagrams') {
item = contentData.diagrams.find(d => d.id === id);
otherType = 'diagrams';
}
if (!item) return;
// Populate detail view
document.getElementById('detailTitle').textContent = item.title;
const typeClass = type === 'runbooks' ? 'type-runbook' :
type === 'golden-paths' ? 'type-golden-path' : 'type-diagram';
const typeLabel = type === 'runbooks' ? 'Runbook' :
type === 'golden-paths' ? 'Golden Path' : 'Diagram';
const typeEl = document.getElementById('detailType');
typeEl.textContent = typeLabel;
typeEl.className = `detail-type ${typeClass}`;
document.getElementById('detailCategory').textContent = `Category: ${item.category}`;
document.getElementById('detailUpdated').textContent = `Updated: ${item.updated}`;
document.getElementById('detailAuthor').textContent = `By: ${item.author}`;
document.getElementById('detailContent').innerHTML = item.content;
// Hide all pages and show detail view
homePage.classList.add('hidden');
runbooksPage.classList.add('hidden');
goldenPathsPage.classList.add('hidden');
diagramsPage.classList.add('hidden');
detailView.classList.remove('hidden');
// Scroll to top
contentArea.scrollTop = 0;
}
// Search functionality
function setupSearch() {
searchInput.addEventListener('input', function() {
if (currentPage === 'home') {
renderHome();
} else {
// When on other pages, go back to home with filter
showPage('home');
renderHome();
}
});
}
// Golden Path checkbox progress
function setupGoldenPathCheckboxes() {
document.addEventListener('change', function(e) {
if (e.target.type === 'checkbox' && e.target.id.startsWith('gp')) {
updateGoldenPathProgress(e.target.id);
}
});
}
function updateGoldenPathProgress(checkboxId) {
const gpId = checkboxId.split('-')[0]; // gp1, gp2, etc.
const group = document.querySelectorAll(`input[id^="${gpId}-"]`);
const checked = document.querySelectorAll(`input[id^="${gpId}-"]:checked`).length;
const total = group.length;
const percent = Math.round((checked / total) * 100);
const progressFill = document.getElementById(`${gpId}-progress-fill`);
const progressLabel = document.getElementById(`${gpId}-progress`);
if (progressFill && progressLabel) {
progressFill.style.width = `${percent}%`;
progressLabel.textContent = `${percent}%`;
}
}
// Handle link clicks within detail content that should open other items
document.addEventListener('click', function(e) {
if (e.target.tagName === 'A' && e.target.hasAttribute('data-type')) {
e.preventDefault();
const type = e.target.getAttribute('data-type');
const id = parseInt(e.target.getAttribute('data-id'));
showDetail(type, id);
}
});
</script>
</body>
</html>