How timcooked/finora works
Main Components
• Browser / Client: Where the React/Next.js app runs.
• Next.js Framework: Handles routing (App Router), SSR/SSG if any, and serves static assets.
• React Components:
• Layout & Routing (layout.jsx, page.jsx)
• Feature Modules (BudgetGoals, Calendar, Xlsx)
• Shared UI (Navbar, Dashboard, Chart, MoneyChart, Transactions, DateTransaction, MyCalendar, Xlsx)
• Context API (MoneyContext): Global state manager.
• LocalStorage: Persistent data store in the browser.
• Third‐Party Libraries: Recharts for charts, Tailwind CSS for styling.
Relationships & Data Flow
• On page load, Next.js serves the React app to the browser.
• The top‐level layout.jsx hydrates MoneyContext, which on init reads/writes LocalStorage.
• User interactions in UI components dispatch actions to the Context API.
• Context updates propagate state changes down the component tree.
• Persist state changes back into LocalStorage.
• Chart components subscribe to context for data and render via Recharts.
• Calendar, BudgetGoals, Xlsx pages each consume context and update state.
Architectural Patterns & Design Principles
• Component‐Based Architecture: Clear separation between feature pages and reusable components.
• Single Source of Truth: Context API centralizes state.
• Client‐Side Persistence: LocalStorage abstracts database concerns.
• Modular Design: Each directory under /app corresponds to a route with its own page.jsx and shared components.
Technologies & Frameworks to Call Out
• Next.js (App Router, SSR/SSG, static asset serving)
• React.js (JSX components, hooks)
• Context API (global state provider in context.js/MoneyContext.js)
• Recharts (Chart.jsx, MoneyChart.jsx)
• Tailwind CSS (globals.css, postcss.config.mjs)
• LocalStorage (window.localStorage)