temirovazat / cinemax-auth

πŸ’» This service allows users to securely authenticate themselves within the Cinemax Online Cinema platform πŸ”

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cinemax Auth

python dockerfile lint code style tests

Description

The purpose of this project is to implement an authentication service for an online cinema. For this purpose, authentication and role management APIs have been developed based on the Flask framework. A relational database PostgreSQL is used for storing user data and login history. User authentication is done using JWT tokens, and Redis is used to store invalid access tokens. The application also features social login (OAuth protocol), distributed tracing for monitoring (Jaeger program), and rate limiting to prevent excessive server load. The project is launched through a proxy server NGINX, which serves as the entry point for the web application. API endpoints are covered by tests using the pytest library.

Technologies

Python Flask PostgreSQL Redis NGINX Gunicorn PyTest Docker

How to Run the Project:

Clone the repository and navigate to the infra directory inside it:

git clone https://github.com/temirovazat/cinemax-auth.git
cd cinemax-auth/infra/

Create a .env file and add project settings:

nano .env
# PostgreSQL
POSTGRES_DB=users_database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432

# Redis
REDIS_HOST=redis
REDIS_PORT=6379

Deploy and run the project in containers:

docker-compose up

The API documentation will be available at:

http://127.0.0.1/openapi

About

πŸ’» This service allows users to securely authenticate themselves within the Cinemax Online Cinema platform πŸ”


Languages

Language:Python 97.7%Language:Shell 1.0%Language:Mako 0.8%Language:Dockerfile 0.4%