Gorest

Go RESTful API starter kit with Gin, JWT, GORM (MySQL, PostgreSQL, SQLite), Redis, Mongo, 2FA, email verification, password recovery
Alternatives To Gorest
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sqlchat2,518
18 hours ago20otherTypeScript
Chat-based SQL Client and Editor for the next decade
Keyv2,16439,2713003 days ago48September 02, 20227mitTypeScript
Simple key-value storage with support for multiple backends
Jugglingdb2,0174071134 years ago105March 06, 201979JavaScript
Multi-database ORM for nodejs: redis, mongodb, mysql, sqlite3, postgresql, arango, in-memory...
Easycaching1,593562a month ago92March 09, 202220mitC#
:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
Redisql1,450
2 years ago13otherC
Redis module that provides a completely functional SQL database
Requests Cache1,10670131012 days ago80June 29, 202220bsd-2-clausePython
Persistent HTTP cache for python requests
Rlite995
3 years ago6bsd-2-clauseC
self-contained, serverless, zero-configuration, transactional redis-compatible database engine. rlite is to Redis what SQLite is to SQL.
Icefiredb988
2 days ago4mitGo
@IceFireLabs -> IceFireDB is a database built for web3.0 It strives to fill the gap between web2 and web3.0 with a friendly database experience, making web3 application data storage more convenient, and making it easier for web2 applications to achieve decentralization and data immutability.
Smartsql9563283 days ago343May 04, 202236apache-2.0C#
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Zxw.framework.netcore743
6 months ago81January 05, 202210mitC#
基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~
Alternatives To Gorest
Select To Compare


Alternative Project Comparisons
Readme

gorest | RESTful API Starter kit

CodeQL Go Linter Codecov Go Reference Go Report Card CodeFactor codebeat badge MIT license Contributor Covenant

gorest is a starter kit, written in Golang with Gin framework, for rapid prototyping and developing a RESTful API. The source code is released under the MIT license and is free for any personal or commercial project.

Versioning

1.x.y

1: production-ready

x: breaking changes

y: new functionality or bug fixes in a backwards compatible manner

Important

Version 1.6.x contains breaking changes!

Note: For version 1.4.5: v1.4.5

Requirement

Go 1.19+

Supported databases

  • [x] MySQL
  • [x] PostgreSQL
  • [x] SQLite3
  • [x] Redis
  • [x] MongoDB

Note: gorest uses GORM as its ORM

Features

  • [x] built on top of Gin
  • [x] use the supported databases without writing any extra configuration files
  • [x] environment variables using GoDotEnv
  • [x] CORS policy
  • [x] basic auth
  • [x] two-factor authentication
  • [x] JWT using golang-jwt/jwt
  • [x] password hashing with Argon2id
  • [x] JSON protection from hijacking
  • [x] simple firewall (whitelist/blacklist IP)
  • [x] email validation (pattern + MX lookup)
  • [x] email verification (sending verification code)
  • [x] forgotten password recovery
  • [x] render HTML templates
  • [x] forward error logs and crash reports to sentry.io
  • [x] handle authentication tokens on client devices' cookies
  • [x] logout (individually enable option - delete tokens from cookies, ban active tokens)
  • [x] super easy to learn and use - lots of example codes

Start building

Please study the .env.sample file. It is one of the most crucial files required to properly set up a new project. Please rename the .env.sample file to .env, and set the environment variables according to your own instance setup.

Tutorials:

For version 1.6.x, please check the project in example

For version 1.4.x and 1.5.x, Wiki

  • convention over configuration
import (
  "github.com/gin-gonic/gin"

  gconfig "github.com/pilinux/gorest/config"
  gcontroller "github.com/pilinux/gorest/controller"
  gdatabase "github.com/pilinux/gorest/database"
  gmiddleware "github.com/pilinux/gorest/lib/middleware"
)
  • install a relational (SQLite3, MySQL or PostgreSQL), Redis, or Mongo database
  • for 2FA, a relational + a redis database is required
  • set up an environment to compile the Go codes (a quick tutorial for any Debian based OS)
  • install git
  • check the Wiki and example for tutorials and implementations

Note: For MySQL driver, please check issue: 7

Note For SQLite3:

  • DBUSER, DBPASS, DBHOST and DBPORT environment variables should be left unchanged.
  • DBNAME must contain the full path and the database file name; i.e,
/user/location/database.db

Contributing

Please see CONTRIBUTING to join this amazing project.

Code of conduct

Please see this document.

License

Mahir Hasan 2019 - 2023

Released under the MIT license

Popular Redis Projects
Popular Sqlite Projects
Popular Data Storage Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Golang
Mongodb
Mysql
Rest
Postgresql
Redis
Rest Api
Sqlite
Jwt
Jwt Authentication