Skip to content

MuhammadTanveerAbbas/flowbooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FlowBooks Logo

FlowBooks

The all-in-one finance toolkit for freelancers track income, manage expenses, send invoices, and estimate taxes.

Live Demo License TypeScript React Supabase Tailwind CSS Vite

FlowBooks Screenshot

FlowBooks is a freelance finance toolkit that consolidates income tracking, invoicing, and expense management into a single dashboard. Built for independent contractors and solo founders who need professional financial visibility without the complexity of enterprise accounting software.


โœจ Features

  • ๐Ÿ“Š Dashboard Real-time overview with smoothed income tracking, expense breakdowns, and 6-month charts
  • ๐Ÿ’ฐ Income Tracking Log payments, link to clients & projects, and track payment status
  • ๐Ÿงพ Invoicing Create professional invoices with line items; mark paid with auto-income generation
  • ๐Ÿ’ธ Expense Management Categorize expenses, attach receipts, and monitor spending patterns
  • ๐Ÿ‘ฅ Client & Project CRM Manage contacts, track project budgets and timelines
  • ๐Ÿงฎ Tax Estimator Quarterly tax estimates based on configurable saving percentages
  • ๐Ÿง™ Onboarding Wizard 3-step guided setup: country & tax status โ†’ income goals โ†’ first client
  • ๐Ÿ”’ Authentication Email/password + Google OAuth with email verification

๐Ÿ† Production Ready

FlowBooks has undergone a comprehensive production readiness audit. Key improvements:

  • โœ… Type Safety TypeScript strict mode enabled, all any types eliminated
  • โœ… Security Environment variable validation, security headers, RLS on all tables
  • โœ… Error Handling Global error boundary, graceful error states, dev-only logging
  • โœ… Performance Code splitting, optimized bundle size, efficient data fetching
  • โœ… Code Quality ESLint passing, no dead code, consistent conventions
  • โœ… Testing Vitest setup with example tests, ready for expansion

See PRODUCTION-AUDIT-REPORT.md for the complete audit report.


๐Ÿ›  Tech Stack

Category Technology
Frontend React 18 + TypeScript 5.8
Build Tool Vite 5.4 with SWC
Styling Tailwind CSS v3 + Radix UI + shadcn/ui
Animation Framer Motion
Backend/DB Supabase (Auth + PostgreSQL + RLS)
Charts Recharts 2.15
Forms React Hook Form 7 + Zod 3.25
Routing React Router v6.30
State TanStack Query v5.83
UI Components Radix UI + Lucide Icons + Sonner (toasts)
Testing Vitest 3 + Testing Library + jsdom
Code Quality ESLint 9 + TypeScript ESLint

Key Technical Highlights

  • Type Safety Strict TypeScript configuration with no implicit any
  • Code Splitting Manual chunks for React, UI, charts, and forms (optimized bundle)
  • Authentication Supabase Auth with protected routes and session management
  • Database Security Row-Level Security (RLS) policies on all tables
  • Error Handling Global error boundary with graceful fallback UI
  • Performance React Query for caching, optimistic updates, and efficient refetching
  • Accessibility Radix UI primitives with ARIA attributes and keyboard navigation
  • Developer Experience Hot module replacement, fast refresh, path aliases (@/)

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (npm install -g pnpm)
  • Supabase account

Installation

# 1. Clone the repo
git clone https://github.com/MuhammadTanveerAbbas/flowbooks.git
cd flowbooks

# 2. Install dependencies
pnpm install

# 3. Set up environment variables
cp .env.example .env.local
# Fill in your Supabase credentials (see Environment Variables below)

# 4. Run the development server
pnpm dev

Open http://localhost:8080 in your browser.


๐Ÿ” Environment Variables

Create a .env.local file in the root directory with the following required variables:

VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your-supabase-anon-key

Get your keys from Supabase Dashboard โ†’ Project Settings โ†’ API.

Note: The project uses .env.local for local development (already in .gitignore). The .env.example file is provided as a template.


๐Ÿ—„ Database Setup

Run the schema against your Supabase project to create all required tables:

Option A: Supabase Dashboard (recommended)

  1. Go to your Supabase project โ†’ SQL Editor
  2. Paste and run the contents of supabase/schema.sql

Option B: Supabase CLI

npx supabase login
npx supabase link --project-ref your-project-ref
npx supabase db push

This creates the following tables (all with Row Level Security enabled):

  • profiles User settings, tax preferences, onboarding status
  • clients Client contact information and notes
  • projects Project tracking with budgets and timelines
  • invoices Invoice generation with line items
  • income Income records linked to clients/projects/invoices
  • expenses Expense tracking with categories and receipts

Key Features:

  • โœ… Row Level Security (RLS) enforced on all tables
  • โœ… Foreign key constraints for data integrity
  • โœ… Automatic updated_at timestamps via triggers
  • โœ… Auto-profile creation on user signup
  • โœ… UUID primary keys for security

๐Ÿ”‘ Google OAuth Setup

To enable "Continue with Google" on the login/signup pages:

  1. Go to Google Cloud Console โ†’ APIs & Services โ†’ Credentials
  2. Create an OAuth 2.0 Client ID (Web application)
  3. Add your domain to Authorized redirect URIs:
    • For local dev: http://localhost:8080
    • For production: https://your-domain.com
    • Also add the Supabase callback URL: https://your-project-ref.supabase.co/auth/v1/callback
  4. In Supabase Dashboard โ†’ Authentication โ†’ Providers โ†’ Google, enable it and paste your Client ID & Secret

