Backend API server for Boards - AI creative toolkit with GraphQL, auth adapters, and generation workers
Project description
Boards Backend
Backend for the Boards open-source creative toolkit for AI-generated content.
Features
- ๐จ Multi-provider support (Replicate, Fal.ai, OpenAI, etc.)
- ๐ Pluggable architecture for generators and providers
- ๐ GraphQL API with Strawberry
- ๐๏ธ PostgreSQL with SQLAlchemy 2.0
- ๐ Migrations with Alembic (async) and timestamped filenames
- ๐ฅ Multi-tenant support with tenant isolation
- ๐ Pluggable authentication (Supabase, Clerk, Auth0, JWT)
- ๐ฆ Flexible storage backends (Local, S3, GCS, Supabase)
Installation
# Install from PyPI (includes core dependencies: Redis, PyJWT)
pip install boards-backend
# Or with optional provider/storage dependencies
pip install boards-backend[providers,storage-s3,storage-gcs]
Development Installation
# Clone the repository and install (includes all extras for typecheck)
git clone https://github.com/weirdfingers/boards.git
cd boards/packages/backend
uv sync # Automatically installs dev dependencies including all providers/storage
Configuration
Copy .env.example to .env and configure your settings:
cp .env.example .env
Key configuration options:
BOARDS_DATABASE_URL: PostgreSQL connection string (e.g. postgresql://user:pass@localhost:5433/db)BOARDS_REDIS_URL: Redis connection for job queueBOARDS_STORAGE_PROVIDER: Storage backend (local, s3, gcs, supabase)BOARDS_AUTH_PROVIDER: Authentication provider
Database Setup
1. Create the database
createdb boards_dev
2. Apply initial schema via Alembic
# Use Alembic to create all tables
uv run alembic upgrade head
Development
Quick Start
# Start the API server (after installation and configuration)
boards-server
# Run database migrations
boards-migrate upgrade head
# Start background workers
boards-worker
Development Server
# Using uvicorn directly
uvicorn boards.api.app:app --reload --port 8088
# Or using the module
python -m boards.api.app
Access the GraphQL playground
Open http://localhost:8088/graphql in your browser.
Database migrations
When you need to change the database schema, use Alembic.
# Create a new migration (autogenerate from models in boards.dbmodels)
uv run alembic revision -m "add feature" --autogenerate
# Apply latest migrations
uv run alembic upgrade head
# Roll back one revision
uv run alembic downgrade -1
๐ For detailed migration workflow, see docs and examples under apps/docs.
Project Structure
packages/backend/
โโโ alembic/ # Alembic migration scripts
โ โโโ versions/ # Timestamped revision files
โโโ alembic.ini # Alembic config
โโโ src/boards/
โ โโโ api/ # FastAPI application
โ โโโ dbmodels/ # SQLAlchemy ORM models (authoritative)
โ โโโ database/ # Connection helpers and compatibility shim
โ โโโ graphql/ # GraphQL schema and resolvers
โ โโโ providers/ # Provider implementations
โ โโโ generators/ # Generator implementations
โ โโโ storage/ # Storage backends
โ โโโ config.py # Configuration management
โโโ tests/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weirdfingers_boards-0.1.5.tar.gz.
File metadata
- Download URL: weirdfingers_boards-0.1.5.tar.gz
- Upload date:
- Size: 103.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ae7725ddaffc68f30e13c573b6ef489c8fb1aca3a03aac40310a6189c0bb36b
|
|
| MD5 |
d91b129870ec9eafde792d066d0e0110
|
|
| BLAKE2b-256 |
a7476199c1968a30d49b0f72a69eb00a982f798dba5fdfc906554912455a2d33
|
File details
Details for the file weirdfingers_boards-0.1.5-py3-none-any.whl.
File metadata
- Download URL: weirdfingers_boards-0.1.5-py3-none-any.whl
- Upload date:
- Size: 130.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e96ff056d25d6c7152b94f48fabd4022593d0e56909b2c0c642ee3223a9b2dfd
|
|
| MD5 |
53509b015f9c4ca90b258559ecdc76a1
|
|
| BLAKE2b-256 |
504d4e551ef07f988c3ae9571da59fb8d219b48ed954ec47fa052095fdffd831
|