git.iko.soy/rowtype-yoga/purescript-yoga-backend-stack
on main help sign in

The complete backend stack for PureScript - high-quality, type-safe FFI bindings for databases, messaging, HTTP frameworks, and observability tools

git clone ssh://git.iko.soy/rowtype-yoga/purescript-yoga-backend-stack

PureScript Yoga Backend Stack

The complete backend stack for PureScript - high-quality, type-safe FFI bindings for databases, messaging, HTTP frameworks, and observability tools.

๐Ÿ“ฆ Packages

Foundation

Databases (15 packages)

Messaging

HTTP Frameworks (4 packages)

Observability (6 packages)

Utilities

๐Ÿš€ Quick Start

# Install dependencies
bun install

# Build all packages
bunx spago build

# Build a specific package
bunx spago build -p yoga-redis

# Run tests for a specific package
cd packages/yoga-redis && bunx spago test

๐Ÿงช Testing

Run tests for individual packages:

cd packages/yoga-redis && bunx spago test
cd packages/yoga-postgres && bunx spago test
cd packages/yoga-fastify-om && bunx spago test

Some packages with integration tests use Docker for test infrastructure (Redis, Postgres, ScyllaDB). The yoga-test-docker package provides utilities for managing Docker Compose services within tests.

๐Ÿ“š Documentation

Comprehensive documentation is available for key packages:

Additional documentation:

๐Ÿ—๏ธ Monorepo Structure

purescript-yoga-backend-stack/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ yoga-sql-types/          # Foundation package
โ”‚   โ”œโ”€โ”€ yoga-redis/              # Redis base package
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ test/                # Package-specific tests
โ”‚   โ”‚   โ”œโ”€โ”€ spago.yaml
โ”‚   โ”‚   โ””โ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ yoga-redis-om/           # Redis with Om observability
โ”‚   โ”œโ”€โ”€ yoga-postgres/
โ”‚   โ”œโ”€โ”€ yoga-postgres-om/
โ”‚   โ”œโ”€โ”€ yoga-fastify-om/         # Fastify web framework with Om
โ”‚   โ””โ”€โ”€ ...                      # Additional packages
โ”œโ”€โ”€ docs/                        # Documentation
โ”œโ”€โ”€ spago.yaml                   # Workspace configuration
โ”œโ”€โ”€ package.json                 # Root package.json
โ””โ”€โ”€ README.md

๐Ÿ”ง Development

Adding a New Package

  1. Create package directory in packages/
  2. Add spago.yaml, package.json, and README.md
  3. Implement FFI bindings following the pattern in existing packages
  4. Add test suite in test/Main.purs
  5. Update root scripts if needed

Module Naming Convention

All modules use the Yoga.* namespace:

Om Packages

Packages with -om suffix provide Observable Monitoring integration:

๐Ÿ“ License

MIT License - see LICENSE file for details

๐Ÿค Contributing

Contributions are welcome! Please ensure:

โš™๏ธ Requirements