๐Ÿ“ Project Structure

flowbooks/
โ”œโ”€โ”€ public/                  # Static assets (favicon)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ layout/          # AppLayout, Sidebar, TopBar, MobileNav
โ”‚   โ”‚   โ”œโ”€โ”€ ui/              # 50+ shadcn/ui components (Radix UI based)
โ”‚   โ”‚   โ”œโ”€โ”€ ErrorBoundary.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ FlowBooksLogo.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ NavLink.tsx
โ”‚   โ”‚   โ””โ”€โ”€ ProtectedRoute.tsx
โ”‚   โ”œโ”€โ”€ hooks/               # useAuth, use-mobile, use-toast
โ”‚   โ”œโ”€โ”€ integrations/
โ”‚   โ”‚   โ””โ”€โ”€ supabase/        # Supabase client & generated types
โ”‚   โ”œโ”€โ”€ lib/                 # Utility functions (cn, etc.)
โ”‚   โ”œโ”€โ”€ pages/               # 13 route-level page components
โ”‚   โ”‚   โ”œโ”€โ”€ LandingPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ Login.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ Signup.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ Onboarding.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ IncomePage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ExpensesPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ClientsPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ProjectsPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ InvoicesPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ TaxPage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ SettingsPage.tsx
โ”‚   โ”‚   โ””โ”€โ”€ NotFound.tsx
โ”‚   โ”œโ”€โ”€ test/                # Vitest setup & example tests
โ”‚   โ”œโ”€โ”€ App.tsx              # Root component with routing
โ”‚   โ”œโ”€โ”€ main.tsx             # App entry point
โ”‚   โ””โ”€โ”€ index.css            # Global styles & Tailwind imports
โ”œโ”€โ”€ supabase/
โ”‚   โ”œโ”€โ”€ schema.sql           # Complete database schema
โ”‚   โ””โ”€โ”€ config.toml          # Supabase CLI config
โ”œโ”€โ”€ .env.example             # Environment variable template
โ”œโ”€โ”€ .env.local               # Local environment (gitignored)
โ”œโ”€โ”€ components.json          # shadcn/ui configuration
โ”œโ”€โ”€ eslint.config.js         # ESLint 9 flat config
โ”œโ”€โ”€ tailwind.config.ts       # Tailwind + typography plugin
โ”œโ”€โ”€ tsconfig.json            # TypeScript strict mode config
โ”œโ”€โ”€ vite.config.ts           # Vite with code splitting
โ”œโ”€โ”€ vitest.config.ts         # Vitest test configuration
โ””โ”€โ”€ package.json             # Dependencies & scripts

๐Ÿ“ฆ Available Scripts

Command Description
pnpm dev Start development server on port 8080
pnpm build Build for production (optimized & minified)
pnpm preview Preview production build locally
pnpm lint Run ESLint on all source files
pnpm test Run tests once (CI mode)
pnpm test:watch Run tests in watch mode (development)

๐ŸŒ Deployment (Vercel)

Deploy with Vercel

  1. Click the button above and connect your GitHub account
  2. Add these environment variables in the Vercel dashboard:
    • VITE_SUPABASE_URL
    • VITE_SUPABASE_PUBLISHABLE_KEY
  3. Deploy
  4. After deploy, add your Vercel domain to:
    • Supabase Dashboard โ†’ Authentication โ†’ URL Configuration โ†’ Site URL and Redirect URLs
    • Google OAuth โ†’ Authorized redirect URIs (if using Google login)

๐Ÿ—บ Roadmap

  • Dashboard with 6-month income/expense charts
  • Invoice creation with line items and auto-income generation
  • Client & project CRM with budget tracking
  • Quarterly tax estimator with configurable rates
  • 3-step onboarding wizard
  • Google OAuth + email/password authentication
  • Email verification flow
  • Row-level security on all database tables
  • TypeScript strict mode with full type safety
  • Global error boundary for graceful error handling
  • Code splitting for optimized bundle size
  • Security headers (X-Frame-Options, CSP, etc.)
  • Production-ready audit completed
  • Recurring invoices with automated generation
  • CSV/Excel export for accountants
  • Multi-currency support with exchange rates
  • Receipt OCR for automatic expense entry
  • Mobile app (React Native)
  • Stripe integration for payment processing
  • Email reminders for overdue invoices

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and ensure:
    • TypeScript compilation passes (pnpm build)
    • Linting passes (pnpm lint)
    • Tests pass (pnpm test)
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Code Standards:

  • Use TypeScript strict mode (no any types)
  • Follow existing code style and conventions
  • Add tests for new features
  • Update documentation as needed

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


๐Ÿ‘จโ€๐Ÿ’ป Built by The MVP Guy

Muhammad Tanveer Abbas SaaS Developer | Building production-ready MVPs in 14โ€“21 days

Portfolio Twitter LinkedIn GitHub

If this project helped you, please consider giving it a โญ

About

The all-in-one finance toolkit for freelancers track income, manage expenses, send invoices, and estimate taxes.

Topics

Resources

License

Stars

Watchers

Forks

Contributors