# 🎓 Sistem Akademik: Attendance & Security System
A modern Android application built with **Jetpack Compose** designed for automated student attendance tracking using **Geofencing** and **Biometric Photo Verification**.
---
## 📖 Overview
**Sistem Akademik** ensures high-integrity attendance by combining location data with visual proof. It restricts check-ins to a specific geographical radius around **Universitas Bhayangkara Jakarta Raya** and requires a real-time selfie, preventing proxy attendance.
### 🎨 Visual Identity
The application features a custom **Pink & White** aesthetic, providing a clean and friendly user experience while maintaining professional functionality.
---
## 🛠Technical Specifications
| Feature | Technology |
| :--- | :--- |
| **UI Framework** | Jetpack Compose (Material 3) |
| **Language** | Kotlin |
| **Local Database** | SQLite (User Credentials & Attendance Logs) |
| **Location API** | Fused Location Provider (High Accuracy) |
| **Image Handling** | Camera Intent & Base64 Encoding |
| **Networking** | HttpURLConnection (REST API/Webhook) |
---
## 🗺 Geofencing Configuration
The system is hardcoded to validate coordinates against the **UBH Bekasi Campus**:
- **Latitude**: `-6.2238`
- **Longitude**: `107.0004`
- **Allowed Radius**: `500 Meters`
*Attempts made outside this boundary are logged as "Luar Radius" and blocked from server synchronization.*
---
## 🔒 Security & Data
1. **Authentication**: Secured via local SQLite storage for NPM and Password hashing.
2. **Data Integrity**: Every check-in captures:
- Precise GPS Coordinates
- Real-time Timestamp
- Base64 Encoded Selfie Image
3. **Synchronization**: Real-time POST requests to **n8n Automation Webhook**.
---
## 📂 Architecture & Components
- **`MainActivity.kt`**: Single activity managing the navigation state machine (Login → Register → Absensi ↔ History).
- **`DatabaseHelper.kt`**: Robust SQLite layer managing two primary tables: `users` and `attendance`.
- **`Theme.kt` & `Color.kt`**: Custom color tokens for the signature Pink/White UI.
---
## 🚦 Getting Started
### Prerequisites
- Android SDK 28+
- Active GPS/Location Services
- Camera Hardware Access
### Permissions
The application requires the following runtime permissions:
```xml
```
---
## 📡 API Integration
Data is synchronized to the following production endpoint:
`https://n8n.lab.ubharajaya.ac.id/webhook/23c6993d-1792-48fb-ad1c-ffc78a3e6254`
---
*Created as a Final Project for the Mobile Programming Course.*