This is the monorepo for Iznik, the platform for Freegle, an online reuse network.
| Directory | What it is |
|---|---|
iznik-nuxt3/ |
Nuxt frontend — user site (ilovefreegle.org) and moderator tools (modtools.org) |
iznik-server-go/ |
Go API (v2) — the primary API |
iznik-batch/ |
Laravel batch processing — digests, notifications, scheduled tasks |
status-nuxt/ |
Development status dashboard and test runner |
iznik-nuxt3/android/, ios/ |
Capacitor mobile apps (Android/iOS), built from the same Nuxt code |
Installation
git clone https://github.com/Freegle/IznikOn Windows, Docker Desktop works but is unusably slow. We use WSL2 instead:
- Install a WSL2 distribution (Ubuntu recommended). For a dedicated install:
wsl --install --name freegle - Clone this repository from your IDE using a WSL2 path (e.g.,
\\wsl$\Ubuntu\home\edward\FreegleDockerWSL). - Install Docker
- Open a WSL2 terminal in the repository directory.
- Start Docker:
sudo service docker start
Add these to your hosts file:
127.0.0.1 freegle.localhost
127.0.0.1 freegle-dev.localhost
127.0.0.1 freegle-prod.localhost
127.0.0.1 modtools-dev.localhost
127.0.0.1 modtools-prod.localhost
127.0.0.1 phpmyadmin.localhost
127.0.0.1 mailpit.localhost
127.0.0.1 tusd.localhost
127.0.0.1 status.localhost
127.0.0.1 apiv2.localhost
127.0.0.1 delivery.localhost
Copy .env.example to .env and modify as needed. The basic system works without configuration, but some features require API keys (Google OAuth and so on) — see .env.example for the full list.
After configuration changes, rebuild:
docker-compose build --no-cacheRunning
docker-compose up -dFile syncing to Docker containers happens automatically via the host-scripts container.
Monitor startup progress at http://status.localhost:8081.
The system builds in stages:
- Infrastructure (databases, queues, reverse proxy) — ~2-3 minutes
- Development tools (PhpMyAdmin, Mailpit) — ~1 minute
- Freegle components (websites, APIs) — ~10-15 minutes
| Service | URL | Login |
|---|---|---|
| Freegle Dev | https://freegle-dev.localhost | [email protected] / freegle |
| Freegle Prod | https://freegle-prod.localhost | [email protected] / freegle |
| ModTools Dev | https://modtools-dev.localhost | [email protected] / freegle |
| ModTools Prod | https://modtools-prod.localhost | [email protected] / freegle |
Dev containers reload on first view (normal Nuxt dev mode behaviour). Prod containers run production builds.
| Tool | URL |
|---|---|
| Status Monitor | http://status.localhost:8081 |
| PhpMyAdmin | https://phpmyadmin.localhost |
| Mailpit | https://mailpit.localhost |
| Traefik Dashboard | http://localhost:8080 |
| API v2 (Go) | https://apiv2.localhost:8192 |
Run just the frontend against live production APIs:
docker compose --profile dev-live up -d freegle-dev-liveAccess at http://localhost:3004. Changes to iznik-nuxt3/ files sync automatically.
Warning: Actions in this container affect real Freegle data.
docker logs freegle-freegle-dev # View logs
docker exec -it freegle-percona mysql -u root -piznik # Database access
docker restart freegle-status # Restart a servicedocker compose down
docker system prune -a
docker compose up -dTesting
Tests run from the status page at http://status.localhost:8081:
- Go tests for iznik-server-go (v2 API)
- Laravel tests for iznik-batch (batch processing)
- Vitest unit tests for iznik-nuxt3 (frontend stores and components)
- Playwright end-to-end tests for the user-facing site
The system contains one test group, FreeglePlayground, centred around Edinburgh. The recognised postcode is EH3 6SS.
CI/CD
CircleCI runs the full test suite on every push to master. On success, master is auto-merged to the production branch, which triggers Netlify deployments for both ilovefreegle.org and modtools.org.
Mobile app builds (Android/iOS) run on the production branch via Fastlane, with weekly promotion from beta to production.
Worktrees
Multiple isolated development environments can run in parallel using git worktrees. Each worktree gets its own Docker Compose stack on unique ports.
./freegle worktree create feature-x # Create isolated environment
./freegle status # See all worktrees and URLs
./freegle worktree remove feature-x # CleanupSee ./docs/developers/reference/worktrees.md for details.