feat: complete pragativeer v2 frontend and backend, docker setup, and cbt engine

This commit is contained in:
2026-07-06 17:08:13 +05:30
parent ce01795aa9
commit 426b98ddab
66 changed files with 7949 additions and 363 deletions

17
backend/database.py Normal file
View File

@@ -0,0 +1,17 @@
import os
from sqlmodel import create_engine, SQLModel, Session
from typing import Generator
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod")
# Using the standard SQLModel engine config for PostgreSQL
engine = create_engine(DATABASE_URL, echo=True)
def init_db():
# Automatically generates tables based on the classes imported from models.py
import models
SQLModel.metadata.create_all(engine)
def get_session() -> Generator[Session, None, None]:
with Session(engine) as session:
yield session