Skip to content

Alexmaster12345/InvestmentTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InvestmentTracker

A modern work-hours tracker for Android

Android Kotlin Jetpack Compose Firebase License: MIT


Overview

InvestmentTracker is a beautifully designed Android app that helps workers effortlessly track their shifts, calculate earnings in real-time, and maintain a complete work history — all with a single tap.

Whether you are a barista, nurse, warehouse worker, or freelancer, InvestmentTracker keeps your hours honest and your paycheck accurate.


Features

Secure Authentication

  • Sign up / Sign in with Email & Password or Google Sign-In
  • Continue as Guest for quick access without an account
  • Personalized greeting — dashboard shows "Hello, Guest" or "Hello, <your name>"
  • Guest mode hides account-specific settings (Personal Info, Job Details, Change Password)

The Live Clock

  • Prominent one-tap Clock In button on the dashboard
  • Triggers a persistent foreground notification so you can track time without keeping the app open
  • Real-time elapsed time display
  • Shift Start/End alert notifications — get notified the moment you clock in or out

Dynamic Timesheet Table

A clean, scannable timesheet built with Jetpack Compose:

Column Description
Date Day the shift occurred
Shift Type Morning / Night / Overtime
Duration Auto-calculated from clock in/out
Estimated Pay Based on your hourly rate

Smart Calculations

  • Automatically subtracts unpaid break time
  • Applies 1.5x Time-and-a-Half multipliers for overtime hours
  • Weekly summary with total hours and total estimated earnings

Weekly View

  • 7-day week grid showing worked days at a glance
  • Tap any day to see detailed shift entries for that day
  • Visual indicators for days with logged hours

Summary Screen

  • Comprehensive summary of all logged shifts with Week / Month / Year filter
  • Displays total hours, total pay, and shift count at a glance
  • Shifts grouped by date with per-day subtotals
  • Color-coded shift type indicators (Morning / Night / Overtime)
  • Accessible from the Summary tab in the bottom navigation bar

Notification Settings

  • Shift Start/End Alerts — toggle notifications when you clock in or out
  • Scheduled Reminders — set a daily clock-in and clock-out reminder at a specific time
  • Day Selection — choose which days of the week (Sun–Sat) reminders should fire
  • Alert Style — toggle sound and vibrate independently
  • Reminders use AlarmManager for reliable background delivery, even in Doze mode
  • Reminders persist across device reboots via BOOT_COMPLETED receiver

Profile & Settings

  • Dynamic user profile — shows guest info or logged-in user details
  • Avatar with initial letter, role, and employee ID
  • Personal info and job details (hidden for guest users)
  • Configurable hourly rate
  • Notification preferences with navigation to full settings screen
  • Appearance customization

Responsive Design

  • Adaptive UI that scales across all device resolutions
  • Custom Dimens system based on screen width (baseline: 392dp)
  • Font sizes, icon sizes, spacing, button heights, and paddings all scale proportionally
  • Scale factor clamped between 0.75x–1.35x to support small phones through tablets
  • Provided via CompositionLocalProvider at the theme level — available in every screen

Cloud Persistence (optional)

  • Firestore integration keeps your history safe even if you lose your phone
  • Offline Mode — data syncs automatically when you are back online

Tech Stack

Layer Technology
Language Kotlin
UI Jetpack Compose + Material 3
Architecture MVVM
Local Storage SharedPreferences
Authentication Firebase Auth
Cloud Database Cloud Firestore
Background Service Android Foreground Service
Scheduled Alarms AlarmManager (exact alarms)
Navigation Compose State-based Navigation
Responsive Scaling Custom CompositionLocal Dimens
Build System Gradle (KTS)

Project Structure

app/src/main/java/com/example/shiftsync/
├── MainActivity.kt                  # App entry point & Compose navigation host
├── ShiftDomain.kt                   # Models, payroll calculator, persistence helpers
├── ClockForegroundService.kt        # Live clock persistent notification service
├── ShiftAlertHelper.kt              # Clock in/out notification alerts
├── ShiftReminderReceiver.kt         # Scheduled reminder BroadcastReceiver + AlarmManager
├── BootReminderReceiver.kt          # Re-schedules reminders after device reboot
├── ui/
│   ├── HomeScreen.kt                # Main dashboard with Clock In/Out
│   ├── ManualEntryScreen.kt         # Manual hours entry form
│   ├── CalendarScreen.kt            # Calendar / weekly overview
│   ├── SummaryScreen.kt             # Summary with Week/Month/Year filter
│   ├── NotificationsScreen.kt       # Notifications list screen
│   ├── NotificationSettingsScreen.kt # Notification & reminder settings
│   ├── ProfileScreen.kt             # User profile & settings
│   ├── LoginScreen.kt               # Authentication screen (login + guest)
│   └── theme/
│       ├── Color.kt                 # Color palette
│       ├── Dimens.kt                # Responsive dimensions system
│       ├── Theme.kt                 # Material 3 dark theme + ProvideDimens
│       └── Type.kt                  # Typography

Getting Started

Prerequisites

  • Android Studio Hedgehog or later
  • Android SDK 24+
  • A Firebase project (for Auth and Firestore features)

Clone the Repository

git clone https://github.com/Alexmaster12345/InvestmentTracker.git
cd InvestmentTracker

Firebase Setup

  1. Go to Firebase Console and create a new project
  2. Add an Android app with package name com.example.shiftsync
  3. Download google-services.json and place it in the app/ folder
  4. Enable Authentication (Email/Password + Google) in the Firebase console
  5. Enable Firestore Database in the Firebase console

Build & Run

# Run on a connected device or emulator
./gradlew installDebug

# Run unit tests
./gradlew test

Or open the project in Android Studio and press ▶ Run (Shift+F10).


Testing

Unit tests cover payroll calculation scenarios:

./gradlew test

Test file: app/src/test/java/com/example/shiftsync/PayrollCalculatorTest.kt


Roadmap

  • Clock In/Out with persistent foreground notification
  • Shift types — Morning, Night, Overtime
  • Automatic break subtraction and overtime calculations
  • Dynamic timesheet table
  • Weekly 7-day view with day drill-down
  • Manual hours entry
  • Profile screen with settings
  • Guest mode with personalized greeting
  • Dynamic profile (guest vs. logged-in user)
  • Shift start/end alert notifications
  • Scheduled clock-in/clock-out reminders with time picker
  • Day-of-week selection for reminders (Sun–Sat)
  • Sound & vibrate preferences for alerts
  • Boot-persistent reminders (survive device restart)
  • Responsive UI scaling for all device resolutions
  • Firebase Authentication (Email + Google)
  • Room database for offline-first storage
  • Firestore cloud sync with conflict handling
  • CSV / PDF export for payroll
  • Home screen widget for quick Clock In
  • Dark / Light theme toggle

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m "Add your feature"
  4. Push to the branch: git push origin feature/your-feature
  5. Open a Pull Request

License

This project is licensed under the MIT License — see the LICENSE file for details.


Built with ❤️ using Kotlin and Jetpack Compose

About

Android Investment Tracker - Jetpack Compose, Hilt DI, Vico charts, global market indices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages