MyDriverLog is a specialized financial ecosystem designed for drivers (Uber, DiDi, InDrive). This API serves as the core orchestrator, solving the problem of fragmented income by unifying multiple ride-sharing platforms into a single, automated financial dashboard.
Drivers struggle to track net profit due to:
- Scattered Income: Earnings spread across multiple apps and cash.
- Invisible Costs: Fuel and maintenance expenses are often not deducted in real-time.
- Lack of Discipline: Difficult to save for fixed debts (Rent, Bike Payments) when income is daily and volatile.
A Hybrid Ingestion Architecture:
- Automated: Ingests events from a native Android Listener (No manual typing).
- Strategic: Groups income into "Work Shifts" to measure real hourly performance.
- Goal-Oriented: Automatically allocates funds to priority debts.
graph LR
subgraph Clients
A[🤖 Android Companion] -- "Auto-Ingest Events" --> B
C[📱 Expo Main App] -- "CRUD & Dashboard" --> B
end
subgraph "Backend Core"
B{🧠 NestJS API}
B --> E[JWT / Passport]
B --> F[Business Logic]
end
subgraph "Data Layer"
B --> D[(🐘 PostgreSQL)]
end
- Backend: NestJS (Node.js) with Modular Architecture.
- Database: PostgreSQL with Prisma ORM.
- Security: JWT (JSON Web Tokens) & Bcrypt for password hashing.
- Validation: Class-validator & Class-transformer.
- Environment: WSL2 (Ubuntu) / Docker Ready.
The system is built around the WorkShifts entity to provide high-level analytics:
- Users: Handles identity and authentication.
- WorkShifts: A time-bound session (e.g., "Monday Morning Shift").
- Incomes: Individual earnings (Source: Uber, DiDi, Manual | Method: Nequi, Cash).
- Expenses: Operational costs linked to shifts or users.
- Goals: Financial targets with priority-based allocation logic.
| Method | Endpoint | Description |
|---|---|---|
POST |
/auth/register |
Create a new account |
POST |
/auth/login |
Obtain JWT Access Token |
| Method | Endpoint | Description |
|---|---|---|
POST |
/workshift/start |
Open a new working session |
PATCH |
/workshift/end |
Close active session & calculate totals |
GET |
/workshift/active |
Get current active session details |
| Method | Endpoint | Description |
|---|---|---|
POST |
/incomes |
Register drive (Manual or Automated) |
POST |
/expenses |
Track fuel, food or maintenance |
GET |
/summary/today |
Real-time dashboard (Net profit / Goals) |
src/
├── auth/ # JWT Strategy, Login, Register
├── workshift/ # Logic for opening/closing shifts
├── incomes/ # Income management & event ingestion
├── expenses/ # Expense tracking
├── goals/ # Financial goals & priorities
├── database/ # Database Service(Prisma) & Schema
└── common/ # Guards, Decorators, Filters, DTOs
- Node.js (v22+)
- PostgreSQL (Local, Docker or Neon)
- Clone & Install:
git clone [https://github.com/jallerangel/mydriverlog-api.git](https://github.com/jallerangel/mydriverlog-api.git)
cd mymotofinances-api
npm install
- Environment:
cp .env.example .env
# Edit .env with your DATABASE_URL and JWT_SECRET
- Database:
npx prisma migrate dev --name init
- Run:
npm run start:dev
- Phase 1: Core Auth & Hybrid Ingestion Logic.
- Phase 2: Automated Goal Distribution Algorithm.
- Phase 3: WebSocket Integration for Live Updates.
- Phase 4: Advanced Reporting (Weekly/Monthly PDF).
Luis Jaller
Developed with ❤️ to empower the gig-economy workforce.