Skip to content

Commit 9ede472

Browse files
author
Goncalves, Carla
committed
Brand: cat mark image in app and docs; cap max active jobs at 2
- Add cat.png to frontend/public and docs; use img for brand mark - Docs topbar uses ./cat.png with object-fit - Align CRAWL_MAX_ACTIVE_JOBS parse max with hard cap; document in README/.env.example - Fly: max_machines_running = 2 Made-with: Cursor
1 parent 41a2341 commit 9ede472

9 files changed

Lines changed: 105 additions & 49 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ CRAWL_DEFAULT_CONCURRENCY=6
4646
CRAWL_MAX_CONCURRENCY=6
4747
CRAWL_DEFAULT_TIMEOUT_MS=12000
4848
CRAWL_MAX_TIMEOUT_MS=30000
49+
# Hard cap for this project: max 2 concurrent active crawl jobs.
4950
CRAWL_MAX_ACTIVE_JOBS=2
5051
CRAWL_MAX_QUEUED_JOBS=20
5152
CRAWL_MAX_REDIRECTS=10

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Important operational constraints:
9292
- Staging and production must use `JOB_STATE_BACKEND=firestore`
9393
- All production instances must share the same Firestore backend and collection prefix
9494
- Crawl jobs are rate-limited and capped by backend hard limits
95+
- Active crawl jobs are hard-capped to `2` (`CRAWL_MAX_ACTIVE_JOBS`)
9596
- Frontend controls are aligned to the backend caps: `maxPages` up to `300`, `concurrency` up to `6`
9697
- The crawler is for public `http(s)` targets only; internal, loopback, link-local, and metadata destinations are blocked
9798
- Crawling stays on the same host as the start URL
@@ -237,6 +238,7 @@ GitHub Pages only serves the static docs and bookmarklet loader; crawls still ru
237238
### Fly.io (optional)
238239

