Giter VIP home page Giter VIP logo

builder's Introduction

Builder - WIP

Builder is designed to quickly scaffold boilerplate code files using templates.

It simply connects to the database defined in .env and fills in the tmpl files in the blueprints folder with varients of field names.

Available field names

  • TableName person image_meta
  • TableNameSpaces person image meta
  • TableNamePascal Person ImageMeta
  • TableNameCamel person imageMeta
  • TableNameLower person imagemeta
  • TableNamePlural people image_metas
  • TableNamePluralPascal people ImageMetas
  • TableNamePluralCamel people imageMetas
  • TableULID person_ulid
  • TableULIDPascal PersonULID
  • TableULIDCamel personULID

Available template vars

  • LTEqStr <=
  • GTEqStr >=
  • LTStr <
  • GTStr >
  • LTEq <=
  • GTEq >=
  • LT <
  • GT >
  • LEFT_BRACE {
  • RIGHT_BRACE }

Currently it generates code for

  • table creation / migrations
  • RESTful
  • models
  • list pages (blueprint is for vue 3)
  • edit pages (blueprint is for vue 3)
  • API definition

Take a look at blueprints for an example. Currently the blueprints are very much tied to my take on a web framework in Golang. I hope to get to a point where I can put it on github in an understandable manor.

__ You can change the blueprints to whatever you want, just follow the naming convention __

Installation

go get github.com/nerdynz/builder

add a rest/migrations folder to test migrations

SETTINGS (first run)

to be changed in .builder.env

  • MIGRATION_PATH
  • PROTO_PATH
  • ACTIONS_PATH
  • RPC_PATH
  • SPA_API_PATH
  • SPA_ROUTE_PATH
  • SPA_VIEW_PATH
  • NEW_PROJECT_BASE_DIRECTORY

NEEDS CLEANUP

  • case statements and logic are a bit all over the place, first use of bubble tea, so it was a bit of a peacemeal process

TODO

  • configuration for ID currently its using ULIDs because I favour theme. (this is very non standard)
  • configuration paths for output files (e.g. migrations go to flyway)
  • configuration for field maping from db to code
  • flexiblity around custom constructs e.g. efile, image_meta, rich_text_meta

e.g.

text becomes string in javascript and go timestamp becomes Date in javascript but time.Time in go

This utility doesn't need to be specific to go or javascript, so configuration needs to provide that flexiblity (we are just outputting strings.... its not hard)

builder's People

Contributors

jaybeecave avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.