GithubHelp home page GithubHelp logo

wrannaman / generators Goto Github PK

View Code? Open in Web Editor NEW
236.0 3.0 30.0 2.4 MB

API Generator - instantly generate REST and GraphQL APIs (openapi (OAS) 3.0.0)

Home Page: https://noco.io

License: MIT License

JavaScript 100.00%
generator nodejs-server nodejs nodejs-development oasv3 oas api-generator swagger-codegen openapi-generator openapi

generators's Introduction

Rest/GraphQL APIs + React Components Generator ๐Ÿ”ฅ

Buy Ligit License Follow on Twitter Average time to resolve an issue Percentage of issues still open npm package NPM Downloads

Sugar Generator - API Edition

App Demo

This project is sponsored by

SponsoredBy.dev

Quick Start

  1. Install the npm module
# install
npm i -g sugar-generate
  1. Create a json schema save, this to monkey.json
{
  "name": "monkey",
  "schema": {
    "name": {
      "type": "String",
      "default": ""
    },
    "alive": {
      "type": "Boolean",
      "default": false
    },
    "age": {
      "type": "Number",
      "default": false
    }
  }
}
  1. Generate your api and app
sugar-generate \
--schema monkey.json \
--destination ./my-monkeys

Boom, you now have:

API:

  • GraphQL API
  • REST API
  • Working Tests

APP:

  • React create item form
  • React table that supports
    • search
    • sort
    • filter
    • pagination
    • edit item
    • create item

Start the API

cd ./my-monkeys/api
npm i
npm run start

# http://localhost:7777

Start the APP

cd ./my-monkeys/app
npm i
npm run dev

# http://localhost:3000

Behold Magic

A fully functioning react table and form with searching sorting filtering, editing, adding, global search, download, and refresh.

SugarKubes Generated App

Links

GraphQL is on localhost:7777/graphql

Swagger is on localhost:7777

APP is on localhost:3000

API is on localhost:7777

Documentation

API Documentation (generated back end)

App Documentation (generated front end)

Experimental Embeddable Components

What if you could remotely update your components without having to push new code?

Thats one question we're exploring with the experimental embeddable react components. There are of course cool ways to serve single pages as serverless functions but what's cooler would be a way for even non-technical people to update a database schema and a form or table in real time without writing any code.

  • Each component comes out in an embeddable format under /embed
  • TBD - How to easily deploy these and use them.

Updates

  • 8/5/19 support for mongo arrays in documents

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.