A modern digital transport record book for tracking trips, biltis, and freight payments. Built as a desktop application using Next.js and Electron with a local SQLite database.
- Trip Management — Create, view, filter, and manage transport trips with details like truck number, route, weight, and bilti tracking.
- Company Directory — Maintain records of material and truck companies with contact details and employee information.
- Payment Ledger — Track freight payments, advances, commissions, TDS, loading/unloading charges, and extra charges per trip party.
- Refund Ledger — Manage and record refund details against payments, with PDF report generation.
- Reports — Generate insights and summaries from trip and payment data.
- Forms — Structured forms for data entry across all modules.
- PDF Export — Generate PDF reports for refund ledgers and trip summaries.
- Dark/Light Theme — System-aware theme switching with manual override.
- Offline-First — Runs entirely offline with a local SQLite database — no internet required.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Desktop | Electron |
| Database | SQLite via better-sqlite3 |
| ORM | Prisma 7 |
| UI | Radix UI + Tailwind CSS 4 |
| State | Zustand |
| Data Fetching | TanStack Query |
| Forms | React Hook Form + Zod 4 |
| @react-pdf/renderer | |
| Language | TypeScript |
- Node.js (v20+)
- npm
git clone https://github.com/s-adi-dev/TransLedger.git
cd TransLedgernpm installCreate a .env file in the project root:
DATABASE_URL="file:./dev.db"Run Prisma migrations to initialize the SQLite database:
npx prisma migrate deploynpx prisma generateRun the Next.js dev server and Electron together:
npm run devThis starts the Next.js server on http://localhost:3000 and opens the Electron window once the server is ready.
| Command | Description |
|---|---|
npm run dev |
Start Next.js + Electron in development mode |
npm run dev:next |
Start only the Next.js dev server |
npm run build |
Build the Next.js application for production |
npm run start |
Start the production Next.js server |
npm run lint |
Run ESLint |
├── app/ # Next.js App Router
│ ├── (panel)/ # Main application pages
│ │ ├── trips/ # Trip management
│ │ ├── companies/ # Company directory
│ │ ├── payment-ledger/
│ │ ├── refund-ledger/
│ │ ├── forms/
│ │ └── reports/
│ └── api/ # REST API routes
│ ├── trips/
│ ├── companies/
│ ├── employees/
│ ├── payments/
│ └── refunds/
├── components/ # React components
│ ├── layout/ # Sidebar, Navbar
│ ├── pdf/ # PDF report templates
│ ├── providers/ # Context providers
│ └── ui/ # Reusable UI components (Radix-based)
├── electron/ # Electron main process
├── generated/ # Prisma generated client
├── hooks/ # Custom React hooks
├── lib/ # Utilities, Prisma client, config
├── prisma/ # Schema & migrations
├── query/ # TanStack Query hooks
├── services/ # API service functions
├── stores/ # Zustand state stores
└── validators/ # Zod validation schemas
The application manages the following core entities:
- Trip — Transport trip records with route, weight, truck, and date info.
- Bilti — Bilti (receipt) tracking with status workflow (pending → received → submitted).
- PartyPaymentDetails — Freight payment records for material and truck parties per trip.
- RefundDetails — Refund records linked to payments.
- Company — Material and truck companies.
- Employee — Employees associated with companies.
GNU General Public License v3.0 - see LICENSE file for details.