Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Android CI
on:
push:
branches: [ main, mvp-android ]
paths:
- 'android/**'
pull_request:
branches: [ main ]
paths:
- 'android/**'

jobs:
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build and Test
run: |
cd android
chmod +x gradlew
./gradlew build test
72 changes: 72 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,75 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Android
*.iml
.gradle/
local.properties
.idea/
.DS_Store
build/
captures/
.externalNativeBuild
.cxx

# Keystore files
*.jks
*.keystore
!android/keystore/debug.keystore

# Android Studio
*.iws
*.ipr
.idea/
out/

# Gradle
.gradle/
build/
gradle-app.setting
!gradle-wrapper.jar
.gradletasknamecache

# Generated files
bin/
gen/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# VS Code
.vscode/

# Sonar
.sonar/
.scannerwork/

# Test reports
app/build/reports/
app/build/test-results/

# Detekt
build/reports/detekt/

# KtLint
build/reports/ktlint/
.gradle/

# Android Studio
.idea/
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

# RunOn

## Project Status

[![Build and Test](https://github.com/fleXRPL/RunOn/actions/workflows/build.yml/badge.svg)](https://github.com/fleXRPL/RunOn/actions/workflows/build.yml)
[![Android CI](https://github.com/fleXRPL/RunOn/actions/workflows/android.yml/badge.svg)](https://github.com/fleXRPL/RunOn/actions/workflows/android.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fleXRPL_RunOn&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fleXRPL_RunOn)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fleXRPL_RunOn&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fleXRPL_RunOn)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=fleXRPL_RunOn&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=fleXRPL_RunOn)
Expand All @@ -24,6 +27,7 @@ RunOn helps runners find and participate in local running events by providing:
## Architecture

### Backend

- **APIs**:
- Google Search API for event discovery
- Google Calendar API for event management
Expand All @@ -33,30 +37,58 @@ RunOn helps runners find and participate in local running events by providing:
- SonarCloud quality gates

### Android App

- **Language**: Kotlin
- **UI Framework**: Jetpack Compose
- **Key Features**:
- Material Design 3 implementation
- Direct Google Calendar integration
- Google Sign-in

## Project Structure

```bash
RunOn/
β”œβ”€β”€ .github/
β”‚ └── workflows/
β”‚ └── build.yml # CI/CD pipeline
β”‚ └── android.yml # Android CI/CD pipeline
β”œβ”€β”€ android/ # Android mobile app
β”‚ β”œβ”€β”€ app/ # Main Android application
β”‚ └── docs/ # Android documentation
β”œβ”€β”€ backend/ # Core functionality
β”‚ β”œβ”€β”€ functions/ # Business logic
β”‚ β”œβ”€β”€ models/ # Data models
β”‚ β”œβ”€β”€ tests/ # Test suite
β”‚ └── scripts/ # Development tools
```

## Development Setup

1. Clone the repository:
### Android Setup

```bash
# Clone repository
git clone https://github.com/fleXRPL/RunOn.git
cd RunOn
cd RunOn/android

# Run Android setup script
chmod +x scripts/setup.sh
bash scripts/setup.sh
```

2. Install dependencies:
### Backend Setup

```bash
cd backend
# Clone repository
git clone https://github.com/fleXRPL/RunOn.git
cd RunOn/backend

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
```

3. Run tests:
```bash
# Run tests and checks
bash scripts/format_and_lint.sh
```

Expand All @@ -69,7 +101,8 @@ bash scripts/format_and_lint.sh

1. Ensure all tests pass with 100% coverage
2. Follow PEP 8 style guide
3. Run `format_and_lint.sh` before committing
3. Run `format_and_lint.sh` before committing to backend
4. Run `format_and_lint.sh` before committing to android

## License

Expand Down
139 changes: 60 additions & 79 deletions android/README.md
Original file line number Diff line number Diff line change
@@ -1,103 +1,84 @@
# RunOn Android Application
# RunOn! Android App

## Overview
## MVP Features

The RunOn Android application provides a native mobile interface for discovering and managing running events, with seamless calendar integration and user management features.
- Event discovery integration
- Google Calendar sync
- Clean architecture implementation

## Project Structure

```
```bash
android/
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ main/
β”‚ β”‚ β”‚ β”œβ”€β”€ kotlin/com/flexrpl/runon/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ activities/ # Main UI activities
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ fragments/ # UI fragments
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ models/ # Data models
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ network/ # API client and services
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ services/ # Background services
β”‚ β”‚ β”‚ β”‚ └── utils/ # Utility classes
β”‚ β”‚ β”‚ └── res/ # Resources
β”‚ β”‚ └── test/ # Unit tests
β”‚ β”œβ”€β”€ build.gradle # App-level build config
β”‚ └── proguard-rules.pro # ProGuard rules
β”œβ”€β”€ gradle/ # Gradle wrapper
β”œβ”€β”€ build.gradle # Project-level build config
└── settings.gradle # Project settings
β”‚ β”‚ β”‚ β”œβ”€β”€ kotlin/
β”‚ β”‚ β”‚ β”‚ └── com/flexrpl/runon/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ data/ # Data layer
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ domain/ # Business logic
β”‚ β”‚ β”‚ β”‚ └── ui/ # Presentation layer
β”‚ β”‚ β”‚ └── res/ # Resources
β”‚ β”‚ └── test/ # Unit tests
β”‚ └── build.gradle.kts
└── build.gradle.kts
```

## Technology Stack

- **Language**: Kotlin
- **UI Framework**: Jetpack Compose
- **Architecture**: MVVM with Clean Architecture
- **Dependencies**:
- Android Architecture Components
- Retrofit for API communication
- Room for local storage
- Hilt for dependency injection
- Material Design 3

## Development Setup

1. Install Android Studio (latest version)
2. Install JDK 17 or later
3. Clone the repository
4. Open the project in Android Studio
5. Sync Gradle files
6. Run the application

## Building and Running
### Quick Start

```bash
# Build debug variant
./gradlew assembleDebug

# Run tests
./gradlew test

# Install on connected device
./gradlew installDebug
# From project root
./android/scripts/setup.sh
```

## Testing
The setup script will:

- Install required tools (via Homebrew)
- Initialize Gradle
- Set up permissions
- Run initial build

### Required Software

- Android Studio Hedgehog | 2023.1.1
- JDK 17

## Core Dependencies

```kotlin
dependencies {
// Core Android
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")

// UI
implementation("androidx.activity:activity-compose:1.8.2")
implementation(platform("androidx.compose:compose-bom:2024.01.00"))

// Testing
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
}
```

- Unit Tests: `./gradlew test`
- Instrumentation Tests: `./gradlew connectedAndroidTest`
- UI Tests: `./gradlew connectedCheck`
## Getting Started

## CI/CD
1. Clone the repository
2. Open in Android Studio
3. Sync Gradle files
4. Run tests
5. Build and run

The project uses GitHub Actions for continuous integration and deployment:
## Testing Requirements

- Automated builds
- Unit test execution
- Code quality checks
- Release management
- Unit tests for all business logic
- UI tests for critical paths
- Integration tests for API communication

## Code Style

The project follows the official Kotlin style guide and Android best practices:

- Kotlin style guide
- Android architecture components patterns
- Material Design guidelines

## Security

- SSL pinning for API communication
- Secure storage for user credentials
- ProGuard optimization and obfuscation

## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

This project is licensed under the terms of the [LICENSE](../LICENSE) file in the root directory.
- Follow Kotlin coding conventions
- Use Compose best practices
- Maintain clean architecture separation
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.flexrpl.runon.domain.model

data class Event(
val id: String,
val title: String,
val description: String,
val date: String,
val location: String
)
Loading
Loading