How harshnirmal-19/prompts-pirat3s works
Purpose and Entry Points
Prompts-Pirat3s is a mobile-first frontend redesign of the ABTalks 60-day coding challenge. It is a Vite-based client application with multiple standalone HTML entry pages rather than a single routed SPA: index.html, dashboard.html, ChallengeDay.html, day12.html, and profile.html. Development serving is configured through vite.config.js; serve.js may provide an alternate local server path.
Application Bootstrap
Each page is paired with a page-specific JavaScript module under src/, while shared/global initialization likely begins at src/main.js. The main landing experience is rooted in index.html with global styling in src/style.css and possibly the legacy/root-level styles.css.
Dashboard Stage
The dashboard presents challenge-level progress and navigation into daily content. Its UI behavior and styles are isolated in src/dashboard.js and src/dashboard.css, with dashboard.html acting as the document entry point. This separation suggests independently loaded page bundles and DOM-bound scripting rather than centralized client-side routing.
Challenge-Day Experience
Challenge content is represented by dedicated day-oriented pages. ChallengeDay.html is backed by src/ChallengeDay.js and src/ChallengeDay.css, likely serving a reusable/general challenge-day view. day12.html, src/day12.js, and src/day12.css provide a specialized implementation for Day 12, indicating that individual days can diverge in content or interactions.
Profile Experience
User/profile presentation is a separate page boundary: profile.html, src/profile.js, and src/profile.css. It is architecturally independent from the dashboard and day pages, so cross-page state must be carried through browser storage, URL data, static content, or repeated client-side logic; no backend integration is visible in the repository tree.
Shared Client Utilities and Assets
src/counter.js is a shared interactive utility, likely used by one or more page modules. Static visual resources belong under src/assets, allowing Vite to process imported assets during bundling. Page-specific CSS modules coexist with shared styling, creating a layered styling model: common styles in src/style.css, page ownership in each corresponding CSS file.
Runtime and Infrastructure Boundaries
The runtime is browser JavaScript/CSS/HTML, built and served with Vite as declared by package.json, package-lock.json, and vite.config.js. There are no visible API clients, server-side application directories, database schemas, or cloud/infrastructure manifests. The functional boundary is therefore static frontend delivery: HTML pages load their associated source modules, manipulate local DOM/UI state, and render challenge/profile/dashboard experiences entirely in the browser.
Main entry points: vite.config.js Vite · main.js Shared Initialization · dashboard.js Dashboard UI · ChallengeDay.js Challenge Day UI
Components 19
HTML Entry Pages
Standalone documents define page boundaries.
- Landing Page
index.html - Dashboard Page
dashboard.html - Challenge Day Page
ChallengeDay.html - Day 12 Page
day12.html - Profile Page
profile.html
Browser Client
- Shared Initialization
src/main.js - Dashboard UI · Shows challenge progress and daily navigation.
src/dashboard.js - Challenge Day UI · General reusable day experience.
src/ChallengeDay.js - Day 12 UI · Specialized day implementation.
src/day12.js - Profile UI
src/profile.js - Counter Utility
src/counter.js - Global Styles
src/style.css - Dashboard Styles
src/dashboard.css - Challenge Day Styles
src/ChallengeDay.css - Day 12 Styles
src/day12.css - Profile Styles
src/profile.css - Visual Assets · Vite-processed imported static resources.
src/assets
Build & Serving
- Vite · Builds and serves the multi-page client.
vite.config.js - Alternate Server
serve.js
Connections 19
- Vite → Landing Page: serves/builds
- Vite → Dashboard Page: serves/builds
- Vite → Challenge Day Page: serves/builds
- Vite → Day 12 Page: serves/builds
- Vite → Profile Page: serves/builds
- Landing Page → Shared Initialization: loads
- Dashboard Page → Dashboard UI: loads
- Challenge Day Page → Challenge Day UI: loads
- Day 12 Page → Day 12 UI: loads
- Profile Page → Profile UI: loads
- Shared Initialization → Global Styles: uses
- Dashboard UI → Dashboard Styles: uses
- Challenge Day UI → Challenge Day Styles: uses
- Day 12 UI → Day 12 Styles: uses
- Profile UI → Profile Styles: uses
- Dashboard UI → Challenge Day UI: navigates to
- Dashboard UI → Day 12 UI: navigates to
- Shared Initialization → Counter Utility: may use
- Shared Initialization → Visual Assets: imports