How tab-jesus/appuniversidad works
1. Project shape
- This is a single-module Android app (app/) built with Kotlin and Gradle Kotlin DSL.
- The repo is organized as a classic native Android app: app code, XML resources, manifest, Firebase config, and unit/instrumentation tests.
2. Core purpose
- The app is for managing university data and associated campuses/sedes.
- The architecture centers on two data domains: Universidad and Sede, with Firebase as the persistence backend.
3. Domain model layer
- models/Universidad.kt and models/Sede.kt define the app’s primary data objects.
- These models form the contract between UI forms and the Firebase data store, so they are the main schema boundary in the app.
4. Data access layer
- data/FirebaseRepository.kt is the main backend integration point.
- Its role is to isolate Firebase operations from the UI, acting as the repository boundary for create/read/update/delete-style workflows and any realtime sync logic.
5. UI layer
- ui/UniversidadesActivity.kt is the only concrete screen implementation visible in the tree.
- The app appears to use Activity-based navigation rather than a fragment-heavy or Compose architecture.
- Layout files suggest separate screens for login, main entry, and university management.
6. Screen and resource mapping
- activity_login.xml, activity_main.xml, and activity_universidades.xml define the visible app surfaces.
- This implies a flow where users authenticate, land in a main/home screen, and then manage university records from the dedicated universities screen.
7. Firebase integration boundary
- google-services.json is committed in the app module, which indicates Firebase is a required runtime dependency rather than an optional integration.
- The README states Firebase Authentication and Realtime Database are used, so the backend boundary is cloud auth plus realtime persistence, not a custom API server.
8. Configuration and app runtime
- AndroidManifest.xml is the central place for app entrypoints, permissions, and component registration.
- Because the README mentions GPS and sensors, the manifest likely carries location-related permissions and possibly activity declarations that shape runtime access to device hardware.
9. Geolocation and sensor behavior
- The README describes GPS capture and accelerometer-based “shake to clear” behavior, but no dedicated services/ package appears in the file tree.
- Architecturally, that means sensor and location handling are either embedded in the activity layer or not yet present in this snapshot; for a diagram, treat them as expected device-side inputs feeding the sede-registration flow.
10. Data flow
- User input enters via XML-backed Activities.
- The UI transforms input into Universidad or Sede models.
- Those models pass through FirebaseRepository, which writes/reads Firebase data.
- Firebase then acts as the system of record and sync source for the app.
11. Persistence and session
- The README mentions Firebase Auth plus local session persistence via SharedPreferences.
- Even though no explicit preferences helper appears in the tree, this indicates a split between remote identity state and lightweight local session state.
12. Testing and quality gates
- There is one instrumented test and one unit test scaffold under src/androidTest and src/test.
- This suggests the repo has standard Android test structure, but no extensive test architecture is visible yet.
13. Build and dependency boundary
- Gradle wrapper files and libs.versions.toml show a version-managed build setup.
- build.gradle.kts at both root and app level define the dependency graph, including Android/Firebase tooling and whatever UI/runtime libraries the app uses.
14. Important architectural note for diagrams
- The real visible boundary in this repo is small: UI Activities -> model objects -> Firebase repository -> Firebase backend, with device sensors/location acting as an input source for sede metadata.
- The README describes a richer system than the visible code tree, so if you draw the architecture, distinguish between implemented components and described-but-not-present modules.
Main entry points: build.gradle.kts App module · UniversidadesActivity.kt UniversidadesActivity · FirebaseRepository.kt Firebase repo · AndroidManifest.xml Manifest
Components 20
Android app
Single-module Android application code and resources
- App module · Single Android application module containing code, resources, and manifest
app/build.gradle.kts - Manifest · App entrypoints, permissions, and component registration
app/src/main/AndroidManifest.xml
Domain
Primary data models for university and campus records
- Universidad · Primary university record schema
app/src/main/java/com/example/appuniversidades/models/Universidad.kt - Sede · Primary campus or branch record schema
app/src/main/java/com/example/appuniversidades/models/Sede.kt
Data access
Firebase-backed repository boundary
- Firebase repo · Backend integration boundary for CRUD and sync operations
app/src/main/java/com/example/appuniversidades/data/FirebaseRepository.kt
UI
Activity-based screens and their XML layouts
- Login screen · Login surface defined in XML
app/src/main/res/layout/activity_login.xml - Main screen · Primary landing surface defined in XML
app/src/main/res/layout/activity_main.xml - Universities screen · University management surface defined in XML
app/src/main/res/layout/activity_universidades.xml - UniversidadesActivity · Concrete screen implementation for university management
app/src/main/java/com/example/appuniversidades/ui/UniversidadesActivity.kt
Runtime inputs
External services and device capabilities used by the app
- Firebase Auth · Cloud authentication backend used by the app
- Realtime DB · Cloud data store and sync source
- GPS data · Location input used when capturing campus metadata
- Shake input · Accelerometer-driven clear/reset behavior described in the README
- Session state · Lightweight local session persistence via SharedPreferences
Build
Gradle and Firebase build/runtime wiring
- Firebase config · Firebase project wiring required at runtime
app/google-services.json - Build setup · Root Gradle configuration and dependency wiring
build.gradle.kts - Version catalog · Centralized library and plugin versions
gradle/libs.versions.toml - Settings · Project/module inclusion and build settings
settings.gradle.kts
Tests
Standard Android unit and instrumented test scaffolds
- Unit tests · Standard JVM test scaffold
app/src/test/java/com/example/appuniversidades/ExampleUnitTest.kt - Instrumented tests · Standard Android instrumentation test scaffold
app/src/androidTest/java/com/example/appuniversidades/ExampleInstrumentedTest.kt
Connections 25
- Build setup → App module: configures · Root build drives the Android module build
- Settings → App module: includes · Project settings include the app module
- Version catalog → Build setup: versions · Shared dependency and plugin version source
- App module → Manifest: packages · Module contains the app manifest
- App module → Login screen: ships · Module ships the login screen layout
- App module → Main screen: ships · Module ships the main screen layout
- App module → Universities screen: ships · Module ships the university management layout
- App module → UniversidadesActivity: contains · Activity implementation lives in the app module
- UniversidadesActivity → Universidad: uses · Screen maps form data into university records
- UniversidadesActivity → Sede: uses · Screen maps form data into campus records
- UniversidadesActivity → Firebase repo: calls · UI delegates persistence to the repository boundary
- Firebase repo → Universidad: persists · Repository reads and writes university entities
- Firebase repo → Sede: persists · Repository reads and writes campus entities
- Firebase repo → Firebase Auth: authenticates · Repository participates in Firebase authentication flows
- Firebase repo → Realtime DB: syncs · Repository stores and retrieves data from Realtime Database
- Firebase config → Firebase Auth: binds · Firebase project configuration binds auth services
- Firebase config → Realtime DB: binds · Firebase project configuration binds database services
- Manifest → GPS data: permits · Manifest shapes access to location capabilities
- Manifest → Shake input: permits · Manifest and runtime shape sensor access
- Main screen → Session state: restores · Main flow reflects persisted local session state
- Login screen → Firebase Auth: signs in · Login surface feeds authentication
- UniversidadesActivity → GPS data: captures · Campus data flow may include GPS-derived metadata
- UniversidadesActivity → Shake input: listens · Activity may react to shake gestures for clearing state
- Unit tests → Firebase repo: checks · Unit test scaffold can validate core logic boundaries
- Instrumented tests → UniversidadesActivity: drives · Instrumentation scaffold targets activity-level behavior