GithubHelp home page GithubHelp logo

edsan89 / goxygen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shpota/goxygen

0.0 0.0 0.0 8.37 MB

Generate a modern Web project with Go, Angular/React/Vue, and MongoDB in secondsπŸš€

License: Apache License 2.0

Go 41.25% Dockerfile 2.10% JavaScript 38.99% HTML 6.02% CSS 3.31% TypeScript 4.26% Vue 4.07%

goxygen's Introduction

goxygen logo

Generate a Web project with Go and Angular, React or Vue.

Goxygen aims at saving your time while setting up a new project. It creates a skeleton of an application with all configuration done for you. You can start implementing your business logic straight away. Goxygen generates back end Go code, connects it with front end components, provides a Dockerfile for the application and creates docker-compose files for convenient run in development and production environments.

Supported Technologies
Front End Angular React Vue
Back End Go
Database MongoDB MySQL PostgreSQL

Requirements

You need to have Go 1.11 or newer on your machine.

How to use

Go 1.17 and later:

go run github.com/shpota/goxygen@latest init my-app
Older versions of Go

Go 1.16

Set the GO111MODULE environment variable to auto.

export GO111MODULE=auto

Run

go get -u github.com/shpota/goxygen
go run github.com/shpota/goxygen init my-app

Go 1.11 - 1.15

Run

go get -u github.com/shpota/goxygen
go run github.com/shpota/goxygen init my-app

This generates a project in my-app folder.

By default, it will use React and MongoDB. You can select a different front end framework and a database using --frontend and --db flags. For instance, this command will create a project with Vue and PostgreSQL:

go run github.com/shpota/goxygen@latest init --frontend vue --db postgres my-app

The --frontend flag accepts angular, react and vue. The --db flag accepts mongo, mysql and postgres.

The generated project is ready to run with docker-compose:

cd my-app
docker-compose up

After the build is completed, the application is accessible on http://localhost:8080.

You can find more details on how to work with the generated project in its README file.

Showcase

Structure of a generated project (React/MongoDB example)

my-app
β”œβ”€β”€ server                   # Go project files
β”‚   β”œβ”€β”€ db                   # MongoDB communications
β”‚   β”œβ”€β”€ model                # domain objects
β”‚   β”œβ”€β”€ web                  # REST APIs, web server
β”‚   β”œβ”€β”€ server.go            # the starting point of the server
β”‚   └── go.mod               # server dependencies
β”œβ”€β”€ webapp
β”‚   β”œβ”€β”€ public               # icons, static files, and index.html
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ App.js           # the main React component
β”‚   β”‚   β”œβ”€β”€ App.css          # App component-specific styles
β”‚   β”‚   β”œβ”€β”€ index.js         # the entry point of the application
β”‚   β”‚   └── index.css        # global styles
β”‚   β”œβ”€β”€ package.json         # front end dependencies
β”‚   β”œβ”€β”€ .env.development     # holds API endpoint for dev environment
β”‚   └── .env.production      # API endpoint for prod environment
β”œβ”€β”€ Dockerfile               # builds back end and front end together
β”œβ”€β”€ docker-compose.yml       # prod environment deployment descriptor
β”œβ”€β”€ docker-compose-dev.yml   # runs local MongoDB for development needs
β”œβ”€β”€ init-db.js               # creates a MongoDB collection with test data
β”œβ”€β”€ .dockerignore            # specifies files ignored in Docker builds
β”œβ”€β”€ .gitignore
└── README.md                # guide on how to use the generated repo

Files such as unit tests or sample components are not included here for simplicity.

Dependencies

Goxygen generates a basic structure of a project and doesn't force you to use a specific set of tools. That's why it doesn't bring unneeded dependencies to your project. It uses only a database driver on the back end side and axios in React and Vue projects. Angular projects use only Angular specific libraries.

How to contribute

If you found a bug or have an idea on how to improve the project open an issue and we will fix it as soon as possible. You can also propose your changes via a Pull Request. Fork the repository, make changes, send us a pull request and we'll review it shortly. We also have a Gitter chat where we discuss all the changes.

Credits

Goxygen's logo was created by Egon Elbre.

goxygen's People

Contributors

shpota avatar innashpota avatar srgeneroso avatar jakob-em avatar dolmen avatar douglas-ds avatar lzane avatar tomato3713 avatar edsan89 avatar ofirrock avatar nacimgoura avatar xtunqki avatar maksimov avatar kkodiac avatar kiwan97 avatar buraksakalli avatar beckxie 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.