Skip to content

🚀 feat: database interation with SQLAlchemy and Postgresql #1

@tooniez

Description

@tooniez

🤔 Problem/Opportunity

Currently, the FastAPI Streamlit Stack lacks database integration, which is needed for user authentication, data persistence, and other core functionality. Implementing a proper database layer is a foundational step for the project.

💡 Proposed Solution

Implement SQLAlchemy ORM with PostgreSQL integration:

  1. Add PostgreSQL service to Docker Compose
  2. Set up SQLAlchemy models structure
  3. Create database connection management
  4. Implement User model as initial schema
  5. Set up Alembic for migrations

🤷 Alternatives Considered

  • Using SQLite for simplicity (rejected due to production limitations)
  • Using a NoSQL database like MongoDB (rejected to maintain Python ecosystem consistency)
  • Raw SQL queries (rejected in favor of ORM for maintainability)

📚 Additional Context

This enhancement is the first step in a series of planned improvements, followed by authentication system implementation and API structure enhancement. The database integration is crucial for these subsequent features.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions