Skip to content

Commit 66a1314

Browse files
feat: add interactive 5-Act real-time architecture story mode to landing page
1 parent 178eb29 commit 66a1314

5 files changed

Lines changed: 1282 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ A high-performance, distributed code execution engine that securely compiles and
55
> **[Watch the 2-Minute Architecture & Performance Demo](https://loom.com/)**
66
> *(Achieving 130+ req/sec throughput with 0% CPU starvation using a Bounded Async Queue and Pre-warmed Container Pool).*
77
8-
🚀 **Live Server Address:** [https://code-engine-api-wicb.onrender.com](https://code-engine-api-wicb.onrender.com)
8+
🚀 **Live Server Address:** [https://code-engine-api-wicb.onrender.com](https://code-engine-api-wicb.onrender.com)
9+
📖 **Interactive Story Mode:** Built-in interactive 5-Act real-time architecture walkthrough on the landing page!
910

1011
![CodeEngine Demo](./demo.gif)
1112

client/src/App.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,47 @@ body {
177177
cursor: not-allowed;
178178
}
179179

180+
.story-mode-btn {
181+
background: linear-gradient(135deg, rgba(88, 166, 255, 0.15) 0%, rgba(163, 113, 247, 0.15) 100%);
182+
border: 1px solid rgba(88, 166, 255, 0.35);
183+
color: #58a6ff;
184+
padding: 6px 14px;
185+
border-radius: var(--btn-radius);
186+
font-family: 'Inter', sans-serif;
187+
font-weight: 600;
188+
font-size: 0.85rem;
189+
cursor: pointer;
190+
transition: all 0.25s ease;
191+
display: flex;
192+
align-items: center;
193+
gap: 8px;
194+
box-shadow: 0 0 16px rgba(88, 166, 255, 0.12);
195+
}
196+
197+
.story-mode-btn:hover {
198+
background: linear-gradient(135deg, rgba(88, 166, 255, 0.25) 0%, rgba(163, 113, 247, 0.25) 100%);
199+
border-color: #58a6ff;
200+
transform: translateY(-1px);
201+
box-shadow: 0 4px 18px rgba(88, 166, 255, 0.25);
202+
}
203+
204+
.story-badge-new {
205+
background: linear-gradient(90deg, #58a6ff 0%, #a371f7 100%);
206+
color: #ffffff;
207+
font-size: 0.65rem;
208+
font-weight: 700;
209+
text-transform: uppercase;
210+
padding: 2px 6px;
211+
border-radius: 4px;
212+
letter-spacing: 0.05em;
213+
animation: badgeGlow 2s infinite alternate;
214+
}
215+
216+
@keyframes badgeGlow {
217+
0% { box-shadow: 0 0 4px rgba(88, 166, 255, 0.4); }
218+
100% { box-shadow: 0 0 10px rgba(163, 113, 247, 0.8); }
219+
}
220+
180221
.run-btn .spinner {
181222
animation: spin 1s linear infinite;
182223
}

client/src/App.jsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import remarkGfm from 'remark-gfm';
55
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
66
import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism';
77
import './App.css';
8+
import ArchitectureStory, { LandingStoryBanner } from './components/ArchitectureStory';
89

910
const BOILERPLATES = {
1011
cpp: `#include <iostream>
@@ -90,6 +91,7 @@ function App() {
9091
const [isLoading, setIsLoading] = useState(false);
9192
const [fontSize, setFontSize] = useState(parseInt(localStorage.getItem('fontSize'), 10) || 14);
9293
const [cursor, setCursor] = useState({ line: 1, col: 1 });
94+
const [isStoryOpen, setIsStoryOpen] = useState(false);
9395

9496
// Chatbot State
9597
const [isChatOpen, setIsChatOpen] = useState(false);
@@ -266,11 +268,16 @@ function App() {
266268
<><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><polygon points="5 3 19 12 5 21 5 3"/></svg> Run</>
267269
)}
268270
</button>
269-
270-
271+
<button className="story-mode-btn" onClick={() => setIsStoryOpen(true)} title="Explore How CodeEngine Works in Real Time">
272+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
273+
<span>How It Works</span>
274+
<span className="story-badge-new">Story</span>
275+
</button>
271276
</div>
272277
</header>
273278

279+
<LandingStoryBanner onOpenStory={() => setIsStoryOpen(true)} />
280+
274281
<div className={`workspace ${isChatOpen ? 'chat-open' : ''}`}>
275282
<div className="editor-panel">
276283
<div className="panel-header-row">
@@ -455,6 +462,12 @@ function App() {
455462
<span>Spaces: 4</span>
456463
{stats && <span>Network: {formatMs(stats.clientRoundTripMs)}</span>}
457464
</footer>
465+
466+
<ArchitectureStory
467+
isOpen={isStoryOpen}
468+
onClose={() => setIsStoryOpen(false)}
469+
selectedLanguage={language}
470+
/>
458471
</div>
459472
);
460473
}

0 commit comments

Comments
 (0)