Bitsacco Server is an open source model for running Savings and Credit Cooperatives (SACCO) on Bitcoin
- Backend: Axum web framework
- Frontend: Leptos (SSR + Hydration)
- Database: PostgreSQL with advanced caching (no Redis dependency)
- Authentication: Keycloak
- Styling: TailwindCSS
- Build Tool: cargo-leptos
- JWT Deployment Guide - Complete guide for JWT configuration in production
- Environment Variables - Reference for all configuration options
- Rust 1.82+
- Docker and Docker Compose
- Node.js (for TailwindCSS)
# Install all dependencies and tools
chmod +x install.sh && ./install.sh
# Start database and auth services
npm run services
# Run development server with hot reload
npm run cargo:dev
# Build and run everything in development mode
npm run dev
# View logs
npm run logs
# Build and run in production mode
npm run prod
# Build production binary locally
npm run cargo:build
npm run cargo:dev
- Run development server locally with cargo-leptos watchnpm run cargo:build
- Build production binary locallynpm run cargo:fmt
- Format all Rust codenpm run cargo:fmt:check
- Check if Rust code is formatted (CI friendly)
npm run dev
- Start all services in development mode with hot reloadnpm run dev:build
- Build development Docker imagenpm run dev:rebuild
- Rebuild development image without cachenpm run logs
- View app container logs
npm run prod
- Start all services in production modenpm run prod:build
- Build production Docker image
npm run services
- Start PostgreSQL and Keycloak onlynpm run services:stop
- Stop all servicesnpm run stop
- Stop all Docker containers
npm run build-css
- Watch and rebuild TailwindCSS styles
bsr/
├── app/ # Main application (Leptos + Axum)
├── entity/ # Database entities (SeaORM)
├── migration/ # Database migrations
├── style/ # CSS and styling
├── public/ # Static assets
├── tests/ # Integration tests
└── keycloak/ # Keycloak configuration
This is Phase 1 of the migration plan. Currently implemented:
- ✅ Project structure setup
- ✅ Cargo workspace configuration
- ✅ Docker Compose environment
- ✅ Basic Leptos application
- ✅ Configuration management
- ✅ Logging and tracing
- ✅ TailwindCSS integration
- ✅ Health check endpoints
- ✅ Testing framework setup
- Database schema design
- SeaORM entities implementation
- PostgreSQL caching strategies
- Migration system
GET /
- Home pageGET /health
- Health check pageGET /api/health
- Health check APIGET /api/info
- API information
# Format all Rust code
npm run cargo:fmt
# Format everything (Rust + CSS)
npm run fmt
# Check formatting without changes
npm run cargo:fmt:check
# Run Clippy linter
npm run cargo:lint
# Run all tests
npm run cargo:test
# Quick compilation check
npm run cargo:check
# Set up pre-commit hooks
npm run setup:hooks
# Run pre-commit checks manually
npm run precommit
Please refer to the migration plan document for development guidelines and phase objectives. All code must be formatted and pass linting checks before committing.
Bitsacco Server is MIT-licensed. We grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Website - https://bitsacco.com
- Twitter - @bitsacco
- Maintainer - Jodom
Bitsacco Server is MIT licensed.