A fully-featured financial management application built with React, Supabase, and Tailwind CSS v4. Features real-time data synchronization across multiple browser tabs/devices, authentication, and a modern UI.
π View Live Demo
Try out the application with full real-time synchronization!
Demo Credentials:
- Email:
supabaseuser@yopmail.com - Password:
User@123
π‘ Note: Demo credentials are intentionally public for testing purposes. Data may be reset periodically.
βΆ Watch Demo Video:
https://github.com/user-attachments/assets/e823ac9a-a98c-4974-b5ee-fa9b168ed508
Features Demonstrated:
- β Real-time transaction updates
- β Multi-tab synchronization
- β CRUD operations (Create, Read, Update, Delete)
- β Toast notifications
- Email/Password Registration & Login
- Email Verification Required
- Protected Routes with automatic redirect
- Session Management with proper cleanup
- β Add/Edit/Delete transactions
- π Real-time income/expense tracking
- π Automatic balance calculation
- π Live sync across all browser tabs
- π¨ Custom color picker (8 preset colors)
- π Emoji icon support
- π Income/Expense/Both types
- π Real-time updates
- π Period-based budgets (Daily/Weekly/Monthly/Yearly)
- π Active/Ended budget tracking
- π Total budget amount calculation
- π Real-time synchronization
- π± Fully Responsive (Mobile, Tablet, Desktop)
- π― Modern gradient design
- π Toast notifications for all actions
- β‘ Smooth transitions and animations
- π‘οΈ Row Level Security (RLS) on all tables
- π€ User-specific data isolation
- π Protected API routes
- β Email verification enforcement
See QUICKSTART.md for detailed setup instructions and deployment guide.
- Node.js 18+ and pnpm
- Supabase account (supabase.com)
# Clone the repository
git clone <your-repo-url>
cd react-supabase-realtime-interaction
# Install dependencies
pnpm install
# Configure environment variables
cp .env.example .env
# Edit .env with your Supabase credentials
# Run database migrations
# (See QUICKSTART.md for SQL setup)
# Start development server
pnpm run devreact-supabase-realtime-interaction/
βββ src/
β βββ components/
β β βββ budgets/ # Budget components
β β β βββ BudgetStatsCards.jsx
β β β βββ BudgetList.jsx
β β β βββ BudgetListItem.jsx
β β β βββ BudgetCreateEdit.jsx
β β βββ categories/ # Category components
β β β βββ CategoryStatsCards.jsx
β β β βββ CategoryGrid.jsx
β β β βββ CategoryCard.jsx
β β β βββ CategoryCreateEdit.jsx
β β βββ transactions/ # Transaction components
β β β βββ TransactionStatsCards.jsx
β β β βββ TransactionList.jsx
β β β βββ TransactionListItem.jsx
β β β βββ TransactionCreateEdit.jsx
β β βββ Footer.jsx
β β βββ Header.jsx
β β βββ Layout.jsx
β βββ pages/
β β βββ Budgets.jsx
β β βββ Categories.jsx
β β βββ Dashboard.jsx
β β βββ Home.jsx
β β βββ Login.jsx
β β βββ Register.jsx
β β βββ Transactions.jsx
β βββ App.jsx # Main app with routing
β βββ AuthContext.jsx # Authentication context
β βββ ProtectedRoute.jsx # Route protection
β βββ supabaseClient.js # Supabase configuration
β βββ main.jsx # App entry point
β βββ index.css # Tailwind imports
βββ supabase-schema.sql # Database schema & RLS
βββ supabase-realtime-fix.sql # Realtime configuration
βββ .env.example # Environment template
βββ package.json
| Technology | Purpose |
|---|---|
| React 18.3 | UI Framework |
| Vite 6.2 | Build tool & dev server |
| Supabase | Backend (Auth, Database, Realtime) |
| Tailwind CSS v4 | Styling framework |
| React Router v7 | Client-side routing |
| React Toastify | Toast notifications |
| pnpm | Package manager |
- Stores all financial transactions (income/expense)
- Fields:
id,user_id,amount,description,category,type,date
- Stores user-defined categories
- Fields:
id,user_id,name,color,icon,type
- Stores budget plans
- Fields:
id,user_id,category,amount,period,start_date,end_date
- β Row Level Security (RLS) enabled on all tables
- β User-specific policies (SELECT, INSERT, UPDATE, DELETE)
- β
REPLICA IDENTITY FULLfor real-time DELETE events
- Subscription Setup: Each page subscribes to real-time changes on mount
- Event Handling: Listens for INSERT, UPDATE, DELETE events
- State Updates: Automatically updates React state when changes occur
- Cleanup: Properly removes channels on component unmount
- β Multi-tab synchronization
- β
User-specific filtering (
user_id=eq.${userId}) - β Automatic reconnection handling
- β Console logging for debugging
All CRUD pages follow the same modular structure:
Page Component (Main)
βββ StatsCards Component (Stats display)
βββ CreateEdit Component (Form with submit/reset)
βββ List/Grid Component (Display)
βββ ListItem/Card Component (Individual items)
Benefits:
- π¦ Reusable components
- π§ Easy maintenance
- π§ͺ Testable code
- π Clear separation of concerns
# Build optimized production bundle
pnpm run build
# Preview production build locally
pnpm run preview- Push code to GitHub
- Import project to Vercel
- Add environment variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Deploy!
See QUICKSTART.md for detailed deployment guides (Vercel, Netlify, Railway).
Create a .env file in the root:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here- β User registration with email verification
- β Login/Logout flow
- β CRUD operations on all three pages
- β Real-time sync across multiple tabs
- β RLS policies preventing unauthorized access
- β Toast notifications on all actions
- β Responsive design on mobile/tablet
# Start dev server (default: http://localhost:5173)
pnpm run dev
# Build for production
pnpm run build
# Preview production build
pnpm run preview
# Lint code (if configured)
pnpm run lint- QUICKSTART.md - Setup & Deployment Guide
- DEPLOYMENT_GUIDE.md - Detailed deployment options
- supabase-schema.sql - Database schema with RLS
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Supabase - Open source Firebase alternative
- Tailwind CSS - Utility-first CSS framework
- React - JavaScript library for building UIs
- Vite - Next generation frontend tooling
If you have questions or need help:
- Check the QUICKSTART.md guide
- Review Supabase Documentation
- Open an issue on GitHub
Built with β€οΈ using React, Supabase, and Tailwind CSS