Welcome to the technical documentation for PennyWise. This guide explains the architecture, variables, and styling conventions used in the app.
To modify the visual appearance of PennyWise, you should look in these specific areas:
- File:
index.html - Location: Inside the
<style>tag and the<body>class. - How to change: Modify
background-colorin CSS or Tailwind classes likebg-[#F8F9FB](Light) anddark:bg-slate-950(Dark).
- File:
views/HomeView.tsxandviews/AccountView.tsx - Location: The main balance cards.
- Light classes:
bg-gradient-to-br from-indigo-50 to-blue-50 border-blue-100/50 - Dark classes:
dark:from-slate-900 dark:to-slate-800 dark:border-slate-700/50 - Goal: To change this primary accent, replace
indigoandbluewith your chosen palette (e.g.,emerald,violet).
- File:
components/BottomNav.tsx - Location: The
<nav>container classes. - Current style: Uses
bg-white/80(Light) anddark:bg-slate-900/80(Dark) with a glass-morphism blur. - Text/Icon Highlights: The color logic is determined by the
isActiveconstant:- Light mode active:
text-slate-900 - Dark mode active:
dark:text-white - Inactive:
text-slate-400 dark:text-slate-500
- Light mode active:
- File:
App.tsx - Location: The floating plus button.
- Colors:
bg-indigo-600(Light) andbg-indigo-400(Dark). Use these for high-visibility interactive elements.
activeView: (String) Controls which screen is currently visible (e.g., 'home', 'budget').theme: ('light' | 'dark') Stores the user's current appearance preference.transactions: (Array) The core list of all income and expense objects.accounts: (Array) List of user-created wallets/banks.categories: (Array) List of spending buckets (Food, Bills, etc.).budgets: (Array) User-defined monthly limits per category.isTxModalOpen: (Boolean) Toggles the bottom-sheet transaction entry form.userProfile: (Object) Containsname,avatar, andsavingsGoal. Persisted in localStorage aspennywise_profile.
stats: (HomeView.tsx) A memoized calculation of total income vs expense for the current month.monthlySavings: (ProfileView.tsx) Calculates total income minus expenses for the current month to track against the user's target.groupedTransactions: (TransactionsView.tsx) An object that sorts transactions by date for the history list.budgetProgress: (BudgetView.tsx) Calculates the percentage of a budget used by comparing spending vs limits.
max-w-md: Limits the app width to 448px (Mobile-first feel).no-scrollbar: Custom class (defined inindex.html) to hide scrollbars while allowing scrolling.fixed bottom-0: Sticks navigation elements to the bottom of the viewport.
rounded-[2.5rem]: Large rounded corners for the "Modern App" look.backdrop-blur-md: Creates the frosted glass effect on the navigation bar.animate-in fade-in: Uses Tailwind's animation plugin for smooth screen transitions.shadow-2xl shadow-slate-200: Adds depth with soft, colored shadows.
active:scale-95: Provides haptic-like visual feedback when tapping buttons.focus:ring-0: Removes the default browser input border as requested.transition-all duration-300: Ensures smooth color and size changes over 300ms.