Skip to content

This is a simple example and demo app on how you can use Supabase Cloud Database with Ory Cloud

Notifications You must be signed in to change notification settings

gen1us2k/cloudnative_todo_list

Repository files navigation

Cloud Native todolist backend

Today we have a lot of possibilities to bootstrap a application or build minimal product using Cloud Services like Supabase and Ory Cloud. This demo app shows an example of simple todo list backend API.

  1. Authentication/User login/Forgot password are handled by Ory Cloud or Ory Kratos
  2. Database layer is implemented by Supabase database

Authentication

For the authentication part you can do two things:

  1. Use Ory Cloud (just follow the onboarding process to their Cloud services)
  2. Use self-hosted Ory Kratos installation (available through docker-compose in this project)

Authentication Flow

TODO:

  • Add Mermaid diagram
  • Add description

Database

Currently it's a showcase for Supabase, but the roadmap has the following parts

  • Supabase Database
  • Firebase Database
  • Appwriter Database
  • Postgres/MySQL database with examples using RDS
  • Create an issue to add a new database example

API

API is implemented using the following toolchain

  1. buf.build to improve development experience working with protobufs
  2. gRPC as a main technology to build API
  3. gRPC gateway to add support of RESTful API for browser

How does authentication works for REST APIs

You can check out the code of KratosMiddleware located in middleware package. The process is simple and it's used to the browsers only (mobile and desktop)

How does authentication works for gRPC APIs

Not implemented yet

Installation and demo

git clone git@github.com:gen1us2k/cloudnative_todo_list
cd cloudnative_todo_list
docker-compose up -d
go run cmd/todolist/main.go

Open http://127.0.0.1:8081/api/todo to start demo

Development

The project uses Go and Make for local development

build_grpc                     Generate files for gRPC
deps                           install binaries
lint                           Run lint against Go code
test                           Run tests

Configuration

Configuration can be changed with environment variables

About

This is a simple example and demo app on how you can use Supabase Cloud Database with Ory Cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages