working auth + users systems

This commit is contained in:
c-d-p
2025-04-16 21:32:57 +02:00
parent 516adc606d
commit 18ddb2f332
56 changed files with 943 additions and 0 deletions

21
backend/core/config.py Normal file
View File

@@ -0,0 +1,21 @@
# core/config.py
from pydantic_settings import BaseSettings
from os import getenv
from dotenv import load_dotenv
load_dotenv() # Load .env file
class Settings(BaseSettings):
DB_URL: str = "postgresql://maia:maia@localhost:5432/maia"
REDIS_HOST: str = "localhost"
REDIS_PORT: int = 6379
JWT_ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
PEPPER: str = getenv("PEPPER", "")
JWT_SECRET_KEY: str = getenv("JWT_SECRET_KEY", "")
settings = Settings()