/api-user-management

This is a simple service for managing users that connects to the database service via grpc and includes crud operations on the database.

Primary LanguagePythonMIT LicenseMIT

AUM-gRPC

The API-User-Managment

This program is an api that gives access to creating, editing, deleting and fetching user information in grpc services connected to it

Features

  • Create New User (Admin)
  • Edit User Information
  • Edit User Password
  • Fetch User Data
  • ✨ Change User Role (Admin) ✨

This repository is made of 2 separate services

  1. Redis service
  2. FastAPI Serive

How It Works

This service receives requests from the user and sends them to the gDataBase service via gRPC Also, the caching process is also included in this service in such a way that the caching service is used to store user tokens

This service is completely dockerized and you need to set environment in it But before doing this, you need to create a network manually via docker so that in the future you can put all the services you need on an internal network of containers.

Create Network via docker:

docker network create share-net

Then set Environments in docker-compose.yml .

Environments Value Description
OAUTH2_SECRET_KEY test_09d25e094faa6c client secret for create jwt token
OAUTH2_ALGORITHM HS256 cryptographic algorithm used to hash information in the context of OAuth 2.0 (HMAC-SHA256)
GRPC_HOST grpc_service grpc service host name in gDataBase service
GRPC_PORT 3333 grpc service port in gDataBase service
CACHE_URL redis://cache_db:6379 url cache for redis database

Note 1: Redis Host is available in docker-compose.yml (cache_db service) Note 2: GRPC_HOST is available in another project (gDataBase) in docker-compose.yml (grpc_service service)

In Finally

docker compose up

Now You can access to FastApi Docs

http://localhost:8585/docs

Architecture

Architecture

License

MIT

Free Software, Hell Yeah!