This is the monorepo for Iznik, the platform for Freegle, an online reuse network.
| Directory | What it is |
|---|---|
iznik-nuxt3/ |
Nuxt 3 frontend — user site (ilovefreegle.org) and moderator tools (modtools.org) |
iznik-server-go/ |
Go API (v2) — the primary API |
iznik-server/ |
Legacy PHP API (v1) — being retired |
iznik-batch/ |
Laravel batch processing — digests, notifications, scheduled tasks |
status-nuxt/ |
Development status dashboard and test runner |
freegle-mobile/ |
Capacitor mobile app (Android/iOS) |
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 apiv1.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, Mapbox, etc.) — 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 | test@test.com / freegle |
| Freegle Prod | https://freegle-prod.localhost | test@test.com / freegle |
| ModTools Dev | https://modtools-dev.localhost | testmod@test.com / freegle |
| ModTools Prod | https://modtools-prod.localhost | testmod@test.com / 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 v1 (PHP) | https://apiv1.localhost |
| 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)
- PHPUnit tests for iznik-server (v1 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 WORKTREE-GUIDE.md for details.