Sophisticated Financial Intelligence & Enterprise-Grade Accounting
CashTrack is a premium web application designed for users who demand precision, elegance, and deep insights into their financial lifecycle. Built with a "Premium Noir" aesthetic, it combines high-performance real-time synchronization with a sophisticated multi-ledger architecture.
- Node.js 18+ and npm
- A Supabase account (sign up)
- Google Chrome (for OAuth)
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Add your Supabase credentials to .env
# VITE_SUPABASE_URL=your_project_url
# VITE_SUPABASE_ANON_KEY=your_anon_key- Go to your Supabase project dashboard
- Navigate to the SQL Editor
- Run the complete schema from
src/lib/schema.sql - Verify the
handle_new_usertrigger was created
# Development server
npm run dev
# Production build
npm run build
# Preview production build
npm run preview
# Lint code
npm run lintThe dev server will start at http://localhost:5173
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Fast build tool
- React Router - Client-side routing
- Tailwind CSS v3 - Utility-first CSS
- Custom Dark Theme - Premium aesthetic
- Inter Font - Clean typography
- Lucide React - Icon library
- Supabase - Backend as a service
- PostgreSQL database
- Row-level security (RLS)
- Real-time subscriptions
- File storage
- TanStack Query - Server state management
- React Hook Form - Form state management
- Zod - Schema validation
src/
βββ components/ # Reusable UI components
β βββ ProtectedRoute.tsx
βββ context/ # React contexts
β βββ AuthProvider.tsx
βββ lib/ # Utilities and configs
β βββ schema.sql # Database schema
β βββ supabase.ts # Supabase client
β βββ utils.ts # Helper functions
βββ pages/ # Route pages
β βββ AuthCallback.tsx
β βββ Dashboard.tsx
β βββ Login.tsx
βββ types/ # TypeScript types
β βββ database.types.ts
βββ App.tsx # Main app component
βββ index.css # Global styles
βββ main.tsx # App entry point
The app supports multiple authentication methods:
- Standard email and password authentication
- Secure password requirements
- Email verification
- One-click Google sign-in
- Automatic profile creation
- Seamless authentication flow
The application uses a sophisticated multi-ledger architecture:
profiles- User profiles linked to Supabase Authbusinesses- Business entitiesbusiness_members- Junction table for business membershipledgers- Financial ledgers (personal or business)entries- Financial transactionsinvites- Business invitation codesaudit_logs- Immutable change history
- Per-Member Ledgers: Each business member has their own ledger
- Soft Deletes: Entries are never truly deleted
- Audit Trail: Complete history of all changes
- RLS Policies: Row-level security for data isolation
The app uses a custom dark theme with HSL-based color tokens:
- Primary:
hsl(217.2 91.2% 59.8%)- Blue accent - Background:
hsl(222.2 84% 4.9%)- Dark background - Foreground:
hsl(210 40% 98%)- Light text - Muted:
hsl(217.2 32.6% 17.5%)- Subdued elements
- Font: Inter variable font
- Weights: 300-900
- Optimized for readability
- Phase 1: Foundation & Infrastructure β
- Phase 2: Core Personal Finance (MVP)
- Phase 3: Business Architecture & Roles
- Phase 4: Per-Member Ledger Logic
- Phase 5: Offline-First & Sync
- Phase 6: Data Integrity & Advanced Features
- Phase 7: Analytics & KPIs
- Phase 8: Testing & Deployment
# Required
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyTo enable Google OAuth:
- Go to Supabase Dashboard β Authentication β Providers
- Enable Google provider
- Add OAuth credentials from Google Cloud Console
- Set redirect URL:
https://your-project.supabase.co/auth/v1/callback
# Type checking
npm run build
# Linting
npm run lintThe project uses @/ as an alias for src/:
import { supabase } from '@/lib/supabase'
import { useAuth } from '@/context/AuthProvider'# Create production build
npm run build
# Output will be in /dist folder
# dist/
# βββ index.html
# βββ assets/
# β βββ index-[hash].css
# β βββ index-[hash].jsDeploy the dist folder to any static hosting service:
- Vercel
- Netlify
- Cloudflare Pages
- AWS S3 + CloudFront
This is a personal project, but suggestions and bug reports are welcome!
Private project - All rights reserved
Built with β€οΈ using React, TypeScript, and Supabase