Giter Club home page Giter Club logo

go-web-app's Introduction

go-web-app

tag Go Report Card codecov Travis CI Build Status GoDoc

license stars forks

A web app template and Cli with structures inspired by RoR/Laravel/AdonisJS.

Branch: FastHttp

Branch: Gin

Features

  • cli (urfave/cli)
    • Generate Model/Migration/Seeder
    • seed
    • migrate
  • DB (gorm)
  • Env/Logger (caarlos0/env logrus)
  • Basic Auth middleware
  • APIDocs serve/gen (swaggo)

Why

It's nice to write something in RoR ways.

I hope you'll enjoy this template

Example

Run:

./run.sh app

# Run with Docs:
ENABLE_DOCUMENT=true ./run.sh app

Generate Docs (swaggo):

cd app; ./generateDocs.sh; cd ..

CLI:

# Help
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh help

# Make
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh make:model
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh make:migration
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh make:seeder

# Migrate
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh migrate
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh migrate:rollback
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh migrate:refresh

# Seed
DB_ENDPOINTS=mydb.sqlite3 DB_TYPE=sqlite ./cli.sh seed

Mod Dependencies/Suggestions

WSGI/Routing/Auth

Log/Error

  • errors "github.com/pkg/errors"
  • logrus "github.com/sirupsen/logrus"
  • slack-go "github.com/johntdyer/slack-go"

Cache/Data/Serialize

  • Cache
    • LRUCache github.com/hashicorp/golang-lru
    • Redis gopkg.in/redis.v5
  • Data/Serialize
    • jsoniter github.com/json-iterator/go
    • jsondiff github.com/nsf/jsondiff
    • diffmatchpatch github.com/sergi/go-diff/diffmatchpatch
    • hashring github.com/serialx/hashring
  • XID github.com/rs/xid
  • Net golang.org/x/net

Cli/Etc

go-web-app's People

Contributors

dependabot[bot] avatar johnteee avatar

Watchers

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