• Stars
    star
    3,326
  • Rank 12,975 (Top 0.3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

github-activity-generator

A script that helps generate a rich GitHub Contribution Graph for your account πŸ€–
Python
949
star
2

skmz

A GraphQL-based Web App written with Go, React and MongoDB
Go
399
star
3

go-angular

A simple CRUD application written with Go and Angular
TypeScript
71
star
4

zeit

A Fitbit clock face for learners of the German language πŸ•
TypeScript
43
star
5

twitter-plugin

IntelliJ IDE plugin that helps post code to Twitter
Kotlin
18
star
6

dto-generation-plugin

A show-case project demonstrating extension of IntelliJ IDEA's functionality
Java
15
star
7

COBOL.now

Now is the time to COBOL!
COBOL
15
star
8

sha256

A shortcut script that helps verify sha256 sums faster
Shell
12
star
9

role-based-athorization-in-nestj

Role-based Authorization with JWT using NestJS
TypeScript
7
star
10

ProgressBarExample

An Android app demonstrating how to use ProgressBar with AsyncTask
Java
5
star
11

game-contract

Tic-Tac-Toe Game Solana Contract πŸ¦„
Rust
5
star
12

grpc-wallet

A simple wallet gRPC API implementation with Spring Boot and MySQL
Java
5
star
13

fr-builders

A collection of Docker images creating front end applications
Dockerfile
4
star
14

rainy-hills

Rainy Hills problem solver implemented in Java with Wildfly Swarm
Java
4
star
15

shpota.github.io

My personal web site
HTML
4
star
16

video-game-star-wars

A simple 2D video game written with Java. The game is implemented using only standard lib
Java
3
star
17

do-while-loop-implementation-in-scala

'Handmade' implementation of DO-WHILE loop using only build-in Scala features.
Scala
2
star
18

LuceneWebSearch

This is the web search application which allows to index web pages and to search a particular data over indexed information
Java
2
star
19

shpota

1
star
20

solana-wallet-linking

An example of verifying a Solana wallet signature in Java
JavaScript
1
star
21

cde

Continuous Delivery Example with Git, Docker and Kubernetes
Python
1
star
22

sashashpota.com

Redirect from sashashpota.com to shpota.com
1
star