backend-bootstrap

command module
v0.0.0-...-881522d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 7 Imported by: 0

README

API Server Bootstrap

This is a basic API backend scaffold that can be used to quickly bootstrap your next app. The code of the project is intended to be modified by a developer. The sole purpose of this project is to reduce the time spent on creating the boilerplate code.

This project already contains the database, filestore and cache connectors. Also, a few endpoints were implemented to demonstrate the best practices.

HTTP router

https://github.com/gin-gonic/gin

https://github.com/gin-gonic/examples

Database

The database is implemented via Adapter interface.

Adapter acts as the controller layer and is used to control the operations on database. Amazon AWS DynamoDB is the only implemented adapter that connects to a real database. See dynamodb.go

Alternatively, for local tests you can use the filesystem adapter. See local.go

DynamoDB setup

Primary index id

Secondary index email (name email-index)

Sessions and cache

Basic in-memory cache with expiration is implemented.

https://github.com/akyoto/cache

File storage

The Amazon AWS S3 is implemented. See s3.go

Alternatively, for local tests you can use the filesystem adapter. See local.go

Authentication

Google OAuth 2.0 is conveniently implemented. Use Google Console to configure OAuth2.0 credentials.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL