Leon Bösche 69cf328972 Fix Collabora 400 error by properly URL-encoding WOPISrc parameter
- WOPISrc is a full URL that needs URL encoding when passed as query param
- Use Uri.encodeComponent() to properly encode the WOPISrc value
- Simplify iframe setup to just use the properly constructed URL
- This fixes the 400 Bad Request from Collabora when loading documents
2026-01-12 09:50:41 +01:00
2026-01-08 13:24:14 +01:00
2026-01-08 13:24:14 +01:00
2025-12-18 00:11:30 +01:00
2026-01-08 13:07:07 +01:00
2025-12-18 00:11:30 +01:00

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 API
  • b0esche_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 string
  • JWT_SECRET: Random secret for JWT signing
  • OIDC_*: OIDC provider settings
  • NEXTCLOUD_*: Nextcloud API settings
  • COLLABORA_*: 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

  1. Clone the repo
  2. Follow local setup
  3. Make changes
  4. Run tests
  5. Submit PR

License

[License here]

Description
No description provided
Readme 3.5 GiB
Languages
Dart 56.2%
Go 34.7%
C++ 3.5%
CMake 2.5%
Shell 1.4%
Other 1.6%