Coder Social home page Coder Social logo

gofar's Introduction

Gofar

Motivasi

Tujuan yang dicapai adalah membuat Interface API yang dinamis dan ramah untuk developer dan beberapa driver database seperti MongoDB, Mysql, etc..

Contoh penggunaan

Kita definisikan dulu model database dan konfigurasi lain nya di file schema.yaml

Seperti contoh berikut

name: Toko Kaset Hilman
version: v1.0.0
port: 3001
graphql:
  path: /query
  playground: /__playground
models:
  User:
    email: string `types:"unique;true" validate:"require,unique"`
    phone: string `types:"unique;true" validate:"require,unique"`
    password: string `validate:"require,min:10" hide:"true"`
    role: Role
    __options:
      module_auth: true
  Role:
    name: string
    slug: string `types:"unique;true" validate:"require,unique"`
    users:
      - User
  Song:
    title: string
    length: number
    band: Band
    album: Album
  Album:
    name: string
    year: number
    band: Band
    songs:
      - Song
    tags:
      - string
  Artist:
    name: string
    Band: Band
  Band:
    name: string
    artists:
      - Artist
    albums:
      - Album

Dengan melakukan perintah

go run github.com/pedox/gofar/server

secara otomatis Schema akan terbentuk di database (BELUM DI IMPLEMENTASI)

Dan GraphQL Playground dapat diakses di http://localhost:3001/__playground

EARLY STAGE

Sebenernya ini baru cuma berupa Proof of Concept dimana kedepan nya akan ada beberapa fitur dan module yang perlu dikembangkan diantara nya.

  • Middleware Authentication
  • Middleware Roles
  • Basic CRUD
  • ACL
  • Role based Model
  • Seamless Database Migration
  • Hook

Beberapa modul go yang digunakan

gofar's People

Contributors

naupaw avatar pedox avatar

Stargazers

Guntur Akhmad avatar

Watchers

 avatar James Cloos 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.