How abhishek-sharma2028/policy_ease_website works
Purpose and Runtime
This is a Vite-served React 19 single-page “Policy Translator Platform.” It presents a fixed, curated catalogue of Indian policies and welfare schemes in simplified language, organized by audience category. The app is entirely client-side: no backend, authentication, search service, or AI engine currently exists.
Primary browser entry points are index.html, src/main.jsx, and src/App.jsx. Vite configuration is in vite.config.js.
Application Composition
src/App.jsx is the page-level orchestrator, assembling the landing-page sections and managing the user journey from discovery to policy details. Shared presentation primitives live in:
• src/components/Header.jsx
• src/components/Card.jsx
• src/components/Button.jsx
Global styling and design tokens establish the visual system, including the stated glassmorphism-oriented theme:
• src/index.css
• src/styles/variables.css
Curated Policy Data Boundary
The application’s authoritative content is static frontend data rather than API-delivered records. src/data/policies.js defines the verified policy catalogue, likely including display copy, categories, eligibility information, and links to supporting assets. src/data/categories.js defines the target user groups used to segment discovery.
This is the principal content boundary: changing, adding, or validating policies requires updating these source-controlled datasets and corresponding static media.
• src/data/policies.js
• src/data/categories.js
Discovery and Category Flow
Users begin at the hero and navigate into category-based exploration rather than free-text search. Categories renders the audience/category choices; selection drives the policy-list view, which filters or scopes the curated policy records.
• src/sections/Hero.jsx
• src/sections/Categories.jsx
• src/sections/PolicyList.jsx
The HowItWorks and about-oriented sections support explanation and trust but are not data-processing layers:
• src/sections/HowItWorks.jsx
• src/sections/AboutDetail.jsx
Policy Detail and Eligibility Flow
A selected policy is rendered through PolicyDetail, which is the main policy-information endpoint in the UI. It presents the simplified explanation and can expose supporting PDF/audio resources from the static asset boundary.
EligibilityChecker is the user-assessment stage: it collects or evaluates user-facing eligibility criteria against the selected policy’s static metadata. Any eligibility result is browser-local and deterministic; no external government verification or service integration is present.
• src/sections/PolicyDetail.jsx
• src/sections/EligibilityChecker.jsx
• src/data/policies.js
Static Documents and Audio Assets
Policy source/support material is bundled as public files served directly by Vite. The canonical web-consumed assets are under public/, including MP3 explainers and selected PDFs. The root-level audio files/ and pdfs/ directories appear to retain broader or source copies.
• public/audio/
• public/pdfs/
• public/hero-bg.mp4
Asset paths referenced by policy data must remain aligned with these public filenames; there is no media API, storage service, or content delivery integration visible.
Infrastructure and Extension Boundaries
Execution is Node/npm-based with Vite development/build tooling and React rendering. ESLint is present for code quality, but there are no deployed infrastructure definitions, server routes, databases, or third-party APIs in the repository.
The planned AI recommendation, multilingual support, and personalization would require introducing a new service/data boundary rather than extending the current static-data-only flow.
Main entry points: App.jsx App orchestrator · PolicyList.jsx Policy list · PolicyDetail.jsx Policy detail · policies.js Policy catalogue
Components 18
Browser Runtime
Vite serves the React single-page application.
- Vite build server
vite.config.js - HTML entry
index.html - React bootstrap
src/main.jsx - App orchestrator · Composes sections and manages the discovery-to-detail journey.
src/App.jsx
User Experience
Landing, discovery, detail, and eligibility views.
- Header
src/components/Header.jsx - Hero
src/sections/Hero.jsx - Categories · Audience selection scopes policy exploration.
src/sections/Categories.jsx - Policy list · Filters curated policies by selected category.
src/sections/PolicyList.jsx - Policy detail · Presents simplified policy information and resources.
src/sections/PolicyDetail.jsx - Eligibility checker · Deterministically evaluates user input against selected policy metadata.
src/sections/EligibilityChecker.jsx - How it works
src/sections/HowItWorks.jsx - About detail
src/sections/AboutDetail.jsx - Card and button primitives
src/components/Card.jsx - Global design system · Global CSS and visual tokens support the glassmorphism theme.
src/index.css
Curated Content
Source-controlled policy data and bundled supporting media.
- Policy catalogue · Authoritative policy copy, eligibility metadata, and asset references.
src/data/policies.js - Audience categories
src/data/categories.js - Public PDFs and audio · Vite-served policy explainers and supporting documents.
- Hero video
public/hero-bg.mp4
Connections 22
- Vite build server → HTML entry: serves
- HTML entry → React bootstrap: loads
- React bootstrap → App orchestrator: renders
- App orchestrator → Header: composes
- App orchestrator → Hero: composes
- App orchestrator → Categories: composes
- App orchestrator → Policy list: composes
- App orchestrator → Policy detail: shows selected policy
- App orchestrator → Eligibility checker: opens assessment
- App orchestrator → How it works: composes
- App orchestrator → About detail: composes
- Categories → Audience categories: reads choices
- Categories → Policy list: selected category
- Policy list → Policy catalogue: filters
- Policy list → Policy detail: selected policy
- Policy detail → Policy catalogue: reads details
- Policy detail → Eligibility checker: passes policy metadata
- Eligibility checker → Policy catalogue: evaluates criteria
- Policy catalogue → Public PDFs and audio: references media paths
- Hero → Hero video: uses background
- App orchestrator → Card and button primitives: uses presentation primitives
- React bootstrap → Global design system: loads global styles