GithubHelp home page GithubHelp logo

ptzagk / goxygen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shpota/goxygen

0.0 0.0 0.0 7.9 MB

Generate a modern web project with Go, React and MongoDB in seconds.

License: Apache License 2.0

Go 98.30% Dockerfile 0.11% JavaScript 0.81% HTML 0.52% CSS 0.26%

goxygen's Introduction

goxygen build PRs Welcome

goxygen logo

Generate a Full Stack Web project with Go, React, and MongoDB in seconds.

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 strait away. Goxygen generates back end Go code, connects it with front end React components, provides a Dockerfile for the application and creates docker-compose files for convenient run in development and production environments.

How to use

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

This creates a new my-app project folder. 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.

Showcase

Structure of a generated project

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 reflected here for simplicity.

Toolchain

You need to have Go installed to generate a project with Goxygen.

In order to work with the generated project you need to have Go, Node.js, Docker, and Docker Compose (comes pre-installed with Docker on Mac and Windows).

Verify the toolchain by running the following commands:

go version
npm --version
docker --version
docker-compose --version

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.

Logo

Goxygen's logo was created by Egon Elbre.

goxygen's People

Contributors

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