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.