An Android application for real-time parking spot management using Jetpack Compose UI.
- Real-time parking spot status monitoring
- Multiple parking lot support
- Color-coded spot status:
- Green: Available
- Yellow: Reserved
- Red: Occupied
- Vehicle registration display
- Session-based authentication
- Kotlin
- Jetpack Compose
- Retrofit2
- OkHttp3
- MVVM Architecture
- Coroutines & Flow
app/
├── src/main/java/com/example/parkingapp/
│ ├── MainActivity.kt # Main UI and navigation
│ ├── ParkingApi.kt # API interface definitions
│ ├── ParkingViewModel.kt # Business logic and state management
│ ├── ParkingRepository.kt # Data operations
│ ├── RetrofitClient.kt # Network configuration
│ ├── ParkingLot.kt # Parking lot data model
│ ├── ParkingSpot.kt # Parking spot data model
│ ├── SpotUpdateRequest.kt # Request model for spot updates
- Clone the repository
- Open in Android Studio
- Update
BASE_URLin RetrofitClient.kt - Run on emulator or device
GET /lots: Retrieve all parking lotsGET /{lotId}/spots: Get spots for specific lotPUT /spots/{id}/reserve: Reserve/update spot status
The app uses form-based authentication with session management. Default credentials:
- Username: user
- Password: password