239240
[`fly.toml`](fly.toml) is only relevant if you choose to deploy with [Fly.io](https://fly.io/) instead of (or in addition to) Cloud Run. Ignore it if you use Cloud Run only.
241+
The project Fly config caps running machines at `2` via `max_machines_running = 2`.
240242

241243
### Doc screenshots (Playwright)
242244

backend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const SERVER_CONFIG = {
169169
maxConcurrency: parseEnvInt("CRAWL_MAX_CONCURRENCY", 6, { min: 1, max: 64 }),
170170
defaultTimeoutMs: parseEnvInt("CRAWL_DEFAULT_TIMEOUT_MS", 12000, { min: 1000, max: 120000 }),
171171
maxTimeoutMs: parseEnvInt("CRAWL_MAX_TIMEOUT_MS", 30000, { min: 1000, max: 120000 }),
172-
maxActiveJobs: parseEnvInt("CRAWL_MAX_ACTIVE_JOBS", 2, { min: 1, max: 100 }),
172+
maxActiveJobs: parseEnvInt("CRAWL_MAX_ACTIVE_JOBS", 2, { min: 1, max: 2 }),
173173
maxQueuedJobs: parseEnvInt("CRAWL_MAX_QUEUED_JOBS", 20, { min: 0, max: 1000 }),
174174
maxRedirects: parseEnvInt("CRAWL_MAX_REDIRECTS", 10, { min: 1, max: 50 }),
175175
maxHtmlBytes: parseEnvInt("CRAWL_MAX_HTML_BYTES", 2 * 1024 * 1024, { min: 1024, max: 50 * 1024 * 1024 }),

docs/cat.png

63.5 KB
Loading

docs/index.html

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@
160160
height: 40px;
161161
border-radius: 11px;
162162
border: 1px solid var(--line-strong);
163-
background: linear-gradient(145deg, var(--accent-dim), rgba(255, 255, 255, 0.03));
163+
object-fit: cover;
164+
display: block;
165+
flex-shrink: 0;
164166
}
165167

166168
.brand__name {
@@ -396,6 +398,21 @@
396398
margin-bottom: 0;
397399
}
398400

401+
.hero__bookmarklet-wrap {
402+
display: flex;
403+
flex-direction: column;
404+
align-items: flex-start;
405+
gap: 0.35rem;
406+
}
407+
408+
.hero__bookmarklet-hint {
409+
margin: 0;
410+
font-size: 0.78rem;
411+
line-height: 1.4;
412+
color: var(--text-quiet);
413+
max-width: 16rem;
414+
}
415+
399416
.hero__note {
400417
margin: 0;
401418
font-size: 0.88rem;
@@ -1189,7 +1206,14 @@
11891206
<header class="topbar">
11901207
<div class="topbar__inner">
11911208
<div class="brand">
1192-
<div class="brand__mark" aria-hidden="true"></div>
1209+
<img
1210+
class="brand__mark"
1211+
src="./cat.png"
1212+
alt=""
1213+
width="40"
1214+
height="40"
1215+
decoding="async"
1216+
/>
11931217
<div>
11941218
<span class="brand__name">Cat Crawler</span>
11951219
<span class="brand__tag">Crawl, validate, export</span>
@@ -1223,15 +1247,18 @@ <h1 id="hero-heading" class="hero__title">Catch broken routes <em>before users d
12231247
<li>TXT &amp; CSV export</li>
12241248
</ul>
12251249
<div class="hero__actions">
1226-
<a
1227-
class="btn btn--primary"
1228-
id="bookmarkletLink"
1229-
href="#bookmarklet"
1230-
draggable="true"
1231-
title="Drag this button to your bookmarks bar to install"
1232-
aria-label="Install Cat Crawler: drag this button to your bookmarks bar, or activate to jump to copy the bookmarklet link"
1233-
>Drag to bookmarks bar</a
1234-
>
1250+
<div class="hero__bookmarklet-wrap">
1251+
<a
1252+
class="btn btn--primary"
1253+
id="bookmarkletLink"
1254+
href="#bookmarklet"
1255+
draggable="true"
1256+
title="Drag to your bookmarks bar to install"
1257+
aria-label="Cat Crawler bookmarklet: drag to bookmarks bar to save as 🐱 Cat Crawler, or activate to jump to copy the bookmarklet link"
1258+
>🐱 Cat Crawler</a
1259+
>
1260+
<p class="hero__bookmarklet-hint">Drag the button above to your bookmarks bar.</p>
1261+
</div>
12351262
<a class="btn btn--secondary" href="#features">Explore the product</a>
12361263
<a class="btn btn--ghost" href="https://github.com/CarlasHub/site-crawler/blob/main/README.md">README on GitHub</a>
12371264
</div>
@@ -1853,6 +1880,7 @@ <h3>Current limits</h3>
18531880
<li>Public <code>http(s)</code> targets only; internal, loopback, link-local, and metadata destinations are blocked.</li>
18541881
<li>UI and backend caps are <code>300</code> pages and <code>6</code> concurrency.</li>
18551882
<li>Crawl jobs are rate-limited; caps and safety rules are enforced server-side.</li>
1883+
<li>Active crawl jobs are hard-capped to <code>2</code> (<code>CRAWL_MAX_ACTIVE_JOBS</code>).</li>
18561884
<li>Soft-failure, pattern, impact, and duplicate-candidate views are review aids—heuristic or grouped—not absolute verdicts.</li>
18571885
</ul>
18581886
</article>
@@ -1862,6 +1890,7 @@ <h3>Production deployment notes</h3>
18621890
<li>Local development defaults to file-backed job state.</li>
18631891
<li>Staging and production must use <code>JOB_STATE_BACKEND=firestore</code>.</li>
18641892
<li>Production instances must share the same Firestore backend and collection prefix.</li>
1893+
<li>Repo Fly config caps running machines at <code>2</code> when Fly.io is used.</li>
18651894
<li>The bookmarklet must point at a real deployed app origin.</li>
18661895
</ul>
18671896
</article>

docs/landing.html

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@
160160
height: 40px;
161161
border-radius: 11px;
162162
border: 1px solid var(--line-strong);
163-
background: linear-gradient(145deg, var(--accent-dim), rgba(255, 255, 255, 0.03));
163+
object-fit: cover;
164+
display: block;
165+
flex-shrink: 0;
164166
}
165167

166168
.brand__name {
@@ -396,6 +398,21 @@
396398
margin-bottom: 0;
397399
}
398400

401+
.hero__bookmarklet-wrap {
402+
display: flex;
403+
flex-direction: column;
404+
align-items: flex-start;
405+
gap: 0.35rem;
406+
}
407+
408+
.hero__bookmarklet-hint {
409+
margin: 0;
410+
font-size: 0.78rem;
411+
line-height: 1.4;
412+
color: var(--text-quiet);
413+
max-width: 16rem;
414+
}
415+
399416
.hero__note {
400417
margin: 0;
401418
font-size: 0.88rem;
@@ -1189,7 +1206,14 @@
11891206
<header class="topbar">
11901207
<div class="topbar__inner">
11911208
<div class="brand">
1192-
<div class="brand__mark" aria-hidden="true"></div>
1209+
<img
1210+
class="brand__mark"
1211+
src="./cat.png"
1212+
alt=""
1213+
width="40"
1214+
height="40"
1215+
decoding="async"
1216+
/>
11931217
<div>
11941218
<span class="brand__name">Cat Crawler</span>
11951219
<span class="brand__tag">Crawl, validate, export</span>
@@ -1223,15 +1247,18 @@ <h1 id="hero-heading" class="hero__title">Catch broken routes <em>before users d
12231247
<li>TXT &amp; CSV export</li>
12241248
</ul>
12251249
<div class="hero__actions">
1226-
<a
1227-
class="btn btn--primary"
1228-
id="bookmarkletLink"
1229-
href="#bookmarklet"
1230-
draggable="true"
1231-
title="Drag this button to your bookmarks bar to install"
1232-
aria-label="Install Cat Crawler: drag this button to your bookmarks bar, or activate to jump to copy the bookmarklet link"
1233-
>Drag to bookmarks bar</a
1234-
>
1250+
<div class="hero__bookmarklet-wrap">
1251+
<a
1252+
class="btn btn--primary"
1253+
id="bookmarkletLink"
1254+
href="#bookmarklet"
1255+
draggable="true"
1256+
title="Drag to your bookmarks bar to install"
1257+
aria-label="Cat Crawler bookmarklet: drag to bookmarks bar to save as 🐱 Cat Crawler, or activate to jump to copy the bookmarklet link"
1258+
>🐱 Cat Crawler</a
1259+
>
1260+
<p class="hero__bookmarklet-hint">Drag the button above to your bookmarks bar.</p>
1261+
</div>
12351262
<a class="btn btn--secondary" href="#features">Explore the product</a>
12361263
<a class="btn btn--ghost" href="https://github.com/CarlasHub/site-crawler/blob/main/README.md">README on GitHub</a>
12371264
</div>
@@ -1853,6 +1880,7 @@ <h3>Current limits</h3>
18531880
<li>Public <code>http(s)</code> targets only; internal, loopback, link-local, and metadata destinations are blocked.</li>
18541881
<li>UI and backend caps are <code>300</code> pages and <code>6</code> concurrency.</li>
18551882
<li>Crawl jobs are rate-limited; caps and safety rules are enforced server-side.</li>
1883+
<li>Active crawl jobs are hard-capped to <code>2</code> (<code>CRAWL_MAX_ACTIVE_JOBS</code>).</li>
18561884
<li>Soft-failure, pattern, impact, and duplicate-candidate views are review aids—heuristic or grouped—not absolute verdicts.</li>
18571885
</ul>
18581886
</article>
@@ -1862,6 +1890,7 @@ <h3>Production deployment notes</h3>
18621890
<li>Local development defaults to file-backed job state.</li>
18631891
<li>Staging and production must use <code>JOB_STATE_BACKEND=firestore</code>.</li>
18641892
<li>Production instances must share the same Firestore backend and collection prefix.</li>
1893+
<li>Repo Fly config caps running machines at <code>2</code> when Fly.io is used.</li>
18651894
<li>The bookmarklet must point at a real deployed app origin.</li>
18661895
</ul>
18671896
</article>

fly.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ primary_region = "ams"
99
auto_stop_machines = "stop"
1010
auto_start_machines = true
1111
min_machines_running = 0
12+
max_machines_running = 2
1213
processes = ["app"]
1314

1415
[[vm]]

frontend/src/App.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,14 @@ export default function App() {
559559
<header className="header">
560560
<div className="headerInner">
561561
<div className="brand">
562-
<div className="brandMark" aria-hidden="true" />
562+
<img
563+
className="brandMark"
564+
src="/cat.png"
565+
alt=""
566+
width={50}
567+
height={50}
568+
decoding="async"
569+
/>
563570
<div className="brandText">
564571
<div className="brandName">{brandName}</div>
565572
<div className="brandTag">{brandTag}</div>

frontend/src/styles.css

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -152,34 +152,15 @@
152152
}
153153

154154
.brandMark {
155-
/* width: 44px;
156-
height: 44px;
155+
width: 50px;
156+
height: 50px;
157157
border-radius: 12px;
158-
background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
159-
border: none;
160-
box-shadow:
158+
object-fit: cover;
159+
display: block;
160+
flex-shrink: 0;
161+
box-shadow:
161162
var(--shadow-sm),
162163
0 0 24px -4px var(--accent-glow);
163-
display: grid;
164-
place-items: center;
165-
position: relative;
166-
overflow: hidden; */
167-
168-
width: 50px;
169-
height: 50px;
170-
background-image: url("/cat.png");
171-
background-size: cover;
172-
}
173-
174-
.brandMark::before {
175-
/* content: '';
176-
position: absolute;
177-
top: 0;
178-
left: 0;
179-
right: 0;
180-
height: 50%;
181-
background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
182-
border-radius: 12px 12px 0 0; */
183164
}
184165

185166
.brandName {
@@ -1088,6 +1069,12 @@
10881069
display: none;
10891070
}
10901071

1072+
/* Pin / “Access control” panel must not appear in the bookmarklet iframe */
1073+
.shell--bookmarklet #access,
1074+
.shell--bookmarklet section[aria-labelledby="accessTitle"] {
1075+
display: none !important;
1076+
}
1077+
10911078
.shell--bookmarklet .main {
10921079
padding-top: 88px;
10931080
}

0 commit comments

Comments
 (0)