Generate a modern Web project with Go and Angular, React or Vue in seconds 🚀


Goxygen

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

How to use

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

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 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.

Owner
Sasha Shpota
Software Engineer 👨‍💻: kotlin, java, go, js, ts
Sasha Shpota
Comments
  • Could not import model

    Could not import model

    I apologize in advance for my ignorance as this might be something trivial, but I am completely new to golang.

    I generated a project with angular and mysql, but get errors in db.go and app_test.go. The project name is "buk":

    image

    image

    image

  • feature: #100 Distribute Goxygen as a Docker image

    feature: #100 Distribute Goxygen as a Docker image

    Hi I just made changes for #100 distributing Goxygen to GitHub Packages Docker

    What changes will happen:

    • When the branch master has a new commit, GitHub Action docker-build-package will trigger and create an image and push as ghcr.io/Shpota/goxygen:latest
    • When a new tag is created GitHub Action docker-build-package will trigger and create an image and push as ghcr.io/Shpota/goxygen:{new tag name}
  • Distribute Goxygen as a Docker image

    Distribute Goxygen as a Docker image

    Add an ability to run Goxygen from a Docker image so that a user would not have to go get the Goxygen package. Add a CI step to build and push docker images to GitHub Packages.

  • Add more translations for README

    Add more translations for README

    If you speak any other language from the listed in the README and have the willingness to translate it to your language please do that.

    The most recent version of the English version of README can be found here.

  • Translate missing sentences in Chinese README (help wanted)

    Translate missing sentences in Chinese README (help wanted)

    The Chinese version of README has too be updated.

    Please translate the English sentences in https://github.com/Shpota/goxygen/blob/cli/.github/README_zh.md

  • implementation of cobra CLI

    implementation of cobra CLI

    Hello, Am Matt, I liked your implementation of this framework. As I was going through the code I saw the way you implemented the CLI which was very nice but I thought we could use https://github.com/spf13/cobra to implement a simple yet more robust interface that is more scalable for future implementations.

  • error fetching technologies with docker compose up

    error fetching technologies with docker compose up

    I set up an app using vue and postgres, when loading 8080 with docker compose up, I get the following as it fails to fetch/show the technologies list

    app | 2020/05/07 14:29:17 Error while fetching technologies: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: db:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : dial tcp 172.18.0.2:27017: connect: connection refused }, ] }

  • Integration tests that start a generated application in a container and ensure it accepts requests

    Integration tests that start a generated application in a container and ensure it accepts requests

    At the moment, the project has integration tests that generate applications with different front end frameworks and ensure that they are "buildable" using the docker build command.

    This however doesn't grantee that the generated application will run. For instance, if a database connection string is wrong or in case of any other issue.

    It would be better if the integration tests would not only build the container but also start the application and query it via an HTTP call to ensure it started and serves requests.

    One the high level it could be done in in three steps:

    1. Start the application using docker-compose up
    2. Wait until the application starts. Could be achieved using a container running wait-for-it.sh.
    3. Query the application using curl or in any other way. It could include an http call to the applications REST API as well as querying the front end.
    4. Shut down the application.
  • React typescript

    React typescript

    This PR adds a React+Typescript template to the available frontend framework templates. This template is identical (more-or-less) to the React Javascript template that already exists, but written with Typescript. I've kept the service worker functionality given by create-react-app in the template to give the user the option to use it.

    The template has not been added to the CLI yet so that a Vue+Typescript template can be made and released at the same time.

    If there are any changes you'd like to make, just let me know!

  • Add support for different database systems

    Add support for different database systems

    It would be cool if goxygen would support other databases than MongoDB. A good start would be to support SQL databases like MySql. The user should then be able to choose during the generation which database he wants to use.

  • can only use path@version syntax with 'go get'

    can only use path@version syntax with 'go get'

    I am on go version 1.15.15. On running go run github.com/shpota/goxygen@latest init --frontend vue --db mongo my-app

    I am getting this error: can only use path@version syntax with 'go get'

  • Support GraphQL

    Support GraphQL

    Very exciting project, well done. What about hooking some GraphQL for automatic API and schema generation? I see this using one of following approaches/integrations:

    • gqlgen : https://github.com/oshalygin/gqlgen-pg-todo-example
    • hasura graphql: https://github.com/hasura/graphql-engine

    Let me know what you think and how complex you think this might be. Peace!

  • Add an end to end test to verify that the generated application works in development mode

    Add an end to end test to verify that the generated application works in development mode

    Aе the moment we have end to end tests that verify the application works in production mode.

    At the same time, if there is a bug in docker-compose-dev.yml it won't be caught. This case can also be tested by running a database, staring a server (with go run server.go) and the front end with npm.

  • Support for ArangoDB

    Support for ArangoDB

    This project is a dream come true, but I would love to see it support other datastores like ArangoDB https://www.arangodb.com that provide a multimodel DB (documents, graph, key-value and search).

    Here's the Go driver http://github.com/arangodb/go-driver, if there is a brave soul capable of implementing support for this, it would be awesome as it is definitely out of my league! 🙏🏻

Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin

Simple DNS log Server,easy to ACME DNS challenge log easy send to elasticsearch https://github.com/hktalent/DNS_Server go4Hacker Automated penetration

