A premium personal budgeting and investment management application built with React and Supabase. Track your expenses, manage budgets, monitor investments, and secure your financial data with PIN protection.
- Budget Tracking: Set budget limits for different expense categories
- Real-time Monitoring: Track spending with visual progress bars
- Smart Alerts: Color-coded warnings (Green: On Track, Amber: Critically Low, Red: Over Budget)
- Transaction Logging: Log both expenses and income with detailed information
- Payment Integration: Quick access to banking apps (GT World, UBA Mobile, Palmpay, Kuda, Parkway Wallet)
- Flexible Periods: Choose weekly, monthly, or yearly budget cycles
- Period-based Calculations: Automatic spending calculations based on selected duration
- Budget Summary: View total budget, total spent, and remaining balance for current period
- Visual Progress: Track budget usage with dynamic progress bars
- Portfolio Management: Track multiple investments with targets
- Progress Monitoring: Visual representation of investment progress
- CRUD Operations: Create, edit, and delete investments
- Total Portfolio Value: See your complete investment portfolio at a glance
- PIN Protection: Secure your app with a 4-digit PIN
- Auto-lock: Re-authentication required every 2 hours
- Encrypted Storage: PIN is hashed using bcrypt (never stored in plain text)
- Session Management: Secure session tracking in Supabase
- Premium UI: Modern glassmorphism design with dark mode
- Responsive: Fully responsive design for mobile and desktop
- Smooth Animations: Micro-animations for enhanced user experience
- Mobile Navigation: Hamburger menu with slide-out drawer for mobile devices
- Node.js (v18 or higher)
- npm or yarn
- Supabase account
- Clone the repository
git clone <repository-url>
cd mebudget- Install dependencies
npm install- Set up environment variables
Create a .env file in the root directory:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key-
Set up Supabase database
Run the SQL scripts located in the
schemas/directory in your Supabase SQL Editor in the following order:schemas/01_user_context.sql- Sets up user context and RLS helper.schemas/02_assign_data.sql- Function to assign data to new users.schemas/03_delete_account.sql- Function to handle account deletion.schemas/04_refactor_settings.sql- Sets up the settings table structure.schemas/05_default_categories.sql- Sets up default categories trigger.schemas/06_fix_settings_fk.sql- Fixes foreign key constraints.schemas/07_fix_trigger_column.sql- Fixes trigger column names.
Note: You can copy the content of these files and paste them into the Supabase SQL Editor.
-
Run the development server
npm run devThe app will be available at http://localhost:5173
- Navigate to Settings: Click on the Settings icon in the sidebar
- Set Budget Duration: Choose weekly, monthly, or yearly budget cycle
- Enable PIN Protection (Optional): Set a 4-digit PIN to secure your app
- Go to Expenses page
- Click Manage Categories
- Create categories with:
- Name
- Type (Expense/Income/Investment)
- Budget Limit
- Icon (emoji)
- Go to Expenses page
- Click Log Transaction
- Toggle between Expense/Income
- Fill in:
- Amount
- Category
- Payee/Source
- Description (optional)
- Payment Source (optional - for expenses only)
- Submit
- Go to Investments page
- Click Manage Investments
- Add investments with:
- Name
- Target Amount
- Current Balance
- React 18.3 - UI library
- Vite 6.0 - Build tool
- React Router 7.1 - Routing
- TailwindCSS 4.1 - Styling
- Lucide React - Icons
- clsx - Conditional styling
- Supabase - PostgreSQL database
- Supabase JS Client - API integration
- bcryptjs - Password hashing
- ESLint - Code linting
- PostCSS - CSS processing
mebudget/
βββ src/
β βββ components/ # Reusable components
β β βββ CategoryManager.jsx
β β βββ ExpenseForm.jsx
β β βββ InvestmentManager.jsx
β β βββ Layout.jsx
β β βββ Modal.jsx
β β βββ PinModal.jsx
β βββ pages/ # Page components
β β βββ Dashboard.jsx
β β βββ Expenses.jsx
β β βββ Investments.jsx
β β βββ Settings.jsx
β βββ services/ # API services
β β βββ api.js
β β βββ settings.js
β βββ lib/ # Utilities
β β βββ supabase.js
β βββ styles/ # Global styles
β β βββ index.css
β βββ App.jsx # Main app component
β βββ main.jsx # Entry point
βββ schemas/ # Database schemas
β βββ schema.sql
β βββ settings.sql
βββ .env # Environment variables (gitignored)
βββ .env.example # Environment template
βββ package.json
The app uses Nigerian Naira (β¦) by default. To change the currency symbol, update all instances of β¦ in the following files:
src/pages/Dashboard.jsxsrc/pages/Expenses.jsxsrc/pages/Investments.jsxsrc/components/CategoryManager.jsxsrc/components/InvestmentManager.jsx
Edit src/styles/index.css to customize colors:
@theme {
--color-primary: #8b5cf6; /* Purple */
--color-secondary: #ec4899; /* Pink */
--color-dark-900: #0f172a; /* Dark background */
}Edit src/components/ExpenseForm.jsx to add/modify banking app integrations:
const PAYMENT_APPS = [
{
id: 'your-bank',
name: 'Your Bank',
color: 'bg-blue-500',
androidScheme: 'yourbank://',
iosScheme: 'yourbank://',
fallbackUrl: 'https://play.google.com/store/apps/details?id=com.yourbank.app'
}
];- Never commit
.envfile - It's already in.gitignore - Use Row Level Security (RLS) in Supabase for production
- Enable Supabase Auth for multi-user support
- Regularly update dependencies for security patches
- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel dashboard
- Deploy
- Build the project:
npm run build - Deploy the
distfolder to Netlify - Add environment variables in Netlify dashboard
This project is licensed under the MIT License.
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct, and the process for submitting pull requests.
For issues and questions, please open an issue on GitHub.
Contact me via email dlktimothy@gmail.com or via LinkedIn linkedin/in/timadey
Made with β€οΈ using React and Supabase