A modern, full-featured expense and revenue tracking application built with Next.js, TypeScript, Tailwind CSS, and Supabase.
- User Authentication - Secure signup/signin with email or Google OAuth
- Expense & Revenue Tracking - Add, edit, delete transactions with detailed categorization
- Categories & Subcategories - Organized transaction categorization with custom icons and colors
- Advanced Filtering - Filter by type, category, date range, amount, and search terms
- Tags System - Tag transactions for better organization
- Payment Methods - Track different payment methods
- Dashboard with Charts - Interactive pie charts, line charts, and bar charts
- Monthly Trends - Track expenses, revenue, and profit over time
- Category Breakdowns - Visual representation of spending by category
- Financial Summary - Key metrics like total expenses, revenue, net profit
- Export to CSV - Export your transaction data
- Import Data - Import transactions from CSV/JSON files
- Cloud Sync - All data synced to Supabase cloud database
- Responsive Design - Works perfectly on desktop and mobile
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS 4
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with Google OAuth
- Charts: Recharts
- Icons: Lucide React
- Date Handling: date-fns
- Node.js 18+ and npm
- A Supabase account and project
git clone <your-repo-url>
cd tutorial3
npm install- Go to Supabase and create a new project
- Go to Settings > API to get your project URL and anon key
- Copy the SQL migration from
supabase/migrations/001_initial_schema.sql - Go to the SQL Editor in your Supabase dashboard and run the migration
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Example:
# NEXT_PUBLIC_SUPABASE_URL=https://abcdefghijk.supabase.co
# NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...To enable Google OAuth:
- Go to Authentication > Providers in your Supabase dashboard
- Configure Google provider with your OAuth credentials
- Add your site URL to the redirect URLs
npm run devOpen http://localhost:3000 in your browser.
The application uses the following main tables:
- categories - Expense and revenue categories with icons and colors
- transactions - Individual transactions with full details
- budgets - Budget tracking per category (future feature)
- user_profiles - Extended user profile information
All tables include Row Level Security (RLS) to ensure users can only access their own data.
- Row Level Security - Database-level security ensuring data isolation
- JWT Authentication - Secure token-based authentication
- Input Validation - Client and server-side validation
- SQL Injection Protection - Parameterized queries via Supabase
- Clean, Modern Design - Professional interface with intuitive navigation
- Responsive Layout - Works seamlessly on all device sizes
- Dark/Light Mode Ready - Built with Tailwind CSS for easy theming
- Accessibility - Semantic HTML and keyboard navigation support
- Touch-Friendly Interface - Optimized for mobile interactions
- Responsive Tables - Horizontal scrolling for transaction lists
- Mobile-First Design - Designed for mobile and scaled up
- Connect your GitHub repository to Vercel
- Add your environment variables in the Vercel dashboard
- Deploy automatically on every push
- Connect your repository to Netlify
- Set the build command to
npm run build - Set the publish directory to
.next - Add your environment variables
src/
├── app/ # Next.js app router
├── components/ # React components
├── contexts/ # React contexts (Auth)
├── hooks/ # Custom React hooks
├── lib/ # Utilities and configurations
├── types/ # TypeScript type definitions
├── utils/ # Helper functions
└── data/ # Static data and constants
- AuthForm - Authentication interface
- Dashboard - Analytics and charts view
- TransactionForm - Add/edit transaction modal
- TransactionList - Filterable transaction table
- Navigation - Main navigation with user menu
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues:
- Check that your Supabase configuration is correct
- Ensure all environment variables are set
- Verify the database migration was run successfully
- Check the browser console for any error messages
For additional help, please open an issue in the repository.