UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

69 lines (51 loc) 1.8 kB
# Frontend Core A modern frontend development toolkit with CLI generators and core utilities. ## Features - **CLI Generators**: Create components, pages, services, and more with built-in templates - **Core Utilities**: Authentication, API client, socket management, and form handling - **TypeScript Support**: Full TypeScript integration with proper type definitions - **Internationalization**: Built-in translation support - **State Management**: Centralized store management - **Validation**: Zod-based form validation ## Quick Start ```bash # Install dependencies npm install # Run the CLI npm run cli ``` ## CLI Commands Generate various frontend components and utilities: - `make:component` - Create a new React component - `make:page` - Create a new page component - `make:service` - Create a new service - `make:hook` - Create a custom React hook - `make:store` - Create a new store - `make:validation` - Create validation schemas - `make:trans` - Create translation files ## Project Structure ``` src/ ├── cli/ # CLI generators and templates ├── components/ # Reusable React components ├── core/ # Core utilities (API, Auth, etc.) ├── hooks/ # Custom React hooks ├── utils/ # Utility functions └── validation/ # Validation schemas ``` ## Core Modules - **ApiClient**: HTTP client with interceptors - **AuthManager**: Authentication state management - **SocketClient**: WebSocket connection handling - **TranslationProvider**: i18n support - **BaseModel**: Data model base class - **BaseRepository**: Data access layer ## Development ```bash # Start development server npm run dev # Build for production npm run build ``` ## License MIT