Skip to content

borgar90/BFS-CRM-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRM API (FastAPI + SQLModel)

Quickstart (PostgreSQL)

  1. Start the local PostgreSQL service (we provide a docker-compose.yml):
docker-compose up -d
  1. Create a Python venv and install dependencies:
python -m venv .venv; .\.venv\Scripts\Activate; pip install -r requirements.txt
  1. Ensure the DATABASE_URL environment variable is set to point at the Postgres DB used above. Example (PowerShell):
$env:DATABASE_URL = 'postgresql+psycopg2://crm:crm_pass@127.0.0.1:5432/crm_dev'
  1. Apply Alembic migrations (creates the schema in Postgres):
.\.venv\Scripts\python -m alembic upgrade head
  1. (Optional) Seed sample data:
.\.venv\Scripts\python scripts/seed.py
  1. Run the app with Uvicorn:
uvicorn app.main:app --reload --host 127.0.0.1 --port 4000
  1. Open http://127.0.0.1:4000/docs for the interactive API docs.

Notes

  • This project is Postgres-first. SQLite is no longer supported.
  • For CI, start a Postgres service in your workflow and run Alembic before test steps.
  • See scripts/manage.ps1 for convenience commands on Windows (start DB, migrate, seed, test).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published