TimberFlow is a modern, high-fidelity Multi-Tenant SaaS platform designed for sawmills, wood depots, and timber merchants. It provides a complete cloud ERP and offline-first log sheet calculator suite to streamline round wood operations from remote yards to consolidated business analytics.
- Modern Design: Built using Tailwind CSS v4, featuring sleek gradient accents, glassmorphic navigations, responsive mockups, and micro-animations.
- Live Interactive Hoppus Calculator: Prospective clients can calculate round wood volume (in CuFt) and estimated pricing live on the page by adjusting sliders.
- Dedicated Workspace Registration: Seamless business workspace registration that directs new owners directly to the billing subscription select modal (
/subscription).
- Tenant Isolation: Complete database routing security for tenants.
- Super Admin Portal: Control panel enabling administrators to update subscriber plans (Free, Starter, Professional, Enterprise), toggle suspension, delete tenants, and view global security audit logs.
- Operator Directory & Scope: Invite operators with customized access permissions mapped to specific physical depots/branches.
-
Hoppus (Quarter Girth) Formula: Calculates wood volume using:
$$\text{Volume (CuFt)} = \left(\frac{\text{Girth (Inches)}}{4}\right)^2 \times \frac{\text{Length (Feet)}}{144}$$ - True Cylinder Formula: Pi-based volume calculation.
- Carry-Forward Rates: Custom log rates are carried forward automatically to new rows of the same wood species to accelerate bulk entries.
- Common Wood Species Defaults: Option to pin common log length, quantity, and species to auto-fill new rows.
- Sorted Wood Species: Pinned common wood species bubble to the top of selection dropdowns for rapid data logging.
- Floating Notification Toasts: Auto-hiding toast alerts for actions like saving log logs or reporting errors.
- Voice Assistant Logging: Hands-free speech recognition parses commands like "Teak length 12 girth 36 quantity 4" and populates the log sheet.
- Bulk Girth Entry: Paste space-separated perimeters to auto-fill logs counts and lengths.
- Overview Tab: Graphic charts showing depot performances, wood demand distributions, and top customer volumes using Recharts.
- Chronological Tables: Detailed Weekly (ISO Weeks), Monthly, and Yearly breakdown lists dividing Sells vs Buys aggregates and calculating net cash balances.
- High-Fidelity PDF Bills: Downloads professional invoices complete with table aggregates, loading charges, transport fees, custom discounts, and signature lines.
- Verification QR Code: Generates secure verification QR codes mapped to the invoice ID.
- Branded Footers: Includes a
"Page X of Y"and"Powered by TimberFlow"footer branding line on every page. - Excel Sheet Export: Instantly exports reports, wood species summaries, and charge details as Excel spreadsheets.
- IndexedDB Storage: Stores log drafts and customer details locally when there is no internet connection.
- Auto-Synchronization: Automatically syncs draft reports to the cloud once network connectivity is restored.
- Frontend Framework: Next.js 16 (Turbopack) & React 19
- Styling: Tailwind CSS v4 & Lucide Icons
- Database: PostgreSQL (Multi-tenant routed databases)
- ORM: Prisma Client
- State Management: Zustand
- Local Storage Caching: IndexedDB
- Internationalization:
next-intl(Fully localized in Englishen, Hindihi, and Malayalamml) - Calculations Testing: Node.js Native Test Runner
- Node.js (v18 or higher)
- PostgreSQL (or use the built-in mock JSON database)
-
Clone the repository and navigate to the project directory:
cd TimberSaaS -
Install dependencies:
npm install
-
Set up your environment variables: Copy the default variables to a
.envfile in the root folder:# NEXTAUTH_URL should map to your local running dev port NEXTAUTH_URL="http://localhost:3001"
-
Database Setup (Optional): If you have a local PostgreSQL instance running, apply the Prisma schemas:
npx prisma migrate dev
Note: If you do not have PostgreSQL running, set
NEXT_PUBLIC_MOCK_DB="true"in your.envfile to use the mock JSON file database. -
Start the Next.js development server:
npm run dev
Open http://localhost:3001 in your browser to view the application.
- Run automated calculation tests:
npm test - Verify code style and formatting:
npm run lint
- Build production optimized bundle:
npm run build