A modern, intelligent budget tracking application built with React, TypeScript, and Vite. Track expenses, visualize spending patterns, and predict future costs with AI-powered insights.
- Google OAuth Authentication - Secure sign-in with Google account
- Expense Tracking - Add, categorize, and manage transactions
- Budget Management - Set and track spending limits by category
- Visual Analytics - Interactive charts and spending insights
- AI Predictions - Predict future expenses based on historical data
- Responsive Design - Works seamlessly on desktop and mobile
- Dark Mode - Built-in dark/light theme support
- Frontend: React 18 + TypeScript + Vite
- UI Components: Radix UI + Tailwind CSS + shadcn/ui
- Charts: Recharts for data visualization
- State Management: React Query + Context API
- Authentication: Google OAuth 2.0 with @react-oauth/google
- Styling: Tailwind CSS with custom animations
- Icons: Lucide React
- Forms: React Hook Form + Zod validation
- Node.js 18+
- npm or bun
-
Clone the repository
git clone <repository-url> cd budget-buddy-ai
-
Install dependencies
npm install # or bun install -
Environment Configuration
cp .env.example .env
Update
.envwith your configuration:# Google OAuth Configuration VITE_GOOGLE_CLIENT_ID=your_google_client_id_here # Data Provider (local, realm, google) VITE_DATA_PROVIDER=google
-
Google OAuth Setup
a. Go to Google Cloud Console b. Create a new project or select existing one c. Enable Google+ API d. Create OAuth 2.0 credentials:
- Select "Web application"
- Add authorized redirect URIs:
http://localhost:8080(development)https://yourdomain.com(production) e. Copy the Client ID to your.envfile
-
Start development server
npm run dev # or bun dev -
Open application
- Navigate to
http://localhost:8080 - Sign in with Google to get started
- Navigate to
src/
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β βββ auth/ # Authentication components
βββ hooks/ # Custom React hooks
β βββ useAuth.tsx # Authentication state
β βββ useBudget.ts # Budget data management
βββ pages/ # Route components
β βββ Index.tsx # Main dashboard
β βββ Auth.tsx # Login/register page
β βββ NotFound.tsx # 404 page
βββ services/ # Business logic
β βββ auth/ # Authentication services
β β βββ types.ts
β β βββ localAuthService.ts
β β βββ googleAuthService.ts
β β βββ realmAuthService.ts
β βββ budget/ # Budget data services
β β βββ types.ts
β β βββ localBudgetService.ts
β β βββ realmBudgetService.ts
β βββ factory.ts # Service factory pattern
βββ types/ # TypeScript type definitions
βββ lib/ # Utility functions
| Variable | Description | Default | Required |
|---|---|---|---|
VITE_GOOGLE_CLIENT_ID |
Google OAuth Client ID | - | Yes (for Google auth) |
VITE_DATA_PROVIDER |
Auth provider (local, realm, google) | local |
No |
- Email/password authentication
- Data stored in localStorage
- No external dependencies
- Secure OAuth 2.0 flow
- User data from Google profile
- Requires Google Cloud setup
- Production-ready authentication
- MongoDB integration
- Real-time data sync
interface Transaction {
id: string;
date: Date;
categoryId: string;
amount: number;
note?: string;
type: 'expense' | 'income';
}interface Budget {
category: Category;
limit: number;
spent: number;
}- Expenses: food, transport, entertainment, shopping, bills, health, other
- Income: salary, freelance, investments, other
- Visit
/authto sign in - Use Google OAuth for quick access
- Or use email/password (local provider)
- Add transactions from the dashboard
- Categorize automatically
- Add notes for context
- Set monthly limits per category
- Track progress visually
- Get alerts when approaching limits
- View spending charts
- Analyze trends
- Export data for external analysis
- AI-powered expense forecasting
- Based on historical patterns
- Helps with financial planning
npm run build- Set production environment variables
- Configure domain in Google OAuth
- Deploy to your preferred platform
- Vercel (recommended)
- Netlify
- AWS Amplify
- Docker
npm run testnpm run type-checknpm run lint- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Follow TypeScript best practices
- Use semantic commit messages
- Maintain component consistency
- Test thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check existing documentation
- Review troubleshooting guide
- v1.0.0 - Initial release with core features
- v1.1.0 - Added Google OAuth integration