Self-hosted synchronization service for Midori and Firefox with end-to-end encryption, a Laravel backend, a browser extension, and a web dashboard to inspect devices, collections, and storage usage.
The repository already has a functional and usable foundation:
- Laravel 13 backend with
v1sync API andextAPI for the extension. - Web and extension authentication via Authentik using Socialite.
- PostgreSQL persistence with Redis for cache/session/queue in Docker deployments.
- Extension with popup, options, setup, crypto library with libsodium, and adapters for multiple collections.
- Web dashboard with pages for dashboard, devices, collections, and settings.
There is also clear technical debt:
- There are two API surfaces (
/api/extand/api/v1) with overlapping logic. - The collection seeder does not fully match the original project scope.
- Test coverage and development documentation are still partial.
The updated status details and execution plan live in docs/plan-status.md.
- Laravel 13 with PHP 8.3+
- REST API for sessions, records, devices, and crypto key bundles
SyncAuthServiceandSyncStorageServiceservices- Middleware for quota checks, device tracking, CORS, and token validation
- Scheduled commands for TTL cleanup and usage recalculation
- Manifest V2 for Gecko/Firefox
- Popup for login, sync status, and manual actions
- Options page for server settings, collections, and seed phrase
- Setup page to generate or recover the seed phrase
midori-sync-crypto.jslibrary with Argon2id + XChaCha20-Poly1305
- Dashboard with basic metrics and recent activity
- Connected device management
- Navigation across synced collections
- Settings for quota and server-side data deletion
app/
Console/Commands/ Scheduled commands
Http/Controllers/ API, auth, and web controllers
Http/Middleware/ Token, quota, CORS, tracking
Http/Requests/ API v1 and ext Form Requests
Models/ User, Device, Record, SyncSession, etc.
Services/ Core auth and storage logic
database/
migrations/ Main sync schema
seeders/ Collection seeder
docs/ API, architecture, encryption, deployment, plan
extension/ Browser extension
resources/js/ Frontend Vue 3 + Inertia
routes/ web.php, api.php, console.php
tests/ PHPUnit y Vitest
- Docker
- Docker Compose
- Authentik instance accessible from the application
- PHP 8.3+
- Composer 2+
- Node.js 20+
- PostgreSQL 17+
- Redis 7+
- Clone the repository and enter the directory.
- Create your environment file from
.env.example. - Configure at least
APP_URL,DB_*,AUTHENTIK_*, and the sync values. - Start the services.
- Generate the Laravel key and run migrations with seed data.
cp .env.example .env
docker compose up -d --build
docker compose exec app php artisan key:generate
docker compose exec app php artisan migrate --seedBy default, the container publishes the app on port 8000, so the expected local URL is:
http://localhost:8000
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
composer run devcomposer run dev starts the Laravel server, queue worker, logs, and Vite in parallel.
APP_URL=http://localhost:8000
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=midori_sync
DB_USERNAME=midori
DB_PASSWORD=secret
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
AUTHENTIK_CLIENT_ID=
AUTHENTIK_CLIENT_SECRET=
AUTHENTIK_BASE_URL=https://auth.example.com
AUTHENTIK_REDIRECT_URI=${APP_URL}/auth/callback
SYNC_TOKEN_TTL=3600
SYNC_MAX_RECORD_SIZE=262144
SYNC_DEFAULT_QUOTA=104857600
SYNC_RATE_LIMIT=60# backend tests
composer test
# current JS tests
npx vitest run tests/crypto.test.js
# cleanup TTL records and expired sessions
php artisan sync:cleanup-expired
# recalculate usage for all users
php artisan sync:recalculate-usage
# recalculate usage for a specific user
php artisan sync:recalculate-usage --user=1docs/api.md: current MSP API reference.docs/architecture.md: technical architecture overview.docs/encryption.md: encryption model and key hierarchy.docs/deployment.md: Docker deployment guide.docs/plan-status.md: updated audit and prioritized backlog.
- The extension is still not consolidated around a single sync engine.
- Tests are still missing for adapters, middleware,
SyncAuthService, and E2E flows. - Operational docs such as
protocol.md,extension-dev.md, andcontributing.mdare still missing. - The dashboard still does not include an activity chart or device rename flow.
This project is distributed under the AGPL license. See LICENSE for the full text.