- Overview
- Key Features
- Tech Stack
- Getting Started
- Environment Variables
- Database Setup
- Project Structure
- API Documentation
- Contributing
- License
Finance SaaS Platform is a modern, full-stack financial management application built with Next.js 14. It helps users track income and expenses, categorize transactions, connect bank accounts via Plaid, and gain insights through interactive dashboards and charts. The platform features a premium subscription model powered by Lemon Squeezy and secure authentication via Clerk.
- Interactive Financial Dashboard - Visualize income, expenses, and account balances with customizable charts
- Multiple Chart Types - Switch between area, bar, line, pie, radar, and radial charts
- Custom Tooltips - Detailed information on hover with category breakdowns
- Real-time Updates - Data refreshes automatically using React Query
- Transaction Table - Comprehensive view with sorting, filtering, and pagination
- Bulk Operations - Delete multiple transactions at once
- Advanced Search - Find transactions quickly by amount, category, or account
- CSV Import - Import transactions from spreadsheets with validation
- Manual Entry - Add transactions via intuitive forms
- Multiple Accounts - Track checking, savings, credit cards, and more
- Custom Categories - Create and manage expense/income categories
- Account Filtering - View transactions by specific accounts
- Date Range Filters - Analyze transactions across custom time periods
- Plaid Integration - Securely connect real bank accounts
- Automatic Syncing - Import transactions directly from your bank
- Bank Disconnection - Manage connected institutions easily
- Subscription Management - Monetized via Lemon Squeezy
- Premium Upgrades - Unlock advanced features and analytics
- Subscription Control - Manage billing and subscription status
- Clerk Authentication - Secure user authentication with Clerk Core 2
- Protected Routes - Dashboard and settings are auth-protected
- User Settings - Customize profile and preferences
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe JavaScript
- TailwindCSS - Utility-first CSS framework
- Shadcn/ui - Beautifully designed components
- Recharts - Composable charting library
- React Hook Form - Performant form validation
- Tanstack React Query - Data synchronization & caching
- Zustand - Lightweight state management
- Hono.js - Fast, lightweight web framework
- Drizzle ORM - TypeScript ORM
- PostgreSQL - Relational database via Neon
- Zod - Schema validation
- Clerk - User authentication & management
- Plaid - Banking data integration
- Lemon Squeezy - Payment processing & subscriptions
Before you begin, ensure you have the following installed:
- Node.js 18+ or Bun runtime
- PostgreSQL database (or use Neon for serverless Postgres)
- Git for version control
- Clone the repository
git clone https://github.com/SaketKothari/finance-saas-expense-tracker-platform-webapp.git
cd finance-saas-expense-tracker-platform-webapp- Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install- Set up environment variables
Create a .env.local file in the root directory and add your environment variables (see Environment Variables section)
- Set up the database
# Generate database migrations
npm run db:generate
# Run migrations
npm run db:migrate
# (Optional) Seed the database with sample data
npm run db:seed- Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open the application
Navigate to http://localhost:3000 in your browser
# Development server
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Run linter
npm run lint
# Database commands
npm run db:generate # Generate migrations from schema
npm run db:migrate # Run migrations
npm run db:studio # Open Drizzle Studio
npm run db:seed # Seed database with sample dataCreate a .env.local file in the root directory with the following variables:
# Database
DATABASE_URL=your_postgresql_connection_string
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# Plaid
PLAID_CLIENT_ID=your_plaid_client_id
PLAID_SECRET=your_plaid_secret
NEXT_PUBLIC_PLAID_ENV=sandbox # or development/production
# Lemon Squeezy
LEMON_SQUEEZY_API_KEY=your_lemon_squeezy_api_key
NEXT_PUBLIC_LEMON_SQUEEZY_STORE_ID=your_store_id
LEMON_SQUEEZY_WEBHOOK_SECRET=your_webhook_secret
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000- Database: Sign up for Neon or use your own PostgreSQL instance
- Clerk: Create an account at clerk.com
- Plaid: Sign up at plaid.com and get sandbox credentials
- Lemon Squeezy: Register at lemonsqueezy.com
This project uses PostgreSQL with Drizzle ORM. The schema includes:
- Users - User account information (managed by Clerk)
- Accounts - Financial accounts (checking, savings, etc.)
- Categories - Transaction categories
- Transactions - Income and expense records
- Subscriptions - Premium subscription data
# Generate migrations after schema changes
npm run db:generate
# Apply migrations to database
npm run db:migrate
# Open Drizzle Studio for visual database management
npm run db:studiofinance-saas-expense-tracker-platform-webapp/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication routes
β β βββ sign-in/
β β βββ sign-up/
β βββ (dashboard)/ # Protected dashboard routes
β β βββ accounts/ # Account management
β β βββ categories/ # Category management
β β βββ settings/ # User settings
β β βββ transactions/ # Transaction management
β βββ api/ # API routes (Hono.js)
β β βββ [[...route]]/
β βββ globals.css
β βββ layout.tsx
βββ components/ # React components
β βββ ui/ # Shadcn/ui components
β βββ charts/ # Chart components
β βββ filters/ # Filter components
β βββ ...
βββ features/ # Feature-based modules
β βββ accounts/
β β βββ api/ # React Query hooks
β β βββ components/ # Feature components
β β βββ hooks/ # Custom hooks
β βββ categories/
β βββ transactions/
β βββ plaid/
β βββ subscriptions/
βββ db/ # Database configuration
β βββ schema.ts # Drizzle schema
β βββ drizzle.ts # Database client
βββ lib/ # Utility libraries
βββ hooks/ # Shared hooks
βββ providers/ # Context providers
The API is built with Hono.js and follows RESTful conventions.
GET /api/accounts- List all accountsGET /api/accounts/:id- Get single accountPOST /api/accounts- Create accountPATCH /api/accounts/:id- Update accountDELETE /api/accounts/:id- Delete accountPOST /api/accounts/bulk-delete- Bulk delete accounts
GET /api/categories- List all categoriesGET /api/categories/:id- Get single categoryPOST /api/categories- Create categoryPATCH /api/categories/:id- Update categoryDELETE /api/categories/:id- Delete categoryPOST /api/categories/bulk-delete- Bulk delete categories
GET /api/transactions- List transactions (with filters)GET /api/transactions/:id- Get single transactionPOST /api/transactions- Create transactionPATCH /api/transactions/:id- Update transactionDELETE /api/transactions/:id- Delete transactionPOST /api/transactions/bulk-delete- Bulk delete transactionsPOST /api/transactions/bulk-create- Import CSV transactions
POST /api/plaid/create-link-token- Create Plaid Link tokenPOST /api/plaid/exchange-public-token- Exchange public tokenPOST /api/plaid/sync-transactions- Sync bank transactions
GET /api/summary- Get financial summary with analytics
GET /api/subscriptions- Get current subscriptionPOST /api/subscriptions/checkout- Create checkout sessionPOST /api/subscriptions/webhook- Handle Lemon Squeezy webhooks
Contributions are welcome! Please follow these steps:
-
Fork the repository
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/finance-saas-expense-tracker-platform-webapp.git
cd finance-saas-expense-tracker-platform-webapp- Create a feature branch
git checkout -b feature/amazing-feature- Make your changes
- Write clean, maintainable code
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
- Commit your changes
git commit -m "feat: add amazing feature"Use conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
- Push to your fork
git push origin feature/amazing-feature- Open a Pull Request
- Provide a clear description of your changes
- Reference any related issues
- Wait for review and address feedback
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- Shadcn for the beautiful UI components
- Clerk for authentication
- Plaid for banking integration
- Lemon Squeezy for payment processing
If you have any questions or need help, please:
- Open an issue
- Check the documentation
Built with β€οΈ by Saket Kothari
β Star this repo if you find it helpful!

