56526c8fc552ba5377d912552950eaf49daa24e0
b0esche.cloud
A self-hosted, SaaS-style document platform with Go backend and Flutter web frontend.
Project Structure
go_cloud/: Go backend (control plane) with REST APIb0esche_cloud/: Flutter web frontend with BLoC architecture- Supporting services: Nextcloud (storage), Collabora (editing), PostgreSQL (database)
Prerequisites
- Go 1.21+
- Flutter 3.10+
- Docker and Docker Compose
- PostgreSQL (or Docker)
- Nextcloud instance
- Collabora Online instance
Local Development Setup
1. Start Supporting Services
Use Docker Compose to start PostgreSQL, Nextcloud, and Collabora:
docker-compose up -d db nextcloud collabora
2. Backend Setup
cd go_cloud
cp .env.example .env
# Edit .env with your configuration (DB URL, Nextcloud URL, etc.)
go run ./cmd/api
Or use the provided script:
./scripts/dev-backend.sh
3. Frontend Setup
cd b0esche_cloud
flutter pub get
flutter run -d chrome
Or use the script:
./scripts/dev-frontend.sh
4. Full Development Environment
To start everything:
./scripts/dev-all.sh
This will bring up all services, backend, and frontend.
Configuration
Backend (.env)
Copy go_cloud/.env.example to go_cloud/.env and fill in:
DATABASE_URL: PostgreSQL connection stringJWT_SECRET: Random secret for JWT signingOIDC_*: OIDC provider settingsNEXTCLOUD_*: Nextcloud API settingsCOLLABORA_*: Collabora settings
Frontend
The frontend uses build-time environment variables for API base URL. For dev, it's hardcoded in ApiClient constructor.
For production builds, update accordingly.
Running Tests
Backend
cd go_cloud
go test ./...
Frontend
cd b0esche_cloud
flutter test
Building for Production
Backend
cd go_cloud
go build -o bin/api ./cmd/api
Frontend
cd b0esche_cloud
flutter build web
Database Migrations
Migrations are in go_cloud/migrations/.
To apply:
# Dev
go run github.com/pressly/goose/v3/cmd/goose@latest postgres "$DATABASE_URL" up
# Production
# Use your deployment tool to run the migration command
Backup Strategy
- Database: Regular PostgreSQL dumps of orgs, memberships, activities
- Files: Nextcloud/S3 backups handled at storage layer
- Recovery: Restore DB, then files; Go control plane is stateless
Contributing
- Clone the repo
- Follow local setup
- Make changes
- Run tests
- Submit PR
License
[License here]
Description
Languages
Dart
56.2%
Go
34.7%
C++
3.5%
CMake
2.5%
Shell
1.4%
Other
1.6%