Tools to scaffold apps
- NodeJS
- Flutter
npm i -g golokgolok create yourModelFile.yamlcd toYourAppFolderbecause this package use generated intl, which sometime you need to run 'fluter clean' then run.
flutter clean
flutter runModel 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:
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
- cm
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:
- 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: Unit
enums:
- Unit
- kg
- g
- cm
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: 201
git clone to/your/goloknpm link to/your/goloknpm unlink to/your/golok

