How ic3w4r/finpercent works
Project type and purpose
• This is a single‐page financial “pocket audit” application (“finpercent”) built entirely in React + TypeScript and bundled with Vite.
• It provides budgeting, debt management, investment pooling, stock‐market insights, and user settings, all rendered client-side.
File structure
• No server‐side or monolithic backend folder—this is purely a front-end SPA with static assets in public/.
• src/pages/ holds route targets (DashboardPage, DebtRepaymentPage, StockMarketPage, etc.).
• src/components/ holds reusable UI and chart components (LineChart, PieChart, SankeyDiagram).
• State management via React Context: src/context/CurrencyContext.tsx and src/contexts/ThemeContext.tsx.
• Utility and style layers: src/utils/, src/styles/, PostCSS/Tailwind configuration, plus vite.config.ts for build.
README
• Minimal description: “The pocket fin audit.”
• No explicit mention of APIs, so assume external financial/stock data services (or mock JSON in public/finpercentanim.json).
• Client (Browser) running the React SPA.
• Static asset server or CDN (serves index.html, JS bundle, CSS, public JSON).
• External Financial Data APIs (currency exchange, market data).
• Optional Authentication Service if used (not explicit, but SecuritySettings.tsx hints at login/2FA).
• Browser Local Storage or Browser File Uploader (for user backups via FileUploader).
b. Relationships & data flow
• Browser requests index.html → CDN/static host → receives JS/CSS → SPA loads.
• At runtime, SPA uses React Router (defined in src/routes.tsx) to render pages.
• Components call external APIs (e.g., fetch currency rates, stock tickers).
• Context Providers wrap App to manage global theme/currency state.
• User interactions (file upload, settings change) read/write to local storage or send to API.
c. Architectural patterns
• Component-based architecture (atomic components in components/ui/, domain components in components/debt/, etc.).
• Context-based state management for cross-cutting concerns (theme, currency).
• Page–layout separation (layouts/StockMarketLayout.tsx).
• Clear separation of concerns: Charts, UI controls, pages.
d. Key technologies
• React + TypeScript, Vite (dev server & bundler), Tailwind CSS & PostCSS, React Router.
• Chart libraries (Sankey, line/pie chart implementations).
Detailed and exhaustive breakdown
• For each chart component, annotate the data it consumes (time series, pie breakdown, flow).
• How ThemeContext and CurrencyContext wrap the root App.tsx.