Dec 30, 2022
Golang & vue web serve
Golang & vue web serve

go_web 本项目源自blog 目前主要功能为个人博客服务

Jan 29, 2022
A basic example of a go web server with a react frontend
A basic example of a go web server with a react frontend

GO-React starter This is a basic example of a go web server with a react frontend. It uses the go fiber framework Getting started Running locally Clon

Nov 16, 2021
A real-time serverless chat application with Go and Vue 3
A real-time serverless chat application with Go and Vue 3

sls-chat-app A real-time serverless chat application with Go and Vue 3. For the

Jul 17, 2022
快速crud开发框架,甚至于一行代码不用敲;自动根据数据库表结构自动生成crud代码;低代码开发框架;至少减少百分90%工作量;可快速把现有系统转成GfEasy版本;后端使用GoFrame开发;后台前端使用 cool-admin-vue;后台使用自适应布局,手机、PC完美使用。
快速crud开发框架,甚至于一行代码不用敲;自动根据数据库表结构自动生成crud代码;低代码开发框架;至少减少百分90%工作量;可快速把现有系统转成GfEasy版本;后端使用GoFrame开发;后台前端使用 cool-admin-vue;后台使用自适应布局,手机、PC完美使用。

GoFrame: GfEasy GfEasy So Easy 快速crud开发框架,甚至于一行代码不用敲 自动根据数据库表结构自动生成crud代码 低代码开发框架 至少减少百分90%工作量 可快速把现有系统转成GfEasy版本 后端使用GoFrame开发;后台前端使用 cool-admin-vue

Dec 28, 2022
Go backend for the Vue-Go personal digital library application

Motivation Create a backend that connects to a cloud storage, so to store and retrieve my personal books. Barebone application State “DONE” from “NEXT

Dec 23, 2021
A ToDoList Demo based on Vue+Gin+Gorm+mysql
A ToDoList Demo based on Vue+Gin+Gorm+mysql

bubble清单 一个基于gin+gorm开发的练手小项目,通过该项目可初识go web开发该有的姿势。 前端页面基于vue和ElementUI开发,对前端不熟悉的童鞋可直接下载templates和static文件夹下的内容使用。 使用指南 下载 [email protected]:mao888/GoWe

Mar 16, 2022
A todo app written in Golang, MongoDB, and React.
A todo app written in Golang, MongoDB, and React.

A todo app written in Golang, MongoDB, and React.

Jun 5, 2022
A Discord clone using React and Go

Valkyrie A Discord clone using React and Go. Live Demo Notes: File Upload is disabled. The design does not fully match current Discord anymore. Data r

May 12, 2022
OpenSCRM是一套基于Go和React的超高质量企业微信私域流量管理系统 。企业微信、私域流量、SCRM、CRM、Golang、React、企业微信SDK
OpenSCRM是一套基于Go和React的超高质量企业微信私域流量管理系统 。企业微信、私域流量、SCRM、CRM、Golang、React、企业微信SDK

安全,强大,易开发的企业微信SCRM 文档 | 截图 | 演示 | 安装 项目简介 OpenSCRM是一套基于Go和React的超高质量企业微信私域流量管理系统 在线演示 http://dashboard.demo.openscrm.cn:8000/ 项目特点 安全性高:企业微信控制了企业所有员工和

Dec 28, 2022
golang-react-app
golang-react-app

- Estructura planteada: api ( Aplicación backend desarrollada en GOLANG ) controllers main.go product.go database connection.go models price.go produc

Nov 27, 2022
My daily routine implements Atomic Pattern to the react app

RAGE (React Atomic Generator) Purpose My daily routine implements Atomic Pattern to the react app, I was doing that repeatedly, so the reason I create

Mar 8, 2022
This is my solution the React exercise on Exercism's Go track.

Solution to React Exercise on Exercism This is my solution the React exercise on Exercism's Go track. The original readme is below. React Welcome to R

Feb 8, 2022
Store files in Telegram messages for free and access them from a modern Web UI

Telegram Storage Store files in Telegram messages for free and access them in a nice web UI. Telegram allows to store files (of max 2GB each) for a un

Jan 4, 2023
listmonk is a standalone high performance, self-hosted newsletter and mailing list manager with a modern dashboard. Single binary app.
listmonk is a standalone high performance, self-hosted newsletter and mailing list manager with a modern dashboard. Single binary app.

listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a PostgreSQL database as its data store.

Jan 1, 2023
Modern UI for Ansible
Modern UI for Ansible

Releases Docker Hub Install Instructions Troubleshooting Contribution Guide Roadmap UI Walkthrough (external blog) Release Signing All releases after

Jan 2, 2023
Tsdev (Zero Config Modern Typescript Projects)

Tsdev (Zero Config Modern Typescript Projects) Motivation I really like the idea behind https://github.com/jaredpalmer/tsdx but I find it uses older t

Jun 29, 2022
Broilerplate - A template project for new Go web backend applications
Broilerplate - A template project for new Go web backend applications

Broilerplate A template project for new Go web backend applications. Can be used

Mar 28, 2022
This is a web project in golang, where we will try to use multiple concepts
This is a web project in golang, where we will try to use multiple concepts

This is a web project in golang, where we will try to use multiple concepts ##List of all the dependencies we have used in this project Name GoCommand

Feb 10, 2022