How poap-xyz/poap-website works
Project type and purpose
• This is a static marketing/site project (“POAP: Proof of Attendance Protocol Website”) built with Parcel to transpile JS and SCSS, and deployed to Firebase Hosting.
• Its main purpose is to serve informational pages (index, privacy, terms), branded assets (fonts, images, PDFs), and event‐specific metadata (JSON files under public/events/jsons).
File structure
• Top level
• .firebaserc, firebase.json → Firebase hosting configuration
• package.json, package-lock.json → npm scripts & dependency management
• prebuild.js, postbuild.js → custom hooks to run before/after Parcel build
• docs/ → PR templates and documentation
• public/
• index.html, privacy-policy.html, terms-of-service.html → static entry points
• assets/ → compiled JS, SCSS, fonts, images, PDFs
• events/
– badges/ → PSDs for badge design
– jsons/ → per-event metadata JSON files
README for additional insights
• Uses Parcel as the build tool
• npm run dev spins up a local dev server; build artifacts get output to a dist folder
• Deployment is handled via npm run build / npm run deploy to Firebase
Main components
a. Development environment
• Developer machine (npm, Parcel, git)
b. Source repository
• GitHub (or other Git host) storing code, public/ folder, prebuild/postbuild scripts
c. Build system
• Parcel bundler
• prebuild.js and postbuild.js tasks
d. Static assets
• HTML entrypoints
• Compiled CSS (from SCSS)
• Bundled JS
• Images, fonts, PDFs
• Event JSON data
e. Deployment pipeline
• CI or local npm run build
• Firebase CLI (firebase.json/.firebaserc)
f. Hosting & CDN
• Firebase Hosting (global CDN layer)
g. End‐users
• Web browsers fetching static assets & JSON over HTTPS
Relationships & data flows
• Developer machine → (git push) → Source repository
• Source repository → (CI/CD trigger or manual) → Build system (npm run build)
• Build system:
• Runs prebuild.js
• Parcel compiles JS/SCSS → dist/
• Runs postbuild.js
• Dist/ output → Firebase CLI deploy → Firebase Hosting
• User’s browser → HTTPS requests → Firebase CDN → static files & JSON
Architectural patterns & design principles
• Static‐first architecture: all pages and assets are precompiled/deployed
• Decoupled asset pipeline: SCSS, JS separated in source, compiled to optimized bundles
• Immutable content: event JSON files are versioned alongside code
• Hosted CDN edge for low‐latency global delivery