Skip to main content

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 queue
  • BOARDS_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weirdfingers_boards-0.2.0.tar.gz (103.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weirdfingers_boards-0.2.0-py3-none-any.whl (130.8 kB view details)

Uploaded Python 3

File details

Details for the file weirdfingers_boards-0.2.0.tar.gz.

File metadata

  • Download URL: weirdfingers_boards-0.2.0.tar.gz
  • Upload date:
  • Size: 103.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.7

File hashes

Hashes for weirdfingers_boards-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c9cd561d7f47bd45083efc2bdd4b3605f47c7ab7a74c00cd749abd461d49944b
MD5 0521e36a1c40416c3acef3071cc1b8ae
BLAKE2b-256 8a1f7ff7e28d8103253796f3d3bb00dccb40d05f59eacd4574f0bd735ba9e0db

See more details on using hashes here.

File details

Details for the file weirdfingers_boards-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for weirdfingers_boards-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0e99200556aaa2edda3d338f54b46f7c478e2d1c07bcf7c0b370c9300a4e598
MD5 f148a9cfefbb050d2f8a619786854dd3
BLAKE2b-256 afb3d6dcb66ce9cf95b0c720635b91d40f17439a6250d42b51ca1dfe3788d374

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page