typescript-frontend-patterns

Standardize React and TypeScript patterns across the MSI-a admin panel.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/pepeccz/msi-a --skill typescript-frontend-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-frontend-patterns
Source: https://github.com/pepeccz/msi-a/tree/main/skills/typescript-frontend-patterns
Command: npx skills add https://github.com/pepeccz/msi-a --skill typescript-frontend-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript and React patterns to standardize and accelerate MSI-a admin panel development, ensuring consistent architecture and easier onboarding.

Core Features & Use Cases

  • API Client Pattern: Singleton pattern with generic CRUD methods and token management.
  • Types Pattern: Domain-structured interfaces and re-usable type definitions for admins, users, cases, and related entities.
  • Custom Hook Pattern: Data fetching hooks with loading, error handling, and refetch capabilities.
  • Context Pattern: Auth and global app state via React Context with a safe provider.
  • Form State Pattern: Robust form state management with immutable updates and change tracking.
  • Constants & Utilities: Centralized constants and helper utilities to avoid magic numbers and repetitive logic.

Quick Start

Import the ApiClient singleton and implement a sample hook that fetches data using the provided patterns.

Frequently Asked Questions about typescript-frontend-patterns

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

FAQPage Schema
How do I standardize React and TypeScript patterns across an admin panel?

Standardize React and TypeScript patterns by enforcing a singleton API client, centralized domain types, custom hooks, and context providers to accelerate admin panel development and ensure architectural consistency.

What is the best way to structure TypeScript domain types for a web application?

Structure TypeScript domain types by centralizing interface definitions for entities like admins, users, and cases, which ensures re-usability and consistent type safety across all components and pages.

How do I create a singleton API client with generic CRUD methods in TypeScript?

Create a singleton API client by implementing a centralized class with generic CRUD methods and token management, ensuring a single instance handles all data fetching and state updates reliably.

How do I manage form state with immutable updates in React?

Manage React form state using immutable updates and change tracking patterns, which prevents direct mutation of state objects and ensures predictable data handling during user input.

How do I implement custom hooks for data fetching with loading and error handling?

Implement custom hooks for data fetching by encapsulating loading states, error handling, and refetch capabilities, which isolates data logic from rendering components and improves maintainability.

Can I use React Context for global auth state in a TypeScript admin panel?

Use React Context for global auth state in a TypeScript admin panel by implementing a safe provider, which securely manages authentication tokens and global app state across the component tree.