kybernus 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/cli/commands/upgrade.js +2 -2
- package/package.json +1 -1
- package/LICENSE +0 -20
- package/templates/nestjs/free/mvc/README.md.hbs +0 -28
- package/templates/nestjs/free/mvc/package.json.hbs +0 -29
- package/templates/nestjs/free/mvc/src/app.module.ts.hbs +0 -13
- package/templates/nestjs/free/mvc/src/controllers/health.controller.ts.hbs +0 -9
- package/templates/nestjs/free/mvc/src/controllers/items.controller.ts.hbs +0 -32
- package/templates/nestjs/free/mvc/src/main.ts.hbs +0 -17
- package/templates/nestjs/free/mvc/src/models/create-item.dto.ts.hbs +0 -10
- package/templates/nestjs/free/mvc/src/models/item.model.ts.hbs +0 -6
- package/templates/nestjs/free/mvc/src/modules/items.module.ts.hbs +0 -9
- package/templates/nestjs/free/mvc/src/services/items.service.ts.hbs +0 -32
- package/templates/nestjs/free/mvc/tsconfig.json.hbs +0 -21
- package/templates/python-fastapi/free/mvc/README.md.hbs +0 -41
- package/templates/python-fastapi/free/mvc/app/controllers/health.py.hbs +0 -7
- package/templates/python-fastapi/free/mvc/app/controllers/items.py.hbs +0 -27
- package/templates/python-fastapi/free/mvc/app/main.py.hbs +0 -26
- package/templates/python-fastapi/free/mvc/app/models/item.py.hbs +0 -11
- package/templates/python-fastapi/free/mvc/app/schemas/item.py.hbs +0 -17
- package/templates/python-fastapi/free/mvc/app/services/item_service.py.hbs +0 -33
- package/templates/python-fastapi/free/mvc/requirements.txt.hbs +0 -4
package/README.md
CHANGED
|
@@ -72,12 +72,12 @@ $ kybernus init
|
|
|
72
72
|
|
|
73
73
|
### 3 projects FREE! Includes PRO and Architect templates
|
|
74
74
|
|
|
75
|
-
### Architect ($
|
|
75
|
+
### Architect ($9)
|
|
76
76
|
- Basic project scaffolding (MVC)
|
|
77
77
|
- Node.js, Next.js, Java Spring Boot
|
|
78
78
|
- README with setup instructions
|
|
79
79
|
|
|
80
|
-
### Pro Tier ($
|
|
80
|
+
### Pro Tier ($49 lifetime)
|
|
81
81
|
- **All stacks** including NestJS and FastAPI
|
|
82
82
|
- **Clean & Hexagonal Architecture** patterns
|
|
83
83
|
- **Docker & docker-compose** configurations
|
|
@@ -92,13 +92,12 @@ $ kybernus init
|
|
|
92
92
|
|
|
93
93
|
- 🌐 **Website**: [kybernus.vercel.app](https://kybernus.vercel.app)
|
|
94
94
|
- 📖 **Docs**: [kybernus.vercel.app/docs](https://kybernus.vercel.app/docs)
|
|
95
|
-
- 🐛 **Issues**: [GitHub Issues](https://github.com/ViniMTrevisan/Kybernus-CLI/issues)
|
|
96
95
|
|
|
97
96
|
---
|
|
98
97
|
|
|
99
98
|
## License
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
Copyright © 2026 Vini Trevisan. All rights reserved. Redistribution or modification involves a violation of applicable laws
|
|
102
101
|
|
|
103
102
|
---
|
|
104
103
|
|
|
@@ -16,8 +16,8 @@ export async function upgradeCommand() {
|
|
|
16
16
|
const type = await clack.select({
|
|
17
17
|
message: 'Choose your plan:',
|
|
18
18
|
options: [
|
|
19
|
-
{ value: 'monthly', label: 'Monthly Subscription ($
|
|
20
|
-
{ value: 'lifetime', label: 'Pro Lifetime ($
|
|
19
|
+
{ value: 'monthly', label: 'Monthly Subscription ($9/month) - Continue using standard features' },
|
|
20
|
+
{ value: 'lifetime', label: 'Pro Lifetime ($49 one-time) - Unlock Advanced Architecture & DevOps forever' },
|
|
21
21
|
],
|
|
22
22
|
});
|
|
23
23
|
if (clack.isCancel(type)) {
|
package/package.json
CHANGED
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Vini Trevisan
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
SOFTWARE.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
> Generated by [Kybernus CLI](https://kybernus.dev) 🚀 (Free)
|
|
4
|
-
|
|
5
|
-
## Stack
|
|
6
|
-
|
|
7
|
-
- **Framework**: NestJS
|
|
8
|
-
- **Language**: TypeScript
|
|
9
|
-
- **Validation**: class-validator
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install
|
|
15
|
-
npm run dev
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## API Endpoints
|
|
19
|
-
|
|
20
|
-
- `GET /api/health` - Health check
|
|
21
|
-
- `GET /api/items` - List items
|
|
22
|
-
- `POST /api/items` - Create item
|
|
23
|
-
- `GET /api/items/:id` - Get item
|
|
24
|
-
- `DELETE /api/items/:id` - Delete item
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
Made with ❤️ using [Kybernus](https://kybernus.dev)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{kebabCase projectName}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Generated by Kybernus CLI",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "nest start --watch",
|
|
7
|
-
"build": "nest build",
|
|
8
|
-
"start": "node dist/main.js",
|
|
9
|
-
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
10
|
-
"test": "jest"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@nestjs/common": "^10.3.0",
|
|
14
|
-
"@nestjs/core": "^10.3.0",
|
|
15
|
-
"@nestjs/config": "^3.1.1",
|
|
16
|
-
"@nestjs/platform-express": "^10.3.0",
|
|
17
|
-
"class-transformer": "^0.5.1",
|
|
18
|
-
"class-validator": "^0.14.1",
|
|
19
|
-
"reflect-metadata": "^0.2.1",
|
|
20
|
-
"rxjs": "^7.8.1",
|
|
21
|
-
"uuid": "^9.0.1"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@nestjs/cli": "^10.3.0",
|
|
25
|
-
"@types/node": "^20.11.0",
|
|
26
|
-
"@types/uuid": "^9.0.7",
|
|
27
|
-
"typescript": "^5.3.3"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Module } from '@nestjs/common';
|
|
2
|
-
import { ConfigModule } from '@nestjs/config';
|
|
3
|
-
import { ItemsModule } from './modules/items.module';
|
|
4
|
-
import { HealthController } from './controllers/health.controller';
|
|
5
|
-
|
|
6
|
-
@Module({
|
|
7
|
-
imports: [
|
|
8
|
-
ConfigModule.forRoot({ isGlobal: true }),
|
|
9
|
-
ItemsModule,
|
|
10
|
-
],
|
|
11
|
-
controllers: [HealthController],
|
|
12
|
-
})
|
|
13
|
-
export class AppModule {}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Controller, Get, Post, Delete, Param, Body, NotFoundException } from '@nestjs/common';
|
|
2
|
-
import { ItemsService } from '../services/items.service';
|
|
3
|
-
import { CreateItemDto } from '../models/create-item.dto';
|
|
4
|
-
|
|
5
|
-
@Controller('items')
|
|
6
|
-
export class ItemsController {
|
|
7
|
-
constructor(private readonly itemsService: ItemsService) {}
|
|
8
|
-
|
|
9
|
-
@Get()
|
|
10
|
-
findAll() {
|
|
11
|
-
return this.itemsService.findAll();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Get(':id')
|
|
15
|
-
findOne(@Param('id') id: string) {
|
|
16
|
-
const item = this.itemsService.findOne(id);
|
|
17
|
-
if (!item) throw new NotFoundException('Item not found');
|
|
18
|
-
return item;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Post()
|
|
22
|
-
create(@Body() createItemDto: CreateItemDto) {
|
|
23
|
-
return this.itemsService.create(createItemDto);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@Delete(':id')
|
|
27
|
-
remove(@Param('id') id: string) {
|
|
28
|
-
const deleted = this.itemsService.remove(id);
|
|
29
|
-
if (!deleted) throw new NotFoundException('Item not found');
|
|
30
|
-
return { message: 'Item deleted' };
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { NestFactory } from '@nestjs/core';
|
|
2
|
-
import { AppModule } from './app.module';
|
|
3
|
-
import { ValidationPipe } from '@nestjs/common';
|
|
4
|
-
|
|
5
|
-
async function bootstrap() {
|
|
6
|
-
const app = await NestFactory.create(AppModule);
|
|
7
|
-
|
|
8
|
-
app.enableCors();
|
|
9
|
-
app.setGlobalPrefix('api');
|
|
10
|
-
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
|
|
11
|
-
|
|
12
|
-
const port = process.env.PORT || 3000;
|
|
13
|
-
await app.listen(port);
|
|
14
|
-
|
|
15
|
-
console.log(`🚀 {{pascalCase projectName}} running on port ${port}`);
|
|
16
|
-
}
|
|
17
|
-
bootstrap();
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Module } from '@nestjs/common';
|
|
2
|
-
import { ItemsController } from '../controllers/items.controller';
|
|
3
|
-
import { ItemsService } from '../services/items.service';
|
|
4
|
-
|
|
5
|
-
@Module({
|
|
6
|
-
controllers: [ItemsController],
|
|
7
|
-
providers: [ItemsService],
|
|
8
|
-
})
|
|
9
|
-
export class ItemsModule {}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import { CreateItemDto } from '../models/create-item.dto';
|
|
3
|
-
import { Item } from '../models/item.model';
|
|
4
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class ItemsService {
|
|
8
|
-
private items: Map<string, Item> = new Map();
|
|
9
|
-
|
|
10
|
-
findAll(): Item[] {
|
|
11
|
-
return Array.from(this.items.values());
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
findOne(id: string): Item | undefined {
|
|
15
|
-
return this.items.get(id);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
create(dto: CreateItemDto): Item {
|
|
19
|
-
const item: Item = {
|
|
20
|
-
id: uuidv4(),
|
|
21
|
-
name: dto.name,
|
|
22
|
-
description: dto.description,
|
|
23
|
-
createdAt: new Date(),
|
|
24
|
-
};
|
|
25
|
-
this.items.set(item.id, item);
|
|
26
|
-
return item;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
remove(id: string): boolean {
|
|
30
|
-
return this.items.delete(id);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"target": "ES2021",
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"outDir": "./dist",
|
|
12
|
-
"baseUrl": "./",
|
|
13
|
-
"incremental": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"strictNullChecks": true,
|
|
16
|
-
"noImplicitAny": true,
|
|
17
|
-
"strictBindCallApply": true,
|
|
18
|
-
"forceConsistentCasingInFileNames": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
> Generated by [Kybernus CLI](https://kybernus.dev) 🚀 (Free)
|
|
4
|
-
|
|
5
|
-
## Stack
|
|
6
|
-
|
|
7
|
-
- **Framework**: FastAPI
|
|
8
|
-
- **Python**: 3.11+
|
|
9
|
-
- **Validation**: Pydantic v2
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Create virtual environment
|
|
15
|
-
python -m venv venv
|
|
16
|
-
source venv/bin/activate # Linux/Mac
|
|
17
|
-
# or: venv\Scripts\activate # Windows
|
|
18
|
-
|
|
19
|
-
# Install dependencies
|
|
20
|
-
pip install -r requirements.txt
|
|
21
|
-
|
|
22
|
-
# Run development server
|
|
23
|
-
uvicorn app.main:app --reload
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## API Endpoints
|
|
27
|
-
|
|
28
|
-
- `GET /api/health` - Health check
|
|
29
|
-
- `GET /api/items` - List items
|
|
30
|
-
- `POST /api/items` - Create item
|
|
31
|
-
- `GET /api/items/{id}` - Get item
|
|
32
|
-
- `DELETE /api/items/{id}` - Delete item
|
|
33
|
-
|
|
34
|
-
## Documentation
|
|
35
|
-
|
|
36
|
-
- Swagger UI: http://localhost:8000/docs
|
|
37
|
-
- ReDoc: http://localhost:8000/redoc
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
Made with ❤️ using [Kybernus](https://kybernus.dev)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
from fastapi import APIRouter, HTTPException
|
|
2
|
-
from typing import List
|
|
3
|
-
from app.schemas.item import ItemCreate, ItemResponse
|
|
4
|
-
from app.services.item_service import ItemService
|
|
5
|
-
|
|
6
|
-
router = APIRouter()
|
|
7
|
-
item_service = ItemService()
|
|
8
|
-
|
|
9
|
-
@router.get("/", response_model=List[ItemResponse])
|
|
10
|
-
async def get_items():
|
|
11
|
-
return item_service.get_all()
|
|
12
|
-
|
|
13
|
-
@router.get("/{item_id}", response_model=ItemResponse)
|
|
14
|
-
async def get_item(item_id: str):
|
|
15
|
-
item = item_service.get_by_id(item_id)
|
|
16
|
-
if not item:
|
|
17
|
-
raise HTTPException(status_code=404, detail="Item not found")
|
|
18
|
-
return item
|
|
19
|
-
|
|
20
|
-
@router.post("/", response_model=ItemResponse, status_code=201)
|
|
21
|
-
async def create_item(item: ItemCreate):
|
|
22
|
-
return item_service.create(item)
|
|
23
|
-
|
|
24
|
-
@router.delete("/{item_id}", status_code=204)
|
|
25
|
-
async def delete_item(item_id: str):
|
|
26
|
-
if not item_service.delete(item_id):
|
|
27
|
-
raise HTTPException(status_code=404, detail="Item not found")
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from fastapi import FastAPI
|
|
2
|
-
from fastapi.middleware.cors import CORSMiddleware
|
|
3
|
-
from app.controllers import health, items
|
|
4
|
-
|
|
5
|
-
app = FastAPI(
|
|
6
|
-
title="{{projectNamePascalCase}}",
|
|
7
|
-
description="Generated by Kybernus CLI",
|
|
8
|
-
version="1.0.0"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
# CORS
|
|
12
|
-
app.add_middleware(
|
|
13
|
-
CORSMiddleware,
|
|
14
|
-
allow_origins=["*"],
|
|
15
|
-
allow_credentials=True,
|
|
16
|
-
allow_methods=["*"],
|
|
17
|
-
allow_headers=["*"],
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
# Routes
|
|
21
|
-
app.include_router(health.router, prefix="/api", tags=["Health"])
|
|
22
|
-
app.include_router(items.router, prefix="/api/items", tags=["Items"])
|
|
23
|
-
|
|
24
|
-
@app.get("/")
|
|
25
|
-
async def root():
|
|
26
|
-
return {"message": "Welcome to {{projectNamePascalCase}} API"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from dataclasses import dataclass, field
|
|
2
|
-
from datetime import datetime
|
|
3
|
-
from typing import Optional
|
|
4
|
-
import uuid
|
|
5
|
-
|
|
6
|
-
@dataclass
|
|
7
|
-
class Item:
|
|
8
|
-
id: str = field(default_factory=lambda: str(uuid.uuid4()))
|
|
9
|
-
name: str = ""
|
|
10
|
-
description: Optional[str] = None
|
|
11
|
-
created_at: datetime = field(default_factory=datetime.now)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
2
|
-
from datetime import datetime
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
class ItemBase(BaseModel):
|
|
6
|
-
name: str
|
|
7
|
-
description: Optional[str] = None
|
|
8
|
-
|
|
9
|
-
class ItemCreate(ItemBase):
|
|
10
|
-
pass
|
|
11
|
-
|
|
12
|
-
class ItemResponse(ItemBase):
|
|
13
|
-
id: str
|
|
14
|
-
created_at: datetime
|
|
15
|
-
|
|
16
|
-
class Config:
|
|
17
|
-
from_attributes = True
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
from app.models.item import Item
|
|
3
|
-
from app.schemas.item import ItemCreate
|
|
4
|
-
from datetime import datetime
|
|
5
|
-
import uuid
|
|
6
|
-
|
|
7
|
-
class ItemService:
|
|
8
|
-
"""Item Service - Business Logic Layer"""
|
|
9
|
-
|
|
10
|
-
def __init__(self):
|
|
11
|
-
self._items: dict[str, Item] = {}
|
|
12
|
-
|
|
13
|
-
def get_all(self) -> List[Item]:
|
|
14
|
-
return list(self._items.values())
|
|
15
|
-
|
|
16
|
-
def get_by_id(self, item_id: str) -> Optional[Item]:
|
|
17
|
-
return self._items.get(item_id)
|
|
18
|
-
|
|
19
|
-
def create(self, data: ItemCreate) -> Item:
|
|
20
|
-
item = Item(
|
|
21
|
-
id=str(uuid.uuid4()),
|
|
22
|
-
name=data.name,
|
|
23
|
-
description=data.description,
|
|
24
|
-
created_at=datetime.now()
|
|
25
|
-
)
|
|
26
|
-
self._items[item.id] = item
|
|
27
|
-
return item
|
|
28
|
-
|
|
29
|
-
def delete(self, item_id: str) -> bool:
|
|
30
|
-
if item_id in self._items:
|
|
31
|
-
del self._items[item_id]
|
|
32
|
-
return True
|
|
33
|
-
return False
|