Skip to content

alancarlosh/PaynestiOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paynest iOS

1. Description

Paynest iOS is a native SwiftUI application for managing client payments, debts, wallet balance, receipts and collector workflows. It was rebuilt from the original Paynest product concept into a native iOS experience with a modular Clean MVVM architecture.

The app is connected to the deployed Paynest REST API and includes functional client flows, persistent authentication, wallet movements, debt tracking, receipt access and collector linking.

2. Goal

The goal of this project is to demonstrate a production-oriented native iOS implementation of Paynest while practicing SwiftUI, Clean MVVM, API integration, dependency injection and automated testing.

As a portfolio project, it focuses on:

  • Migrating a real product idea from a cross-platform concept into native iOS.
  • Building a maintainable architecture by feature.
  • Keeping business rules testable outside the UI layer.
  • Showing complete user flows with real API data.
  • Preparing the project for future XCUITest end-to-end coverage.

3. Features

  • Email/password login and registration.
  • Keychain-backed session persistence.
  • Access token and refresh token support.
  • Client dashboard with wallet balance, active debts and collector linking.
  • QR/code-based collector linking.
  • Debt calendar with upcoming installment dates.
  • Debt detail screen with installment status and payment actions.
  • Downloadable payment receipts and receipt detail screen.
  • Wallet screen with current balance, deposits and movement history.
  • Collector module with dashboard, clients, collections, agenda, profile QR, debt creation and payment registration.
  • Shared visual theme for spacing, colors, cards and main action controls.

4. Technologies

  • Swift
  • SwiftUI
  • Combine / ObservableObject state
  • URLSession
  • Keychain Services
  • AVFoundation for QR scanning
  • CoreImage for QR generation
  • XCTest
  • Xcode and iOS Simulator

5. Architecture

Paynest iOS is organized as a modular Clean MVVM app by feature:

View -> ViewModel -> UseCase -> Repository protocol -> Data repository -> APIClient -> Backend

Current structure:

  • Core: networking, authentication, session management, app configuration and dependency injection.
  • Features/Client: client presentation, domain use cases, repository contracts and API repositories.
  • Features/Collector: collector presentation, domain use cases, repository contracts and API repositories.
  • Shared: theme and shared UI styling.
  • PaynestIOsTests: unit tests for use cases and view models.

More detail is documented in PaynestIOs/Docs/Architecture.md.

6. Screenshots

Client app

Login Register Home Calendar
Paynest iOS login screen Paynest iOS register screen Paynest iOS client home screen Paynest iOS calendar screen
Receipts Receipt detail Wallet Debt detail
Paynest iOS receipts screen Paynest iOS receipt detail screen Paynest iOS wallet screen Paynest iOS debt detail screen

Collector app

Dashboard Clients Collections
Paynest iOS collector dashboard screen Paynest iOS collector clients screen Paynest iOS collector collections screen
Client detail Profile QR
Paynest iOS collector client detail screen Paynest iOS collector profile QR screen

7. API Integration

The app consumes the Paynest REST API:

https://paynest-api-j8nx.onrender.com

Main endpoint groups:

  • /api/v1/auth/*
  • /api/v1/client/*
  • /api/v1/collector/*

The networking layer centralizes JSON encoding/decoding, Bearer token headers, server error mapping and authenticated requests through SessionStore.authorized.

8. Authentication

Authentication uses email/password against the Paynest API. Tokens are stored in Keychain:

  • accessToken for authenticated requests.
  • refreshToken for session renewal.

SessionStore restores the session on launch, verifies the current user, refreshes tokens when an authenticated request returns 401, and clears credentials on logout.

9. How to Run

Requirements:

  • macOS
  • Xcode
  • iOS Simulator

Clone the repository:

git clone https://github.com/alancarlosh/PaynestiOS.git
cd PaynestiOS

Open the project:

open PaynestIOs.xcodeproj

Run the app from Xcode using an iOS Simulator.

Run tests from terminal:

xcodebuild test \
  -project PaynestIOs.xcodeproj \
  -scheme PaynestIOs \
  -destination 'platform=iOS Simulator,name=iPhone 17 Pro'

10. Status / Roadmap

Current status:

  • Native SwiftUI client flow connected to the deployed API.
  • Client screenshots included.
  • Collector screenshots included.
  • Clean MVVM modular structure implemented for client and collector features.
  • Unit tests added for use cases and view models.
  • Session persistence and refresh token flow implemented.

Roadmap:

  • Add XCUITest end-to-end flows.
  • Improve advanced form validation.
  • Harden loading, empty and error states.
  • Add more UI tests around login, wallet, receipts and collector flows.
  • Continue polishing visual consistency across smaller screens.

11. Author

Built by Alan Carlos Hernandez Hernandez as part of a native iOS portfolio project.

Repository:

https://github.com/alancarlosh/PaynestiOS.git

About

Native SwiftUI fintech app with wallet, debt tracking, collector workflows, Clean MVVM architecture, API integration, and XCTest coverage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages