UNPKG

skaya

Version:

CLI SDK for full-stack automation: scaffold frontend, backend & blockchain. Future-ready for Web3, integrations, server components & logging.

200 lines (155 loc) • 4.78 kB
# Skaya SDK šŸš€ Skaya is an advanced CLI toolkit that supercharges your full-stack web3 project setup with production-ready templates and interactive scaffolding with Artificial intelligence ## Usage with npx šŸ“¦ ```bash npx skaya -V npx skaya init npx skaya create ``` ## Installation šŸ“¦ ```bash npm install -g skaya ``` ## API Key Configuration šŸ”‘ To use AI-generated code features, you need to set up your Skaya API key using one of these methods: - NOTE: use gemini apikey right now 1. Environment variable (recommended): ```bash export SKAYA_API_KEY=your_key_here ``` 2. Local .npmrc file: ```bash echo 'skaya_api_key=your_key_here' >> .npmrc ``` > šŸš€ **Frontend generation is fully complete and production-ready** > šŸ”§ **Backend module generation is under active development** --- ## ✨ Features ### šŸ—ļø Project Scaffolding #### āœ… Frontend Templates Categories - `skaya-react-ts` – React + TypeScript *(Ready to Use)* - `skaya-vite-ts` – Vite + TypeScript *(Coming Soon)* - `skaya-nextjs` – Next.js Framework *(Coming Soon)* - `skaya-ecommerce` – E-commerce Starter Template *(Coming Soon)* - Custom GitHub repository support *(Ready to Use)* #### šŸ”§ Backend Templates - Express.js + TypeScript boilerplate *(Coming Soon)* - Integrated Prisma ORM setup *(Coming Soon)* - Built-in authentication scaffolding *(Coming Soon)* --- ### 🧩 AI-Powered Code Generation #### āœ… Frontend Component Generator - Smart, context-aware auto generated component generation via AI - **Multiple Language** TypeScript and JavaScript compatibility (tsx,jsx) - Choose from multiple styling options: `CSS`, `SCSS`, `styled-components` - Configure props, state, and component behavior dynamically - Automatically generate: - āœ… **Stories** for each component (Storybook-ready) - āœ… **Tests** with sample unit test templates (Jest or Vitest) #### šŸ”§ Backend Module Generator *(In Progress)* - Auto-generate RESTful routes with full CRUD operations - Scaffold controllers with business logic templates - Create reusable middleware (e.g., auth, validation) - Automated routing integration with custom logic support - **Logging system** (using `Winston` or `Pino`) for request tracking and error logging - **Swagger/OpenAPI documentation** for all routes - **Validation layer** using `Zod` or `Yup` - **Error handler middleware** for clean error responses --- ## šŸ“ Roadmap - [x] Frontend scaffolding and AI component generator - [x] Story and test file generation for components - [x] CLI command to manage project lifecycle - [ ] Backend project scaffolding and auth modules - [ ] Logger integration (Winston or Pino) - [ ] Swagger/OpenAPI auto-docs for backend routes - [ ] Dashboard for visual project editing *(Future Plan)* ## Usage šŸ›  Initialize a project: ```bash skaya init frontend # Enter frontend project folder name: frontend-app # ? Select template category: (Use arrow keys) # āÆ Skaya Official # Skaya Starter Kit Frontend # Community ``` skaya init backend ```bash # Enter backend project folder name: (backend-app) # Select backend template category: (Use arrow keys) # āÆ Skaya Official # Skaya Starter Kit Backend # Community ``` ### Create components: ```bash # Interactive mode skaya create ``` ```bash # Explicit component creation skaya create component --project frontend --filename Profile ``` ### Options | Option | Description | |--------|-------------| | -p, --project <type> | Project type (frontend or backend) | | -f, --filename <name> | Filename for the component | | -a, --ai | Use AI to generate the component | | -d, --description <text> | Description of the component for AI generation | # Frontend ``` skaya create component --project frontend --filename ConenctWalletButton skaya create page --project frontend --filename ConenctWalletButton ``` # Backend ``` skaya create route --project backend skaya create controller --project backend ``` ## Project Structure 🌳 Typical frontend structure: ``` my-frontend/ ā”œā”€ā”€ src/ │ ā”œā”€ā”€ components/ │ ā”œā”€ā”€ pages/ │ ā”œā”€ā”€ App.tsx │ └── index.tsx ā”œā”€ā”€ public/ │ └── index.html └── package.json ``` Typical backend structure: ``` my-backend/ ā”œā”€ā”€ src/ │ ā”œā”€ā”€ prisma/schema.prisma ā”œā”€ā”€ src/ │ ā”œā”€ā”€ controllers/ │ ā”œā”€ā”€ routes/ │ ā”œā”€ā”€ middlewares/ │ └── app.ts ā”œā”€ā”€ package.json └── tsconfig.json ``` ## Development šŸ‘Øā€šŸ’» - For development contributions: ``` git clone https://github.com/skaya-labs/skaya-sdk.git cd skaya-sdk npm install npm run build npm link ``` - Run tests: ``` npm test ``` ## Uninstall ``` npm uninstall -g skaya # For dev version npm unlink -g skaya && npm uninstall -g ```