How rakesh9100/beautiify works
Project type and purpose
• Beautiify is a static, component-driven front-end library of HTML/CSS/JS UI patterns.
• It’s packaged as a single-page static site, served via Netlify, enriched with JSON data and a serverless “contributors” endpoint.
File structure
• Top-level:
• index.html, style.css, script.js → core SPA shell
• Components/… → dozens of standalone HTML/CSS/JS snippets
• assets/ → CSS, JS, JSON, HTML fragments for navigation/data
• netlify/functions/contributors.js → serverless function
• package.json (build/dev scripts, dependencies)
• Patterns:
• Purely static assets (no traditional backend)
• JSON-driven navigation & component data
• Serverless “API” for contributor data
Extract architectural hints from the README
• Technology: HTML5, CSS3, vanilla JavaScript
• Hosting: Netlify (CDN for static files + AWS Lambda–style functions)
• Data sources: local JSON files + GitHub API via the function
Main components
a. Frontend SPA (Browser)
• index.html, script.js, style.css
• Pages: Home, About, Components catalog, FAQ, Contact, Contributors
b. Static asset store (CDN/Netlify)
• HTML/CSS/JS/JSON/Images served from Netlify CDN
c. Serverless backend (Netlify Functions)
• /.netlify/functions/contributors → fetches GitHub contributors
d. External service
• GitHub API (for contributor data)
e. Data layer
• Local JSON files under assets/json_files for component metadata
Relationships & data flows
• Browser → CDN: GET index.html, style.css, script.js, JSON files
• Browser renders UI + reads component JSON to build menus
• Browser → Serverless Function endpoint → Netlify Function
→ requests GitHub API → returns contributor list → browser renders
• Developer’s Git (local) → GitHub → Netlify CI/CD on push/PR → deploy static + function
Architectural patterns & principles
• Static first: treat UI as static assets, decoupled from any monolithic server
• JAMstack approach: JavaScript (SPA), APIs (serverless/GitHub API), Markup (static HTML/JSON)
• Modular design: each component folder is a self-contained widget
• CDN + Lambda: use edge caching for assets, functions for dynamic data
Detail without overthinking
• Every folder’s role:
• Components/: static widget templates
• assets/json_files/: UI registry
• netlify/functions/: dynamic data
• CI/CD briefly: GitHub repo → Netlify webhook → deploy