https://github.com/teaentitylab/go-web-app
A web app template and Cli with structures inspired by RoR/Laravel/AdonisJS.
https://github.com/teaentitylab/go-web-app
adonisjs cli django golang laravel ror ruby-on-rails wsgi
Last synced: 9 months ago
JSON representation
A web app template and Cli with structures inspired by RoR/Laravel/AdonisJS.
- Host: GitHub
- URL: https://github.com/teaentitylab/go-web-app
- Owner: TeaEntityLab
- License: mit
- Created: 2021-08-07T13:27:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T23:03:58.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T10:33:22.623Z (10 months ago)
- Topics: adonisjs, cli, django, golang, laravel, ror, ruby-on-rails, wsgi
- Language: Go
- Homepage:
- Size: 200 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-web-app
==
[](https://github.com/TeaEntityLab/go-web-app)
[](https://goreportcard.com/report/github.com/TeaEntityLab/go-web-app)
[](https://codecov.io/gh/TeaEntityLab/go-web-app)
[](https://travis-ci.com/TeaEntityLab/go-web-app)
[](https://godoc.org/github.com/TeaEntityLab/go-web-app)
[](https://github.com/TeaEntityLab/go-web-app)
[](https://github.com/TeaEntityLab/go-web-app)
[](https://github.com/TeaEntityLab/go-web-app)
A web app template and Cli with structures inspired by RoR/Laravel/AdonisJS.
[Branch: FastHttp](https://github.com/TeaEntityLab/go-web-app)
[Branch: Gin](https://github.com/TeaEntityLab/go-web-app/tree/for_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:
```bash
./run.sh app
# Run with Docs:
ENABLE_DOCUMENT=true ./run.sh app
```
Generate Docs (*`swaggo`*):
```bash
cd app; ./generateDocs.sh; cd ..
```
CLI:
```bash
# 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
* Auth
* JWT (Auth Token) https://github.com/golang-jwt/jwt
* Crypto cypto "golang.org/x/crypto"
* Env (as Config structs) env "github.com/caarlos0/env/v6"
* ORM (GORM) https://gorm.io/gorm
* Migration https://github.com/go-gormigrate/gormigrate/v2
* driver-sqlite "gorm.io/driver/sqlite"
* driver-mysql "gorm.io/driver/mysql"
* driver-postgres "gorm.io/driver/postgres"
* FastHttp/Gin
## 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
* Cli https://github.com/urfave/cli/blob/master/docs/v2/manual.md