• Stars
    star
    3,378
  • Rank 13,240 (Top 0.3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated 3 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
1,010
star
2

skmz

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

go-angular

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

zeit

A Fitbit clock face for learners of the German language 🕐
TypeScript
45
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

video-game-star-wars

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

fr-builders

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

rainy-hills

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

shpota.github.io

My personal web site
HTML
4
star
17

solana-wallet-linking

An example of verifying a Solana wallet signature in Java
JavaScript
3
star
18

do-while-loop-implementation-in-scala

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

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
20

shpota

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