golok
v0.1.5
Published
Tools to create anything
Downloads
10
Readme
Golok
Tools to scaffold apps

Prerequisite
- NodeJS
- Flutter
Install
npm i -g golokUsage
golok create yourModelFile.yaml

cd toYourAppFolderbecause this package use generated intl, which sometime you need to run 'fluter clean' then run.
flutter clean
flutter runModel's Specification
Model to define detail need to generate application. This model has several main object below:
kind: golok-model
version: 1.0
info:
applications:
entities:
enums:
operations:Example:
info:
name: lapak
title: Contoh1
description: Ini contoh aplikasi
applications:
- name: lapak
packageName: tech.kays
frontend:
framework: flutter
database: hive
admin: true
# Themes option, if not defined would be default.
# default | dark | light
themes: default
plugins:
- connection
stateManagement: riverpod
# web | android | linux | ios | desktop | all
platform:
- web
- android
entities:
- Product
- Order
- OrderLine
entities:
- name: Product
doc: Ini adalah Product
entityInstance: instance
properties:
- name: id
type: int
show: false
- name
- name: description
type: string
truncateAt: 20
- name: sku
min: 3
max: 50
- name: image
type: image
- category
- name: price
type: price
- name: unit
type: unit
enums:
- unit
- kg
- g
- cmInfo
Example:
info:
name: lapak
title: Contoh1
description: Ini contoh aplikasiApplications
Example:
applications:
- name: lapak
packageName: tech.kays
frontend:
framework: flutter
database: hive
admin: true
# Themes option, if not defined would be default.
# default | dark | light
themes: default
plugins:
- connection
stateManagement: riverpod
# web | android | linux | ios | desktop | all
platform:
- web
- android
entities:
- Product
- Order
- OrderLineEntities
Example:
entities:
- Product:
description:
example:
properties:
- name: string, min=3,max=30
- code: string, min=3,max=30, required
doc: Product code
- sku: int,min=3,max=30, required
- brand: Brand, manyToOne
- category: Category, manyToOne
- staff: User, manyToOne
- status: Status, manyToOne
- unit: Unitenums
Example:
enums:
- Unit
- kg
- g
- cmOperations
Example:
operations:
- name: getConsumer
path: /apisix/admin/consumers
verb: get
doc: Return the consumer list according to the specified page number and page size, and can search consumers by username.
example:
- path: /apisix/admin/consumers
doc: This is doc
parameters:
- name: page
position: query
doc: page number
required: no
type: integer
response:
- code: 200
type: product
example:
- code: 201Contribution
Clone golok
git clone to/your/golokLink golok
npm link to/your/golokUnlink golok
npm unlink to/your/golok