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
Markdown
# 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
```