๐Ÿ’ฐ Finora

AI-Powered Accounting Platform

A powerful, full-stack accounting application built with Next.js 15, featuring double-entry bookkeeping, multi-business support, AI-driven insights, and Stripe subscription billing.

โœจ Features

๐Ÿข Multi-Business Management

  • Create and manage multiple businesses under a single account
  • Switch between businesses seamlessly
  • Business-scoped data isolation

๐Ÿ“Š Double-Entry Bookkeeping

  • Full chart of accounts with hierarchical structure
  • Automatic journal entry generation
  • Account types: Assets, Liabilities, Equity, Revenue, Expenses
  • Balance tracking with debit/credit reconciliation

๐Ÿ’ณ Transaction Management

  • Record income, expenses, and transfers
  • Category-based organization
  • Reference numbers and notes support
  • Transaction reconciliation

๐Ÿ“ˆ Analytics & Reporting

  • Real-time financial dashboard
  • Income vs expense trends
  • Account balance summaries
  • Custom financial reports

๐Ÿ” Authentication & Security

  • Secure session-based authentication via Better Auth
  • Role-based access control (User/Admin)
  • Protected API routes and middleware

๐Ÿ’Ž Subscription Tiers

  • Free: 50 transactions, 1 business
  • Pro: Unlimited transactions, 3 businesses, 30 AI queries/month
  • Business: Everything unlimited, 150 AI queries/month
  • Stripe integration for payment processing

๐Ÿ› ๏ธ Tech Stack

Category Technology
Framework Next.js 15.5 with Turbopack
Language TypeScript 5.0
UI Library React 19
Database PostgreSQL + Prisma ORM
Authentication Better Auth
API Layer Hono (Type-safe REST API)
State Management TanStack Query (React Query)
Styling Tailwind CSS 4
UI Components shadcn/ui + Radix UI
Forms React Hook Form + Zod
Payments Stripe
Animations GSAP + Lenis
3D Graphics Three.js + React Three Fiber
Charts Recharts

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ (auth)/              # Authentication pages (login, register)
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ””โ”€โ”€ [[...route]]/    # Hono API with catch-all routing
โ”‚   โ”‚       โ””โ”€โ”€ controllers/ # API controllers (business, transactions, etc.)
โ”‚   โ”œโ”€โ”€ dashboard/           # Protected dashboard pages
โ”‚   โ”‚   โ”œโ”€โ”€ accounts/        # Chart of accounts management
โ”‚   โ”‚   โ”œโ”€โ”€ analytics/       # Financial analytics
โ”‚   โ”‚   โ”œโ”€โ”€ business/        # Business management
โ”‚   โ”‚   โ”œโ”€โ”€ categories/      # Category management
โ”‚   โ”‚   โ”œโ”€โ”€ reports/         # Financial reports
โ”‚   โ”‚   โ””โ”€โ”€ transactions/    # Transaction management
โ”‚   โ””โ”€โ”€ pricing/             # Subscription pricing page
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ auth/                # Authentication components
โ”‚   โ”œโ”€โ”€ landing/             # Landing page sections
โ”‚   โ”œโ”€โ”€ providers/           # React context providers
โ”‚   โ””โ”€โ”€ ui/                  # shadcn/ui components
โ”œโ”€โ”€ generated/
โ”‚   โ””โ”€โ”€ prisma/              # Generated Prisma client
โ”œโ”€โ”€ hooks/                   # Custom React hooks (TanStack Query)
โ””โ”€โ”€ lib/                     # Utility functions and configurations

๐Ÿš€ Getting Started

Prerequisites

  • Node.js v18 or higher
  • pnpm package manager
  • PostgreSQL database server

1. Clone the Repository

git clone <repository-url>
cd softcom-26

2. Install Dependencies

pnpm install

3. Set Up Environment Variables

Create a .env file in the root directory:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/financeflow?schema=public"

# Authentication
BETTER_AUTH_SECRET="your-secure-secret-key-here"
BETTER_AUTH_URL="http://localhost:3000"

# API URL (optional, defaults to localhost)
NEXT_PUBLIC_API_URL="http://localhost:3000"

# Stripe (for payments)
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."

4. Set Up the Database

# Push schema to database
pnpm dlx prisma db push

# Generate Prisma client
pnpm dlx prisma generate

# (Optional) Seed with sample data
npx tsx seed/index.ts

5. Start Development Server

pnpm dev

Open http://localhost:3000 to view the application.


๐Ÿ“œ Available Scripts

Command Description
pnpm dev Start development server with Turbopack
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint
pnpm dlx prisma studio Open Prisma Studio (database GUI)
pnpm dlx prisma db push Push schema changes to database
pnpm dlx prisma generate Regenerate Prisma client

๐Ÿ—„๏ธ Database Schema

Core Models

  • User - Authentication and profile
  • Business - Multi-tenant business entities
  • LedgerAccount - Chart of accounts with hierarchy
  • Transaction - Income/expense/transfer records
  • JournalEntry - Double-entry bookkeeping entries
  • Category - Transaction categorization
  • Subscription - Stripe subscription management

Account Types

Type Normal Balance Examples
Asset Debit Cash, Accounts Receivable, Equipment
Liability Credit Accounts Payable, Loans
Equity Credit Owner's Equity, Retained Earnings
Revenue Credit Sales, Service Income
Expense Debit Rent, Utilities, Salaries

๐Ÿ”Œ API Structure

The API is built with Hono and uses a catch-all route pattern:

/api/[...route]
โ”œโ”€โ”€ /business          # Business CRUD operations
โ”œโ”€โ”€ /transactions      # Transaction management
โ”œโ”€โ”€ /ledger-accounts   # Chart of accounts
โ”œโ”€โ”€ /categories        # Category management
โ”œโ”€โ”€ /journal-entries   # Journal entries
โ”œโ”€โ”€ /analytics         # Financial analytics
โ”œโ”€โ”€ /reports           # Financial reports
โ””โ”€โ”€ /stripe            # Stripe webhooks & checkout

Type-Safe Client

import { client } from "@/lib/hono";

// Fully typed API calls
const response = await client.api.business.$get();
const businesses = await response.json();

๐ŸŽจ UI Components

This project uses shadcn/ui components built on Radix UI primitives. Components are located in src/components/ui/.

Key components include:

  • Forms with validation (React Hook Form + Zod)
  • Data tables with sorting and filtering
  • Charts and visualizations (Recharts)
  • Modals, drawers, and sheets
  • Toast notifications (Sonner)

๐Ÿ”’ Authentication Flow

  1. Registration/Login - Email/password via Better Auth
  2. Session Management - Secure HTTP-only cookies
  3. Route Protection - Middleware-based access control
  4. API Security - currentUser() helper for server-side auth

Protected Routes

Configure in src/routes.ts:

  • publicRoutes - Accessible without auth
  • authRoutes - Auth pages (redirect if logged in)
  • All other routes require authentication

๐Ÿ’ณ Subscription System

Tiers

Feature Free Pro Business
Transactions 50/month Unlimited Unlimited
Businesses 1 3 Unlimited
AI Queries 0 30/month 150/month
Price $0 $9.99/mo $24.99/mo

Stripe Integration

  • Checkout sessions for upgrades
  • Webhook handling for subscription events
  • Automatic tier management

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License.


**Built with โค๏ธ for modern accounting** [Report Bug](../../issues) ยท [Request Feature](../../issues)

Built With

Share this project:

Updates

Submission history