Skip to main content

Introduction

Simple Manager Mobile is a mobile-first management application built with Expo and React Native. The application follows Clean Architecture principles to ensure maintainability, testability, and scalability.

Core Technologies

Expo & React Native

Cross-platform mobile framework for iOS, Android, and Web

TypeScript

Type-safe development with full IDE support

SQLite

Local-first data storage via expo-sqlite

Expo Router

File-based routing for navigation

Architecture Principles

The application is structured into distinct layers with clear separation of concerns. Each layer has specific responsibilities and dependencies flow inward toward the domain layer.
All data is stored locally using SQLite, ensuring the app works offline. The architecture is designed to support future migration to an API backend.
Records are never permanently deleted. An isDeleted flag marks logical deletion, preserving data integrity and enabling recovery.
TypeScript is used throughout the codebase to catch errors at compile time and provide better developer experience.

Key Design Decisions

Database Choice

SQLite via expo-sqlite was chosen for local-first data storage. This provides:
  • Fast, embedded database
  • Cross-platform compatibility
  • Zero configuration
  • Offline-first capability

ID Generation

UUIDs are generated using expo-crypto to ensure:
  • Globally unique identifiers
  • No server coordination needed
  • Future-proof for distributed systems

Validation Layer

Validation logic is handled at the application layer rather than the database level, providing:
  • Business rule enforcement
  • Consistent error messages
  • Easy to test and modify

Future-Ready Design

The architecture is designed to support migration to an API backend:
  • Repositories abstract data access
  • Services contain business logic
  • Easy to swap repositories with HTTP adapters

Main Entity: Record

The application uses a flexible Record entity that represents any manageable item:
export interface Record {
  id: string;           // UUID
  title: string;        // Display name
  subtitle?: string;    // Secondary text
  metadata?: string;    // JSON string for flexible data
  type: string;         // Record type (client, task, appointment, note)
  userId?: string;      // Owner reference
  createdAt: string;    // ISO timestamp
  updatedAt: string;    // ISO timestamp
  isDeleted: boolean;   // Soft delete flag
}
The Record entity is intentionally generic to support multiple use cases (clients, appointments, tasks, notes) without requiring separate tables.

Application State

  • Local State: React hooks and useState
  • Global State: Zustand for lightweight state management
  • Database State: SQLite as source of truth

Next Steps

Clean Architecture

Learn about the four architectural layers

Data Flow

Understand how data moves through the system

Folder Structure

Explore the project organization

Development Guide

Start building features

Build docs developers (and LLMs) love