Skip to content

Commit d2ca9e0

Browse files
committed
fix(pennbook): make style consistent with global theme
1 parent 58d5e3b commit d2ca9e0

2 files changed

Lines changed: 53 additions & 34 deletions

File tree

src/components/demos/PennBookDemo.astro

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,93 @@
22
// A simple artifact placeholder for PennBook
33
---
44

5-
<div class="pennbook-demo">
6-
<div class="demo-header">
7-
<span class="demo-title">News Pipeline Status (Spark / EMR)</span>
8-
<span class="demo-badge success">Job Completed</span>
5+
<section class="demo-panel pennbook-panel" aria-labelledby="demo-title">
6+
<div class="panel-heading">
7+
<p class="eyebrow">Pipeline artifact</p>
8+
<h2 id="demo-title">Spark Data Pipeline</h2>
99
</div>
10-
11-
<div class="terminal-panel">
12-
<div class="log-line"><code>[INFO] Starting dataset download...</code></div>
13-
<div class="log-line"><code>[INFO] Seeding DynamoDB with initial news articles...</code></div>
14-
<div class="log-line"><code>[INFO] Building Spark job (mvn clean package)...</code></div>
15-
<div class="log-line"><code>[INFO] Uploading artifacts to S3 bucket...</code></div>
16-
<div class="log-line"><code>[INFO] Submitting job to Livy server at ec2-xxx...</code></div>
17-
<div class="log-line"><code>[INFO] Spark job running on EMR cluster...</code></div>
18-
<div class="log-line"><code>[INFO] Computing PageRank and Inverted Indices...</code></div>
19-
<div class="log-line"><code>[SUCCESS] Pipeline finished. Inverted index updated in DynamoDB.</code></div>
10+
11+
<div class="pennbook-demo-content">
12+
<div class="demo-header">
13+
<span class="demo-status">Status: <strong>Completed</strong></span>
14+
<span class="demo-badge success">EMR Cluster Idle</span>
15+
</div>
16+
17+
<div class="terminal-panel">
18+
<div class="log-line"><code>[INFO] [10:00:01] Starting automated news pipeline on AWS EMR...</code></div>
19+
<div class="log-line"><code>[INFO] [10:00:03] Downloading News_Category_Dataset_v2.json from S3 bucket...</code></div>
20+
<div class="log-line"><code>[INFO] [10:00:15] Seeding DynamoDB Tables (Users, Articles, Follows)...</code></div>
21+
<div class="log-line"><code>[INFO] [10:00:22] Compiling Apache Spark job (mvn clean package)...</code></div>
22+
<div class="log-line"><code>[INFO] [10:00:45] Uploading target/news-pipeline-1.0.jar to S3...</code></div>
23+
<div class="log-line"><code>[INFO] [10:00:50] Submitting job to Livy server (ec2-xxx.compute-1.amazonaws.com)...</code></div>
24+
<div class="log-line"><code>[INFO] [10:01:10] Job ID 42: Running Spark context...</code></div>
25+
<div class="log-line"><code>[INFO] [10:02:30] Phase 1: Filtering stop words and extracting NLP keywords...</code></div>
26+
<div class="log-line"><code>[INFO] [10:03:15] Phase 2: Building inverted indices for fast search queries...</code></div>
27+
<div class="log-line"><code>[INFO] [10:04:00] Phase 3: Executing PageRank over user follow graphs...</code></div>
28+
<div class="log-line"><code>[INFO] [10:05:42] Phase 4: Generating personalized news feed recommendations...</code></div>
29+
<div class="log-line success"><code>[SUCCESS] [10:06:05] Pipeline finished. 85,000+ articles indexed and updated in DynamoDB.</code></div>
30+
</div>
2031
</div>
21-
</div>
32+
</section>
2233

2334
<style>
24-
.pennbook-demo {
35+
.pennbook-demo-content {
2536
display: flex;
2637
flex-direction: column;
2738
gap: 1rem;
28-
padding: 1rem;
29-
background-color: var(--color-surface, #f8fbfb);
30-
border: 1px solid var(--color-border, #e0e0e0);
31-
border-radius: 6px;
32-
font-family: var(--font-mono, monospace);
33-
font-size: 0.85rem;
3439
}
3540

3641
.demo-header {
3742
display: flex;
3843
justify-content: space-between;
3944
align-items: center;
4045
border-bottom: 1px solid var(--color-border, #e0e0e0);
41-
padding-bottom: 0.5rem;
46+
padding-bottom: 0.75rem;
47+
font-family: var(--font-sans, system-ui, sans-serif);
48+
}
49+
50+
.demo-status {
51+
font-size: 0.9rem;
52+
color: var(--color-text-muted, #555);
4253
}
4354

44-
.demo-title {
45-
font-weight: 600;
55+
.demo-status strong {
4656
color: var(--color-text, #111613);
4757
}
4858

4959
.demo-badge.success {
5060
background-color: #e6f4ea;
5161
color: #137333;
52-
padding: 0.2rem 0.5rem;
62+
padding: 0.25rem 0.6rem;
5363
border-radius: 4px;
54-
font-size: 0.75rem;
64+
font-size: 0.8rem;
5565
font-weight: 500;
5666
}
5767

5868
.terminal-panel {
5969
background-color: #111613;
6070
color: #a8b2ac;
61-
padding: 1rem;
62-
border-radius: 4px;
71+
padding: 1.25rem;
72+
border-radius: 6px;
6373
display: flex;
6474
flex-direction: column;
65-
gap: 0.4rem;
75+
gap: 0.5rem;
76+
font-family: var(--font-mono, monospace);
77+
font-size: 0.85rem;
78+
line-height: 1.4;
79+
overflow-x: auto;
80+
}
81+
82+
.log-line {
83+
white-space: nowrap;
6684
}
6785

6886
.log-line code {
6987
font-family: inherit;
7088
}
7189

72-
.log-line:last-child {
90+
.log-line.success {
7391
color: #81c995;
92+
margin-top: 0.5rem;
7493
}
7594
</style>

src/data/projects.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ export const projects: Project[] = [
338338
summary:
339339
"A distributed social network with a Spark-based news pipeline, media uploading, and DynamoDB data modeling.",
340340
problem:
341-
"A scalable social network needs resilient data storage for connections and posts, plus batch processing to generate news recommendations.",
341+
"A scalable social network needs resilient data storage for tracking friendships, posts, and media, while simultaneously requiring batch processing to generate relevant news recommendations via PageRank and inverted indices without bottlenecking the main server.",
342342
approach:
343-
"We built a Node.js and DynamoDB backend with AWS S3 for media, and an Apache Spark pipeline on EMR to generate user news feeds.",
343+
"We built a Node.js API with a DynamoDB schema and direct AWS S3 integration for profile pictures and music. For the analytics backend, we implemented an automated Apache Spark pipeline on AWS EMR, orchestrated via Livy, to process a large news dataset, compute follow-graph PageRanks, and build fast-search inverted indices.",
344344
result:
345-
"The app supports secure authentication, friendships, music/image uploads, and personalized news feeds powered by Livy and EMR.",
345+
"The deployed system provides a full social experience including authentication, real-time posts, and an embedded music player streaming directly from S3, alongside daily personalized news feeds generated by the asynchronous Spark backend.",
346346
stack: ["Node.js", "DynamoDB", "AWS S3", "Apache Spark", "AWS EMR"],
347347
highlights: [
348348
"DynamoDB data modeling for users, posts, and relationships",

0 commit comments

Comments
 (0)