astroapps-client

Wire authentication, navigation, API clients, and UI services into a React AppContext.

1|5|Updated Aug 6, 2023
One-click install
npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astroapps-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astroapps-client
Source: https://github.com/astrolabe-apps/astrolabe-common/tree/main/skills/astroapps-client
Command: npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astroapps-client

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The AstroApps client foundation provides a ready-to-use React ecosystem with built-in authentication, URL-synced navigation, API clients, form validation, toast notifications, and breadcrumbs to accelerate app development and ensure consistency.

Core Features & Use Cases

  • AppContext: centralizes security, navigation, toasts, and breadcrumbs for easy access across components.
  • SecurityService: manages authentication state, tokens, and secure API calls for protected resources.
  • NavigationService: handles URL routing and synchronized query parameters for shareable state.
  • Form Validation & Error Handling: utilities for form validation and mapping server errors to user-friendly messages.
  • API Clients & Reusable UI: provides a foundation for downstream client packages and consistent UI services.
  • Use cases: bootstrap a new React app, add authentication, and implement query-parameter driven UX across pages.

Quick Start

Install the package with npm i @astroapps/client. Then wrap your app with AppContextProvider and supply your SecurityService and NavigationService implementations. For a minimal example, initialize your services and render the app root with AppContextProvider.

Frequently Asked Questions about astroapps-client

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

FAQPage Schema
How do I add token-based authentication to a React app?

To add token-based authentication to a React app, this Skill provides a SecurityService that manages authentication state, tokens, and secure API calls for protected resources via a centralized AppContext.

What is the best way to synchronize URL query parameters with React navigation?

Synchronizing URL query parameters with React navigation is handled by the NavigationService, which manages URL routing and synchronized query parameters to create shareable application state across pages.

How do I handle form validation and server error mapping in React?

Handling form validation and server error mapping in React is achieved through built-in utilities that validate forms and map server errors to user-friendly messages within the AppContext foundation.

Does this React client foundation support cross-page toast notifications and breadcrumbs?

Yes, this React client foundation supports cross-page toast notifications and breadcrumbs by centralizing these UI services within the AppContext for easy access and consistent rendering across components.

Can I use this Skill to bootstrap a new React application with API clients?

You can use this Skill to bootstrap a new React application with API clients, as it delivers a ready-to-use ecosystem wiring API clients, navigation, and authentication into a single AppContextProvider.