Well designed over engineered auth manager. It was designed following DDD and clean arch principles protecting its domain logic from everything else. Don't get to much attached to the choice of frameworks and drivers because that's now really the point. They could be easily replaced by any other without having to change a single domain line.
For the following steps Golang is gonna be necessary.
$ make setup-dev
$ go run cmd/api/*
$ make compile
(generates binary output at ./build)
$ make test
$ make metalint
Once application is running API docs can be found at Swagger UI.
$ tree
├── build
│ └── authmanager-api
├── cmd
│ └── api
│ ├── buildcfg.go
│ └── main.go
├── docs
│ └── swagger
│ ├── docs.go
│ ├── swagger.json
│ └── swagger.yaml
├── go.mod
├── go.sum
├── Makefile
├── pkg
│ ├── app.go
│ ├── config
│ │ └── config.go
│ ├── domain
│ │ ├── entities
│ │ │ └── accounts
│ │ │ └── repository.go
│ │ ├── error.go
│ │ └── usecases
│ │ └── accounts
│ │ ├── errors.go
│ │ ├── mocks.gen.go
│ │ └── usecase.go
│ ├── gateway
│ │ ├── api
│ │ │ ├── accounts
│ │ │ │ ├── dosomething.go
│ │ │ │ ├── dosomething_test.go
│ │ │ │ └── handler.go
│ │ │ ├── app.go
│ │ │ ├── middleware
│ │ │ │ └── middleware.go
│ │ │ ├── responses
│ │ │ │ └── responses.go
│ │ │ └── shared
│ │ │ └── shared.go
│ │ └── repositories
│ │ └── accounts.go
│ └── instrumentation
│ └── instrumentation.go
└── README.md
- break into 2 microservices (resource manager & accounts)
- JWE for login
- Pass recovery (OTP..)
- 2FA
- Idempotency (with redis)
- Policies, actions, resources, scopes..
- Kafka/RabbitMQ