Local Development
Running the services by hand gives you reload-on-save and a debugger. You need Postgres and Redis somewhere reachable, a Python virtualenv for the backend and worker, and Node for the frontend. The whole loop is below.
Prerequisites
Section titled “Prerequisites”- Python 3.11+
- Node.js 20+ and npm
- PostgreSQL 16 (local or remote)
- Redis 7
Set up the Python side
Section titled “Set up the Python side”git clone https://github.com/giovi321/apple-juicer.gitcd apple-juicerpython -m venv .venvsource .venv/bin/activatepip install -U pippip install -e ".[dev]"Bring up the datastores
Section titled “Bring up the datastores”Create the database and point the app at it:
createdb apple_juicerexport APPLE_JUICER_POSTGRES__DSN="postgresql+asyncpg://postgres:postgres@localhost:5432/apple_juicer"The schema is applied automatically — Alembic runs upgrade head when the backend starts, so there is no manual migration step. Start Redis any way you like:
redis-server # or: brew services start redis / systemctl start redisStart the frontend
Section titled “Start the frontend”cd frontendnpm installnpm run devVite serves on http://localhost:5173 and proxies API calls to the backend on 8080.
Start the backend
Section titled “Start the backend”From the repository root:
uvicorn api.main:create_app --factory --reload --host 0.0.0.0 --port 8080The settings you will reach for most:
| Variable | What it does | Default |
|---|---|---|
APPLE_JUICER_SECURITY__API_TOKEN | The token the frontend sends as X-API-Token | dev-token |
APPLE_JUICER_BACKUP_PATHS__BASE_PATH | Where backups are mounted | /data/ios_backups |
APPLE_JUICER_REDIS__URL | Redis DSN | redis://localhost:6379/0 |
The full list is in Configuration.
Start the worker
Section titled “Start the worker”The worker runs the decrypt and index jobs. Keep the same virtualenv active so the parsers and models resolve:
APPLE_JUICER_REDIS__URL=redis://localhost:6379/0 rq worker default# or the console script:apple-juicer-workerTry the flow
Section titled “Try the flow”- Drop a Finder/iTunes backup under
APPLE_JUICER_BACKUP_PATHS__BASE_PATH. - Open the UI, paste the API token, and refresh to discover it.
- Decrypt an encrypted backup, watch the status reach
indexed, then browse its artifacts.
Useful while developing
Section titled “Useful while developing”pytestruns the backend and worker tests. They use SQLite, so you don’t need Postgres for the suite.npm run testruns the frontend Vitest suites.LOG_LEVEL=debugon the backend surfaces the discovery and unlock internals when something misbehaves.