RentLedger.
An Android-first rental payment app for tracking tenant balances, monthly income and receipts, with SQLite storage and optional Bluetooth printing.
ANDROID-FIRST / OFFLINE LEDGER
One payment.
A consistent record.
Local storage, monthly balances and a receipt that stays tied to the payment.
Architecture illustration based on source code.
Not an app screenshot.
RENTLEDGER / DATA MODEL
Stored locally.
Connected by design.
- Tenants & rates
- Monthly charges
- Payments
- Receipt snapshots
- Print attempts
SAVE BEFORE PRINT
const receipt = await save();
onSaved(receipt);
From persistThenPrint.
Printing follows a successful save.
Project Overview
RentLedger is a mobile rental payment management application built to help property owners and boarding-house operators monitor tenant payments, track monthly income, and manage receipts from one interface. It is a single-owner, offline ledger built with React Native and Expo, rather than a hosted website or a payment-processing service.
My Role
Mobile application development, local ledger architecture and receipt workflows. This case study is grounded in the application source and isolated automated checks. Native device behavior and physical printer output require separate acceptance testing.
The Problem
Handwritten records and manually checked spreadsheets make it harder to see which tenants have paid, review a billing month's collected rent, and issue a consistent payment acknowledgement. RentLedger brings these tasks into a local mobile workflow. This is the problem the application is designed to address, not a claim about measured results for a particular client.
The Solution
- Use a month-based dashboard to move from tenant records to outstanding charges, record a partial or full payment, and review the updated balance and payment history.
- Keep financial records in device-local SQLite. The same stored charges and payments drive dashboard totals and monthly records; opening a month creates eligible charges without duplicating existing ones.
- Save each payment and its receipt snapshot in one transaction. Receipt previews and UTF-8 text sharing remain available independently of printer connectivity.
Technologies Used
- React Native 0.88.1
- Expo SDK 58
- TypeScript
- Expo Router
- expo-sqlite
- rn-escpos-printer
- ESC/POS
Key Features
- Create and edit tenant or boarder details, room, contact, monthly rent, due day, notes and rental start month. Archive tenants with an explicit final billing month while retaining history.
- Browse billing months, search tenant/room records, and distinguish UNPAID, PARTIAL and PAID charges. Fully Paid and Unpaid / Partial dashboard actions open the corresponding month-specific lists.
- Show collected rent, expected charges, remaining balances, paid/outstanding counts and collection progress for the selected billing month. These are ledger summaries, not bank reconciliation or revenue analytics.
- Record multiple partial payments, payment date/time, method, reference and notes; review history and correct or delete mistakes with confirmation. Overpayments are rejected.
- Generate persistent, uniquely referenced payment receipts with business details and the balance at issuance. Corrections void the previous receipt and create a new revision; reprints reuse the saved snapshot.
- Configure a remembered Bluetooth printer, paper width, test print, reconnect and opt-in automatic printing. Android selection uses devices paired in system settings and Classic SPP; pairing is not performed inside the app.
- Export and share JSON backups, validate imported records before replacement, and restore inside a transaction. Printer selection and auto-print are cleared on import for the receiving device.
How It Works
- 1. Add a tenant with their room, monthly rent, recurring due day and rental start month.
- 2. Open a billing month. The repository creates one charge per eligible tenant using the effective rental terms, then reads that month's payments and balances.
- 3. Choose an outstanding charge and record a partial or full payment. Validation checks the amount and date; payment and receipt creation either commit together or roll back together.
- 4. The payment screen refreshes from SQLite after saving. Dashboard and records screens reload on navigation focus, so their totals reflect the same stored data.
- 5. Open or share the saved receipt. With Print after saving enabled, a new payment also invokes the printer coordinator after commit. Corrections require an explicit reprint.
- 6. For Android thermal output, pair a compatible ESC/POS printer in system Bluetooth settings, select it in RentLedger, choose 58 mm or 80 mm paper, and run a physical test print. Auto-print starts disabled.
Technical Implementation
- Expo Router separates four tabs—Dashboard, Tenants, Records and Settings—from tenant/payment forms, payment-status lists, receipts, business settings, backup and printer routes. Shared Page components handle safe-area and keyboard-aware layouts.
- A guarded SQLiteProvider opens rentledger.db and runs versioned migrations. Version 3 uses WAL, foreign keys, indexes and constraints across tenants, rates, charges, payments, settings, receipts and print_attempts. Writes use a per-connection queue and transactions with bound parameters.
- Pure TypeScript functions implement local calendar dates, exact centavo parsing, due-date clamping, status and monthly totals. Expected means total charges; collected means payments applied to that billing month; remaining sums each charge's unpaid balance.
- Receipt snapshots store the tenant, business, rental month, payment details, issued balance and revision. Print history records sending, transmitted, skipped, failed or unknown separately from the financial transaction.
- The guarded rn-escpos-printer adapter loads only when its native module is present. Android uses Bluetooth Classic SPP/RFCOMM; an iOS BLE path exists in source but is not a claim of verified iOS support. Expo Go cannot provide the Bluetooth module.
- persistThenPrint saves first; PrintCoordinator claims a persisted attempt and checks connectivity before writing. PrinterSession waits for an active connection operation and can make one bounded reconnect attempt when allowed. A failed or uncertain write is never automatically resent.
Engineering Challenges
- Preventing totals from drifting: integer centavos avoid floating-point rounding, while billing-month aggregation separates the month being paid from the actual payment date. Repository checks and SQLite triggers reject overpayments.
- Preserving rental history: effective-month rental rates and unique tenant/month charge snapshots prevent later rent edits from rewriting existing charges. Due days 29–31 clamp to the last valid date in short months.
- Keeping payment saving independent of printing: serialized transactions commit the financial record and receipt before any printer activity. A disconnect or failed write leaves the payment saved rather than submitting it again.
- Handling uncertain printer outcomes: application locks and persisted print attempts prevent concurrent sends for the same receipt. Interrupted transmissions become unknown; reconnection does not automatically replay old receipts.
- Keeping acknowledgements readable and stable: 58 mm and 80 mm ASCII layouts wrap text, use PHP amounts, and strip control characters. Digital text preserves Unicode; issued snapshots survive later tenant or business-detail edits.
Testing and Quality Assurance
- On November 3, 2026, all 45 existing application tests passed when run read-only from this portfolio task. TypeScript checking and application-source ESLint also passed; no RentLedger source files were changed.
- Repository tests execute actual application code against isolated SQLite databases. Coverage includes charge uniqueness, partial/full payments, concurrent writes, overpayment rejection, historical rates, migration rollback, backup validation and file-backed reopen persistence.
- Receipt and printer tests cover save-before-send, reconnect during saving, failed persistence preventing printer activity, disconnected/uncertain writes, immutable reprints, correction/void history, paper widths and control-character sanitization. Bluetooth transport is mocked.
- Navigation and layout checks cover registered routes, safe native-module loading and navigation insets. These checks do not establish real-phone rendering, keyboard behavior, Bluetooth reliability or readable paper output.
Verified Outcomes
- An implemented offline rental ledger with month-specific balances, local persistence, tenant/payment history, receipt snapshots and validated backup/restore paths, supported by passing isolated automated tests.
- The optional automatic-print code path is implemented and tested with mocked transport. It attempts a receipt only after payment persistence; a transmitted result means bytes were accepted by the transport, not that paper was printed.
- No client results, user counts, commercial launch, store listing or public download are claimed. This portfolio does not present the mobile application as a live web demo.
Limitations
- A compatible native build and physical printer/device testing are still required to verify radio behavior, permissions, native linking, firmware compatibility and paper output. Android BLE-only printers are outside the current adapter's supported transport.
- Android pairing happens in the operating system. Selecting a bonded device is not proof that it supports ESC/POS. A connected socket or transmitted status cannot confirm paper availability or readability.
- Native app screenshots are not available for this case study. The mobile cover is a labeled architecture illustration using source-defined colors, not a fabricated dashboard or a physical-device capture.
- Data stays on one device; there is no cloud sync, account system, payment gateway or credit/overpayment workflow. JSON backups are unencrypted and must be saved externally and kept private.
- Web SQLite is not configured in this version. Native navigation, large-text and keyboard behavior still need physical Android acceptance checks. Receipts are payment acknowledgements, not configured BIR official receipts or tax invoices.
Future Improvements
- Complete the documented physical Android acceptance checklist, including payment persistence after restart, permission denial, large text and keyboard navigation.
- Validate named printer models with both paper widths, power loss during sending, reconnection and explicit reprints before documenting hardware compatibility.
- Add privacy-safe native captures of the dashboard, tenants, payment history and receipt screens using clearly labeled demo data.
Good work starts
with a conversation.
For a development opportunity or a project enquiry, reach me directly.
jayson.bautista135@gmail.com Contact Me
Jayson Bautista