GithubHelp home page GithubHelp logo

xinrongwjy / bootgen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bootgen/bootgen

0.0 0.0 0.0 4.55 MB

Starter project generator. Develop ASP.NET 5 + Vue 3 applications much faster!

Home Page: https://bootgen.com/

License: MIT License

Shell 0.07% JavaScript 1.50% C# 35.26% TypeScript 18.24% HTML 0.75% Vue 38.05% SCSS 0.35% Sass 5.78%

bootgen's Introduction

Starter Project Generator
Develop ASP.NET 5 + Vue 3 applications much faster!

BootGen generates a well coded, human readable, ASP.NET 5 project with Vue 3 based on the sample JSON data you provide. From this sample data it infers the types you need, and creates entity classes, data services, controllers and Vuex state management that fits your use case.

Try it at https://bootgen.com!

How Does it Work?

Create sample JSON data, and generate your application. Edit the JSON, and regenerate until you are satisfied with the result. Changes will be highlighted in the generated files.

When you are finnished click download, and start coding!

The downloaded project will compile and run out of the box. We generate code for you, not just the compiler. We intend to create code that is easy to read, understand and edit.

A Basic Example

{
  "users": [
    {
      "userName": "Jon",
      "email": "[email protected]",
      "pets": [
        {
          "name": "Garfield",
          "species": "cat"
        },
        {
          "name": "Odie",
          "species": "dog"
        }
      ]
    }
  ]
}

For this example, an appllication with two entity classes User and Pet will be created. The database will be seeded with entities for Jon, Garfield and Odie. Try it online!

JSON conventions

  • Property and class names should be camelCase.
  • Array names should be plural nouns, everything else should be in singular form.

Advanced Features

Although comments are non-standard feature in JSON, many JSON processing libraries support it. We use them as annotations. Annotations can be placed at the beginning of arrays. Possible annotations:

  • timestamps: Adds a Created and an Updated timestamp property to the class.
  • manyToMany: Declears that the given relation is a Many-To-Many relation, as opposed to the default One-To-Many relation.

Advanced Example: Task Management System

{
  "users": [
    {
      "userName": "Test User",
      "email": "[email protected]",
      "tasks": [
        //timestamps
        {
          "title": "Task Title",
          "description": "Task description",
          "isOpen": true,
          "dueDate": "2021-12-30T12:00:05",
          "estimatedHours": 1.5,
          "priority": 1,
          "tags": [
            //manyToMany
            {
              "name": "important",
              "color": "red"
            }
          ]
        }
      ]
    }
  ]
}

Known Limitations

There are many limitations of this project, simply because for many things there is no single accepted way to code it. We intend to generate only those parts of your project that are fairly standard. We aim for the wide useability of the generated code, not completeness. Please treat the generated code as a basis of your work, and not something that you can hand over to a client out of the box.

There are however limitations that we do plan to overcome in the future. These are:

  • It is currently not possible to create self referencing Many-To-Many connections.

bootgen's People

Contributors

echopot avatar agabor avatar gorpetrosov avatar thin-tony 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.