Skip to content

omghante/cartera

Cartera

A fault-tolerant payment wallet simulation built with Flutter, supporting scheduled transactions, idempotency, retries, and event-driven processing. Inspired by production payment systems like Stripe.

Overview

Cartera is a cross-platform payment wallet application that demonstrates production-grade patterns for handling financial transactions. It is designed to be resilient, auditable, and secure.

Key Features

  • Wallet Management -- Create and manage digital wallets with real-time balance tracking and multi-currency support.
  • Transaction Processing -- Deposit, withdraw, and transfer funds with full ACID compliance and audit trails.
  • Scheduled Transactions -- Set up recurring payments with flexible scheduling (daily, weekly, monthly, custom intervals).
  • Idempotency -- Every transaction accepts an idempotency key to prevent duplicate processing, even across retries.
  • Retry with Backoff -- Failed operations are retried with exponential backoff and circuit breaker patterns.
  • Event-Driven Architecture -- All state changes emit domain events for downstream processing, notifications, and audit logging.

Supported Platforms

Platform Status
Android Supported
iOS Supported
Web Supported
Linux Supported
macOS Supported
Windows Supported

Getting Started

Prerequisites

  • Flutter SDK (stable channel)
  • Dart SDK (bundled with Flutter)
  • Platform-specific tooling:
    • Android: Android Studio / Android SDK
    • iOS / macOS: Xcode (macOS only)
    • Linux: clang, cmake, ninja-build, libgtk-3-dev
    • Windows: Visual Studio with C++ desktop development workload

Installation

# Clone the repository
git clone https://github.com/omghante/cartera.git
cd cartera

# Install dependencies
flutter pub get

# Run the app
flutter run

Running Tests

# Unit and widget tests
flutter test

# Unit tests with coverage
flutter test --coverage

# Integration tests (requires a connected device or emulator)
flutter test integration_test/

Building for Release

# Android APK
flutter build apk --release

# Android App Bundle
flutter build appbundle --release

# iOS
flutter build ios --release

# Web
flutter build web --release

# Linux
flutter build linux --release

# macOS
flutter build macos --release

# Windows
flutter build windows --release

Architecture

lib/
  core/            # Shared utilities, constants, error handling
  features/
    wallet/        # Wallet creation, balance, management
    transactions/  # Deposits, withdrawals, transfers
    scheduler/     # Recurring and scheduled payments
    events/        # Event bus, subscribers, domain events
    retries/       # Retry policies, circuit breaker, backoff
    idempotency/   # Idempotency key management and deduplication
  models/          # Data models and entities
  services/        # External service integrations
  repositories/    # Data access layer

Contributing

We welcome contributions. Please read our Contributing Guidelines before submitting a pull request.

All pull requests must:

  • Follow the PR template
  • Have GPG-signed commits
  • Pass all CI checks
  • Be linked to an issue

Security

This is a payment-related application. Security is a top priority.

Code of Conduct

This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold this code.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Copyright (c) 2026 Om Ghante

About

Designed and built a fault-tolerant payment wallet simulation supporting scheduled transactions, idempotency, retries, and event-driven processing (inspired by systems like Stripe).

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors