This project is my exploration with Flutter to build an app that displays information about the game Valorant, including detail on Agents, Maps, Weapons, and more. The app fetches real-time data from the Valorant API to provide up-to-date game information.f
The first version of this app originated from my college exam, as described Here, and I later refactored it.
This project follows Clean Architecture principles and uses Melos for monorepo management. The architecture is organized into multiple packages:
valorantlab/
โโโ ๐ฑ app (main) # Main Flutter application
โโโ ๐ฏ features/ # Feature-specific packages
โ โโโ agent/ # Agent feature (list, detail, management)
โ โโโ home/ # Home screen and navigation
โ โโโ maps/ # Maps feature (list, detail, callouts)
โ โโโ weapon/ # Weapon feature (list, detail, stats)
โโโ ๐ฆ packages/ # Core infrastructure
โ โโโ core/ # Shared utilities, database, networking
โโโ ๐ shared/ # Shared dependencies and resources
โโโ dependencies/ # Common dependencies and configurations
โโโ i18n/ # Internationalization (EN/ID support)
- Flutter
- Clean Architecture
- Melos
- Bloc State Management
- Flutter Flavoriz
- Flutter Launcher Icons
- Go Router
- Get It
- Isar Database
- Freezed
- Dartz
- Http
- Flutter SVG
- Flutter Gen
- Equatable
- Husky
- Commitlint
- Flutter SDK: Latest stable version
- Dart: Comes with Flutter
- Melos: For monorepo management
-
Clone the repository
git clone https://github.com/rizaadi/valorantlab.git cd valorantlab -
Install Melos globally
dart pub global activate melos
-
Setup development environment
melos run dev:setup
-
Start development
melos run build:watch
This project uses Melos for comprehensive monorepo management. Here are all available commands:
| Command | Description |
|---|---|
melos bootstrap |
Setup all packages and dependencies |
melos run dev:setup |
Complete development environment setup |
melos run build:watch |
Start development with hot reload |
melos run dev:doctor |
Check development environment health |
| Command | Description |
|---|---|
melos run test |
Run all tests across packages |
melos run test:coverage |
Run tests with coverage reports |
melos run test:unit |
Run unit tests only |
melos run test:integration |
Run integration tests |
melos run test:watch |
Run tests in watch mode |
melos run verify |
Pre-commit quality checks |
| Command | Description |
|---|---|
melos run build |
Build production APK |
melos run build:dev |
Build development APK |
melos run build:apk |
Build Android APK (production) |
melos run build:appbundle |
Build Android App Bundle (Play Store) |
melos run build:appbundle:dev |
Build development App Bundle |
melos run build:appbundle:profile |
Build profile App Bundle |
melos run build:ios |
Build iOS app (production) |
melos run release |
Complete release workflow |
| Command | Description |
|---|---|
melos run analyze |
Run code analysis |
melos run lint |
Run stricter linting |
melos run lint:fix |
Auto-fix linting issues |
melos run format |
Format all Dart files |
melos run format:fix |
Fix formatting issues |
melos run generate |
Run code generation |
melos run generate:select |
Run code generation on selected package |
melos run generate:watch |
Code generation in watch mode |
| Command | Description |
|---|---|
melos run features:test |
Test only feature packages |
melos run features:build |
Build only feature packages |
melos run core:test |
Test only core packages |
melos run shared:test |
Test only shared packages |
| Command | Description |
|---|---|
melos run metrics |
Generate code quality metrics |
melos run docs:generate |
Generate API documentation |
melos run docs:deps:graph |
Generate Mermaid dependency graph |
melos run docs:serve |
Serve documentation locally |
melos run security:check |
Security vulnerability audit |
| Command | Description |
|---|---|
melos run version:patch |
Bump patch version |
melos run version:minor |
Bump minor version |
melos run version:major |
Bump major version |
melos run version:prerelease |
Bump prerelease version |
melos run changelog:generate |
Generate changelog |
| Command | Description |
|---|---|
melos run ci:setup |
Setup CI environment |
melos run ci:test |
Run CI tests with coverage |
melos run ci:build |
Build for CI deployment |
melos run ci:deploy |
Complete CI/CD pipeline |
| Command | Description |
|---|---|
melos clean |
Clean all packages |
melos run clean:deep |
Deep clean with generated files |
melos run dev:reset |
Reset development environment |
| Command | Description |
|---|---|
melos run perf:profile |
Build profile version |
| Command | Description |
|---|---|
melos run get |
Get dependencies for all packages |
melos run deps:upgrade |
Upgrade all dependencies |
melos run deps:outdated |
Check for outdated dependencies |
You can analyze package relationships using melos commands:
# List all packages with details
melos list --long
# Show dependency graph as JSON
melos list --graph
# Generate visual dependency graph (Graphviz format)
melos list --gviz
# Check for dependency cycles
melos list --cyclesThe dependency relationships between packages visualized using Mermaid:
graph TD
%% Package definitions
valorantlab["๐ valorantlab<br/>Main App"]
agent["๐ญ agent<br/>Agent Feature"]
home["๐ก home<br/>Home Feature"]
maps["๐บ๏ธ maps<br/>Maps Feature"]
weapon["โ๏ธ weapon<br/>Weapon Feature"]
core["๐ ๏ธ core<br/>Infrastructure"]
dependencies["๐ฆ dependencies<br/>Shared Deps"]
i18n["๐ i18n<br/>Localization"]
%% Dependencies
valorantlab --> agent
valorantlab --> home
valorantlab --> maps
valorantlab --> weapon
valorantlab --> core
valorantlab --> dependencies
valorantlab --> i18n
agent --> weapon
agent --> core
agent --> dependencies
agent --> i18n
home --> core
home --> dependencies
maps --> core
maps --> dependencies
maps --> i18n
weapon --> agent
weapon --> core
weapon --> dependencies
weapon --> i18n
core --> agent
core --> home
core --> maps
core --> weapon
core --> dependencies
core --> i18n
%% Styling
classDef mainApp fill:#e1f5fe,stroke:#01579b,stroke-width:3px
classDef feature fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef infrastructure fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
classDef shared fill:#fff3e0,stroke:#e65100,stroke-width:2px
class valorantlab mainApp
class agent,home,maps,weapon feature
class core infrastructure
class dependencies,i18n shared
Key Dependencies:
- Main App โ All features + core + shared packages
- Features โ Core + shared packages for common functionality
- Core โ Shared packages for base utilities
- Shared โ No dependencies (foundation level)
- ๐ข Main App (
valorantlab): Entry point that depends on all features and core packages - ๐ฏ Feature Packages: Independent features that can be developed separately
agent: Manages agent-related functionalityhome: Handles home screen and navigationmaps: Manages map information, callouts, and tactical detailsweapon: Manages weapon-related features
- ๐ ๏ธ Core Package: Shared infrastructure (database, networking, utilities)
- ๐ฆ Shared Packages: Foundation-level packages
dependencies: Common dependencies and configurationsi18n: Internationalization support
-
Initial Setup
# Clone and setup git clone https://github.com/rizaadi/valorantlab.git cd valorantlab # Install melos and setup environment dart pub global activate melos melos run dev:setup
-
Daily Development
# Start development server melos run build:watch # Run tests continuously melos run test:watch # Check code quality melos run verify
-
Before Committing
# Format code melos run format:fix # Run all quality checks melos run verify # Run full test suite melos run test:coverage
-
Create Feature Branch
git checkout -b feature/new-feature
-
Develop with Scoped Commands
# Test only your feature melos run features:test --scope=your-feature # Build only your feature melos run features:build --scope=your-feature
-
Quality Assurance
# Run comprehensive checks melos run verify melos run test:coverage melos run analyze -
Prepare for Release
# Version management melos run version:patch # Generate changelog melos run changelog:generate # Build release melos run release
Create .github/workflows/ci.yml:
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.16.0"
- name: Setup Melos
run: dart pub global activate melos
- name: Setup CI Environment
run: melos run ci:setup
- name: Run Tests
run: melos run ci:test
- name: Build App
run: melos run ci:build
- name: Deploy
if: github.ref == 'refs/heads/main'
run: melos run ci:deploy| Command | Purpose | Usage |
|---|---|---|
melos run ci:setup |
Prepare CI environment | Sets up packages and dependencies |
melos run ci:test |
Run CI tests | Executes tests with coverage |
melos run ci:build |
Build for deployment | Generates release builds |
melos run ci:deploy |
Deploy application | Full deployment pipeline |
1. Build Failures
# Clean and reset everything
melos run clean:deep
melos run dev:reset
# Check environment
melos run dev:doctor2. Dependency Conflicts
# Check for outdated packages
melos run deps:outdated
# Upgrade dependencies
melos run deps:upgrade3. Test Failures
# Run tests with detailed output
melos run test:coverage
# Test specific packages
melos run features:test --scope=package-name4. Code Generation Issues
# Clean and regenerate all packages
melos run build:clean
melos run generate
# Interactive package selection for generation
melos run generate:select- Use scoped commands for faster development
- Run
melos run test:watchduring development - Use
melos run build:watchfor hot reload - Regular
melos run clean:deepfor optimal performance
- Clean Architecture implementation
- Dependency Injection with GetIt
- Flutter Flavors (dev/prod)
- Comprehensive Unit Testing
- Modularization with Melos
- Localization (EN & ID)
- Melos monorepo management
- Code quality automation
- Comprehensive testing framework
- Advanced CI/CD with deployment automation
- Publish to Play Store/App Store
- Performance optimization
- Widget testing expansion
- Performance monitoring and analytics
- Advanced security features
Distributed under the MIT License. See MIT License for more information.
