react-clean-architecture

Enforce clean-architecture layer separation in React Native Expo projects.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/benaor/Virtus --skill react-clean-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-clean-architecture
Source: https://github.com/benaor/Virtus/tree/main/.claude/skills/react-clean-architecture
Command: npx skills add https://github.com/benaor/Virtus --skill react-clean-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean Architecture for React Native (Expo) projects: enforce strict separation between Core (domain), Infrastructure (adapters), and UI layers to improve maintainability and testability.

Core Features & Use Cases

  • Ports/Adapters pattern, Use Cases, Result pattern for errors, ViewModel, and Atomic Design to structure code.
  • Scales across features: core domain, infrastructure, and UI with clear boundaries.
  • Use cases guide business logic and orchestrate interactions between layers.

Quick Start

Create a new feature by applying Ports/Adapters and Use Case separation across Core, Infrastructure, and UI layers.

Frequently Asked Questions about react-clean-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a React Native Expo project using clean architecture?

Structure React Native Expo projects by enforcing strict separation between Core domain logic, Infrastructure adapters, and UI layers. This clean architecture approach applies ports/adapters, use cases, and the Result pattern to scale features while maintaining clear boundaries for maintainability and testability.

What is the ports and adapters pattern in React Native development?

The ports and adapters pattern in React Native separates core domain entities from external infrastructure using defined interfaces and adapter implementations. It isolates business logic from UI and integration points, creating immutable boundaries to improve testability and feature scaling.

Can I use clean architecture with TypeScript and Bun in Expo apps?

Yes, clean architecture applies directly to Expo apps built with TypeScript and Bun. It enforces strict Core, Infrastructure, and UI layer separation, utilizing ViewModels and Atomic Design components to structure modules while maintaining immutable architectural boundaries.

How do I handle errors in clean architecture for React Native?

Handle errors in React Native clean architecture by implementing the Result pattern. This approach returns explicit success or failure outcomes from use cases instead of throwing exceptions, maintaining immutable boundaries between the domain core and infrastructure adapters.

When should I use ViewModels and Atomic Design in React Native clean architecture?

Use ViewModels and Atomic Design in React Native clean architecture when structuring the UI layer. ViewModels manage presentation logic and state, while Atomic Design components provide reusable UI elements that respect strict separation from underlying domain and infrastructure layers.

What are the limitations of applying clean architecture to React Native features?

Applying clean architecture to React Native requires a clearly defined core with entities, ports, corresponding adapters, and UI modules with ViewModels. This strict layer separation introduces boilerplate and architectural overhead, which may be excessive for very small or simple prototype applications.