Goyangi means cat in Korean.
The goal of Goyangi project is making a reliable foundation for developers who want to make web services with the Go server. When the Goyangi project becomes more stable, developers would become lazybones. Consequently, lazybones could not only show their creativity but also devote themselves to problems what they can solve. It is also a good example of how to develop a large web application that combined fancy Go packages.
There are some good frameworks like magic(Beego, Revel...). However, these are too much. Some developers prefer to using micro frameworks and lightweight packages for flexibility and performance. It's not easy to select and combine packages though. So, Goyangi carefully has chosen packages and combined. Keep it simple and DRY.
There are various remarkable projects for building API servers. I tested some of them. Then came back to a simple API server starter Goyangi. Even though Goyangi is an outdated project, I recognised that it still works properly. Therefore, I decided to update Goyangi for better use.
- Update Golang modules
- Use Go modules rather than 'go dep'.
- Use 'slog' rather than 'logrus'.
- Use 'Viper' Environment manager.
- Use Docker Compose.
- Docker - Docker
$ git clone https://github.com/dorajistyle/goyangi.git
$ cd goyangi
$ docker compose up -d --build
Please check your 'goyangi-backend' container logs first. If you cannot connect to Postgres, restart the 'goyangi-backend' container. Connect to http://localhost/api/v1/commands/migrate while running the server.
Connect to http://localhost
- dep - Install the dependency management for Go.
- PostgreSQL - Install and run the postgresql service. [username: postgres / password: postgres]
- yarn - Install a dependency management tool.
$ git clone github.com/dorajistyle/goyangi
$ cd goyangi
$ go mod -U .
$ go mod tidy
$ go run main.go
createdb goyangi_dev -U postgres;
createdb goyangi_test -U postgres;
createdb goyangi -U postgres;
Connect to http://localhost/api/v1/commands/migrate while running the server.
SOURCE_ROOT $ cd frontend/vuejs
VUE_JS_ROOT $ yarn
VUE_JS_ROOT $ yarn serve
- ID : admin
- password : password
- Restful support
- From Development to Deployment
- SPA ready
User is core of web application.
- User CRUD
- User Authentication
- Oauth
- User role for admin
- Permissions handling to access each API
- Email verification
- Password reset via email
- Following
- Activation
- MD5 for Gravatar
- Messaging
It is a foundation of a basic content management system(CMS).
- Article CRUD
- Liking
- Comment
It is a foundation of basic file upload.
- Upload files to local storage
- Upload files to amazon aws S3
- Upload files metadata to database
- Upload files to other cloud servers
- Upload csv to database
Image handling included in uploads function.
- Resize (gift)
- Filtering (gift)
It would be a foundation of App management for permissions such as API call permission.
- [] -
We can add any foundation API we need.
- We can add any foundation code that is commonly used in web application.
- BDD testing
$ go run main.go test
Connect to http://localhost/swagger/index.html while running the server.
Goyangi separates server and frontend clearly. And default SPA frontend used Vue.js. However, developers can add frontend easily. Are you interested? Develop frontend and put it into 'frontend/' directory.
API | Server | Vuejs |
---|---|---|
User | all | registration,login,logout |
Article | all | all |
Upload | all | - |
Image | all | - |
Goyangi uses great open source packages. You can check that which packages used in Goyangi web foundation.
- Decide what functions should be maintained.
- Implement All server features in Vue.js frontend.
- Add tons of BDD tests
- Improve documentation
- Automatically ignore private configuration when commit using git filter for contributors.
Any contributions are more than welcome.
Goyangi is under the MIT license