arquitecto-offline

Enforce Clean Architecture and Offline-First patterns with Zustand as the source of truth.

Updated Nov 25, 2025
One-click install
npx skills add https://github.com/filimorniga-ux/farmacias-vallenar-suit --skill arquitecto-offline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arquitecto-offline
Source: https://github.com/filimorniga-ux/farmacias-vallenar-suit/tree/main/.agent/skills/arquitecto-offline
Command: npx skills add https://github.com/filimorniga-ux/farmacias-vallenar-suit --skill arquitecto-offline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a strict Clean Architecture and Offline-First approach in UI development, ensuring no direct API calls from components and making local state the source of truth.

Core Features & Use Cases

  • Enforce separation of concerns by routing all data mutations through domain logic and state stores (e.g., Zustand) rather than direct server requests.
  • Promote Offline-First workflows by prioritizing local persistence and optimistic UI updates, with second-phase synchronization.
  • Provide structured guidance for organizing new modules and ensuring UI code (src/components, src/hooks, src/actions) adheres to the architecture.

Quick Start

Before writing code, ensure your UI components call into local stores and domain logic, not APIs, and structure new modules per the Clean Architecture rules.

Frequently Asked Questions about arquitecto-offline

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

FAQPage Schema
How do I prevent direct API calls from UI components in React?

To prevent direct API calls from UI components, route all data mutations through domain logic and state stores like Zustand. This enforces strict separation of concerns across presentation, domain logic, and data actions while keeping UI code free of server interactions.

What is the best way to implement offline-first state management with Zustand?

Implement offline-first state management with Zustand by making local state the source of truth. Prioritize local persistence and optimistic UI updates, then handle second-phase synchronization to ensure remote and offline scenarios stay aligned without direct server requests from components.

How do I structure new modules following clean architecture rules?

Structure new modules following clean architecture rules by separating domain logic, data actions, and presentation layers. Ensure UI code in directories like src/components, src/hooks, and src/actions adheres strictly to this separation, routing mutations through stores rather than APIs.

Does the offline-first clean architecture approach work with Tailwind CSS v4 and PostgreSQL?

Yes, the offline-first clean architecture approach is compatible with Tailwind CSS v4 and PostgreSQL. It guides structuring logic components and state synchronization while maintaining strict separation of concerns across the data and presentation layers in these environments.

Why should I use Zustand as the source of truth instead of direct server requests?

Use Zustand as the source of truth to enforce offline-first workflows and separation of concerns. This prevents UI components from making direct server requests, prioritizes local persistence with optimistic updates, and manages second-phase synchronization for reliable state management.

When should I not use an offline-first architecture for state management?

Avoid offline-first architecture when your application requires immediate server-side validation or real-time data accuracy without optimistic updates. This approach prioritizes local persistence and second-phase synchronization, which may conflict with strict immediate consistency requirements.