optical_tool.mp4
Optical Tool is a production-ready native Android application built for optical shops and optometry professionals. It covers end-to-end business operations — from prescription calculations and invoice generation to inventory notes and shop analytics — all with full offline-first support.
Built entirely in Kotlin + Jetpack Compose, delivered as a freelance client project.
- Google OAuth one-click sign-in
- Email & password login with OTP verification
- Secure password recovery flow
- Session persistence via Supabase Auth
- Input SPH, CYL, AXIS, ADD values with real-time validation
- Intelligent CYL/AXIS dependency checks
- Prescription transposition between formats
- Screenshot & share calculated results
- Archive and retrieve past prescriptions
- Auto-numbered invoice generation
- Attach prescription images to bills
- Payment status tracking (paid/unpaid) with visual indicators
- Sales analytics dashboard (total sales, outstanding amounts)
- PDF export, native printing, and WhatsApp sharing
- Advanced search & filter by date, status, and customer
- Pickup date scheduling.
- Digital storage with image attachments
- Image compression optimized to ~250KB without quality loss
- Auto-generated sequential prescription numbers
- Quick search and browse
- Inventory tracking for glasses stock
- Notes and business documentation
- Configure shop name, address, and contact details
- Custom bill footer and terms
- Currency symbol customization
- Professional branding on all generated invoices
| Layer | Technology |
|---|---|
| Language | Kotlin 100% |
| UI | Jetpack Compose + Material Design 3 |
| Architecture | MVVM + Clean Architecture + Repository Pattern |
| DI | Dagger Hilt |
| Local DB | Room Database |
| Backend | Supabase (Auth + Cloud Storage) |
| Async | Kotlin Coroutines + Flow |
| Navigation | Jetpack Navigation Compose |
| Native Android PDF Libraries | |
| Auth | Google OAuth 2.0 + Email OTP |
| Splash | Android 12+ Splash Screen API |
opticaltool/
├── data/
│ ├── auth/ # Authentication logic
│ ├── local/ # Room DAOs & Database
│ ├── models/ # Prescription, Bill, Notebook models
│ └── repository/ # Repository interfaces & implementations
├── di/ # Hilt modules
├── navigation/ # Nav graph & route definitions
├── ui/
│ ├── auth/ # Login, Signup, Password Recovery
│ ├── calculator/ # Prescription Calculator
│ ├── prescriptioncreation/
│ ├── myprescriptions/
│ ├── billcreation/
│ ├── mybills/
│ ├── notebook/
│ ├── home/
│ ├── profile/
│ ├── shopdashboard/
│ ├── splash/
│ └── theme/ # Material Design 3 Theme
└── utils/ # PDF, Image compression, Date utilities
| Metric | Value |
|---|---|
| Kotlin Files | 61 |
| Screens | 13+ |
| Modules | Auth, Calculator, Prescriptions, Bills, Notebook, Profile |
| DB Tables | Users, Prescriptions, Bills, Notebook Entries |
| Utility Classes | 9+ |
| Project Type | Freelance / Client Delivery |
| Team Size | Solo Developer |
1. Custom Image Compression Built a compression pipeline that reduces prescription photo size to ~250KB (85% reduction) while preserving readability — critical for cloud storage costs and upload speed.
2. Offline-First Architecture Designed a dual-layer data strategy: Room handles all local operations while Supabase syncs in the background. The app functions 100% without internet.
3. Complex Prescription Validation Implemented business-rule validation (CYL requires AXIS, dropdown initialization at 0.00, etc.) that mirrors real optometry workflows.
4. PDF Generation & Printing Custom PDF templates with shop branding using native Android APIs, including direct print support and WhatsApp sharing.
- ✅ 60% reduction in prescription processing time
- ✅ Eliminated manual billing errors through automation
- ✅ 100% offline functionality — zero downtime for the business
- ✅ Production delivered to client, actively in use