How 0x-parzival/site works
Project type and purpose
• This is a front-end, single-page web application (SPA) built with React (using Vite for dev/build), TypeScript, Tailwind CSS, and Chart.js.
• Purpose: an interactive, responsive “Spiritual Resources” website featuring data visualizations (e.g. Bhagwatam analysis), particle effects, and modular page layouts.
File structure
• Top‐level:
• config files (tsconfig.json, tailwind.config.js, netlify.toml, vercel.json, windsuf_deployment.yaml)
• public/ — static assets (index.html, manifest, images, redirects)
• src/ — application source code
• src/ contains:
• pages/ — routeable page components (Home, AECH, DataTreya, gesture-ai, etc.)
• components/ — reusable UI building blocks, sub‐folders per feature (AECH, DataTreya, devdat, etc.)
• context/ — React Context providers (Theme, Particles)
• hooks/ — custom hooks (useMobileDetect, useParticles)
• data/ — in-app JSON/TS data sets
• styles/ — global and feature CSS
• types/ — TypeScript definitions
• Build & deployment: uses Vite (via package.json scripts), deployed to Netlify/Vercel (netlify.toml, vercel.json).
README insights
• Tech stack: React 18, TS 4.9, Tailwind 3.3, Chart.js 4.x, React Router 6.x, tsparticles, React Context API.
• Features emphasize interactivity, responsiveness, data viz, dynamic styling.
a. Main components
• User’s Browser (Client)
• CDN/Static Host (Netlify/Vercel)
• React SPA (bundle JS/CSS)
• React Router (client‐side routing)
• Context Providers (ThemeContext, ParticlesContext)
• Page Modules (Home, AECH, DataTreya, gesture-ai, etc.)
• UI Components (modular sub‐components in /src/components)
• Data Layer
– Local TS data modules (/src/data)
– (Optional) External API (VITE_API_URL)
• Build Tools (Vite, Tailwind, ESLint/Prettier) – shown as offline process
b. Relationships & interactions
1. Browser requests index.html → served by CDN
2. index.html loads JS/CSS bundles → initializes React App
3. React App wraps content in Context Providers
4. React Router picks the page module based on URL
5. Page modules load child UI components
6. Components read local data modules or fetch from external API
7. Chart.js & tsparticles render visualizations/effects
8. User interactions update React state/context → UI re-renders
c. Architectural patterns & principles
• Component-based decomposition (pages → feature components)
• Client-side routing (SPA with React Router)
• Context API for cross‐cutting state (theme, particles)
• CSS utility framework (Tailwind) for styling consistency
• Data‐visualization separation (DataTreya folder)
• Static hosting for performance & scalability
d. Key technologies & roles
• React & React Router: UI & routing
• TypeScript: type safety
• Tailwind CSS: styling
• Chart.js: charts & graphs
• tsparticles: background effects
• Vite: development server & bundler
• Netlify/Vercel: CI/CD & hosting