Your closet on the web, on iPhone and iPad, and on Android. Snap a photo, and the AI you pick (Claude, ChatGPT or Gemini) finds each piece, cuts it out, and styles outfits from what you own.
Based on tandpfun/wardrobe (original post).
A real closet from the original project. The other screenshots below use a small drawn sample closet.
What's new · What it does · Screenshots · Quick start · Pick your AI · Synology NAS · Cloudflare · iPhone app · Android app · App stores · Settings
- No server needed on iPhone and iPad. Pick Use iCloud on the first screen and your closet lives in your own iCloud, synced across your Apple devices. Nothing goes to us.
- The AI is called from your phone with the key you paste, kept in the Keychain.
- Move an existing closet from your server to iCloud in Settings. The server keeps its copy.
- Arabic. The whole app in Arabic, right to left. Switch in Settings.
- Dressed for the weather. Turn on Weather and Today and the plan suit the forecast.
- Basics without a photo. Add a white tee or navy jeans in two taps.
- Cleaner cutouts. Clean cut on iPhone, and a Fix edges brush everywhere.
- Plan a month in one tap. The new Plan tab fills every day with an outfit, with no repeats inside a week. Add a trip and get a packing list.
- Sorted for you. Pieces get a kind, seasons, warmth and dress level, and the closet groups them: Winter, Summer, Work, Neutrals and more.
- Glass look. See-through bars and a floating tab bar, kept light on the battery.
- Home. The app opens on one outfit for today, made on the phone with no AI. Lock a piece and shuffle the rest, say "Not me", or save it with the heart.
- Clothes you forgot. A row shows what has not been worn in 60 days or more.
- Wear log and cost per wear. Tap Wore today, add the price, and see what each wear costs.
- Outfits built on the color wheel. Pick tonal, neighbors, opposites or three-way. Every outfit shows its rule and a score.
Version 2.3 gets the phone apps ready for the App Store and Google Play. See the changelog for every change.
- Android app. The same app now runs on Android phones, next to the iPhone and iPad app. See Android app.
- Easier on a phone. Closet and Outfits sit in a tab bar at the bottom, and the header scrolls away so your clothes get the screen.
- Clear first run. The phone app says what you need (a server, its address and its token) and links to the setup guide.
- You say yes before any photo goes to an AI. The app asks once for each AI and names the company behind it.
- Safer image links. Your access token no longer appears in image links or server logs.
- One-button releases. Publishing a GitHub release builds both phone apps and sends them to TestFlight and Google Play. See Releasing to the app stores.
- Pick your AI. Choose Claude, ChatGPT or Gemini in Settings and paste its API key there. No more editing
.envand restarting. See Pick your AI.
Version 2.1 brings together the best of two other builds of this app with our own work. See the changelog for every change.
- Build outfits yourself. Pick pieces, give the look a name, occasions and a note, and save it next to the ones the AI styles.
- Edit and filter outfits. Rename an outfit, change its occasions or note, filter the list by occasion, and tap any piece to open it.
- Filter by color. Tap a color dot to see only blue, beige or black pieces. Search understands color words too, so "blue" finds navy.
- New look with dark mode, a settings sheet, search and sort, from the 2.0 redesign.
- Run it on a Synology NAS with Docker, with a step-by-step guide.
- Add clothes from a photo. Drop, paste, choose or take a picture of one piece or a whole outfit. The AI finds every garment and suggests a name, category, colors and tags.
- Clean cutouts. Each piece is cut out of the real photo with background removal, so it looks like your actual item. You check the crop and the cutout before anything is saved.
- Style outfits. Press Style new outfits and the AI builds looks from your closet, names them, and says why they work. Add a note like "cool weekend in the city", or tap an idea such as "Dinner out", to steer it.
- Build your own outfits. Press Build your own, pick two or more pieces, and save the look. Edit any outfit's name, occasions and note later, and filter outfits by occasion.
- Edit and sort. Filter by tops, jackets, bottoms, accessories and shoes. Change names, colors and tags at any time.
- Search, filter and sort. Find pieces by name, tag, category or color word, tap a color dot to filter, and sort by category, newest, color or name.
- Light and dark. A clean, modern look that follows your system theme, on desktop and phone.
- Self-host it. Run it as a container on your Synology NAS (or any Docker host) so all photos and data stay at home, or on Cloudflare. The web app, phone browsers and the iPhone, iPad and Android apps share one closet.
| Your closet | Filter by color |
|---|---|
![]() |
![]() |
| Edit a piece | Server & settings |
|---|---|
![]() |
![]() |
Outfits. The AI styles looks from your closet. Filter them by occasion, open one to see its pieces, or edit its name, occasions and note.
| Outfits | One outfit |
|---|---|
![]() |
![]() |
Build your own. Pick the pieces and the collage fills in as you go.
Review before saving. After the AI finds a piece and the background is removed, you check the details, then approve, reject, or keep the background.
On the phone. The closet in dark mode, outfits, and the iPhone app's connect screen.
You need Node 22 or newer and an API key for Claude, ChatGPT or Gemini (see Pick your AI).
git clone https://github.com/njarrar/wardrobe-najeeb.git
cd wardrobe-najeeb
npm install
cp .env.example .env
npm run dev # http://localhost:5173Open the gear icon, pick an AI and paste its key. You can also put the key in .env instead (see Settings).
To run the built app instead:
npm run build
npm start # http://localhost:4173On your computer, garments are cut out by a small open model (BiRefNet lite) through @huggingface/transformers. npm install adds it when it can, and the model downloads (about 200 MB) the first time you import. If it is missing, the app lets you keep the crop with its background.
The server only listens on your computer by default. To open it from your phone, set both of these in .env and restart:
WARDROBE_HOST=0.0.0.0
WARDROBE_TOKEN=pick-a-long-random-stringThe server refuses to listen on your network without a token. The browser and the app ask for it once and remember it.
The app ships as a single container. All data (closet, photos, cutouts, outfits, the cutout model cache) lives in one folder you mount at /data, so it sits on your NAS and is covered by your normal backups.
cp .env.example .env # set a long WARDROBE_TOKEN (and an AI key, or add it in the app later)
docker compose up -d --build
# open http://<nas-ip>:4173 and enter your tokenOn DSM 7.2+, use Container Manager → Project → Create, point it at this folder and it picks up docker-compose.yml. Set PUID/PGID to your DSM user (id over SSH) so files in ./data belong to you. The GitHub workflow in .github/workflows/docker.yml also publishes a multi-arch image (amd64 + arm64) to GHCR if you prefer pulling an image.
For the iPhone app away from home, put the NAS behind HTTPS with the DSM reverse proxy (plus DDNS and Let's Encrypt) or use Tailscale. QuickConnect can't relay the app's port.
Step-by-step guide, reverse proxy, backups and troubleshooting: docs/synology.md.
Health check (no token needed): GET /api/health answers { ok, version, protected }. It works the same with npm start, npm run dev and on Cloudflare.
Put your closet online so it is the same on every device. Photos and cutouts go in R2, your closet and outfits go in D1, and cutouts run from a Queue.
You need:
- A Cloudflare account on the Workers Paid plan ($5 a month). Queues need it, and framing each garment image takes more CPU time than the free plan allows.
- Cloudflare Images turned on (Images, then Transformations, in the dashboard). It removes backgrounds; 5,000 cutouts a month are free.
- An API key for Claude, ChatGPT or Gemini.
One-time setup:
npx wrangler login
npx wrangler r2 bucket create wardrobe
npx wrangler d1 create wardrobe # copy the database_id it prints into wrangler.jsonc
npx wrangler queues create wardrobe-jobs
npm run cf:migrate # creates the tables
npx wrangler secret put WARDROBE_TOKEN # pick a long random string
npm run cf:deployOpen the workers.dev address it prints, enter your token, then pick an AI and paste its key under the gear icon. (Worker secrets such as ANTHROPIC_API_KEY still work if you prefer them.) To copy a closet you built on your computer:
WARDROBE_TOKEN=your-token npm run cf:upload -- https://wardrobe.your-name.workers.devRun npm run cf:migrate and npm run cf:deploy again after each update (2.2 adds a settings table). To try the Worker on your computer first, put WARDROBE_TOKEN in .dev.vars, run npx wrangler d1 migrations apply wardrobe --local, then npm run cf:dev. Local Cloudflare Images can resize but not remove backgrounds, so cutouts keep their background there.
Open the gear icon, then under AI pick Claude, ChatGPT or Gemini, paste its API key and press Save. The pick and the key apply to every device that uses this server, including the iPhone app. You can also change the model, or leave it empty for the default.
| AI | Get a key | Default model |
|---|---|---|
| Claude (Anthropic) | console.anthropic.com | claude-opus-5 |
| ChatGPT (OpenAI) | platform.openai.com | gpt-6.1-sol |
| Gemini (Google) | aistudio.google.com | gemini-3.8-flash |
Why a key and not a login? A ChatGPT Plus, Gemini or Claude plan lets you sign in to that company's own apps, but none of them lets other apps use the plan. Apps like this one need an API key, which is billed by use on its own account. A few dollars of credit goes a long way here.
Where the key is kept. On your computer or NAS it goes in data/settings.json, which only the server's user can read. On Cloudflare it goes in your D1 database. The app never sends a whole key back to the browser; Settings shows only its last four characters. A key in .env (or a Worker secret) still works, and a key saved in the app takes its place until you remove it. Anyone with your WARDROBE_TOKEN can change the keys, so keep the token private.
The ios/ folder holds a Capacitor app that shows the same closet. Point it at your NAS container (e.g. http://192.168.1.20:4173 at home, or your HTTPS reverse-proxy / Tailscale address anywhere), your Cloudflare Worker, or the server on your computer (set WARDROBE_HOST and WARDROBE_TOKEN first, see above).
You need a Mac with Xcode 26 or newer (the App Store needs the iOS 26 SDK):
npm install
npm run ios # builds the web app, copies it into ios/, opens XcodeIn Xcode, pick your team under Signing & Capabilities, choose your iPhone, and press Run. On first launch the app asks for your server address and token, and tests the connection before saving it. Tap the gear icon later to see the connection status or switch servers. You can browse, edit, delete, add photos from your library or camera, and style outfits.
On iPhone and iPad you can skip the server: tap Use iCloud on the first screen. The app then keeps everything in its own hidden iCloud Drive folder (iCloud.com.njarrar.wardrobe), so the closet follows you to every device on the same Apple Account. AI keys go in the Keychain (synced by iCloud Keychain), and the app calls the AI you picked straight from the phone. With iCloud Drive off, the closet stays on that device. In Settings > Where your closet lives you can copy a server closet into iCloud, or go back to a server. Photo cutouts use Apple's on-device Vision (iOS 17 and later); on older iOS the crop is kept, and Fix edges can clean it up.
Before the first release with iCloud, turn on iCloud (with CloudKit off, iCloud Documents on) for com.njarrar.wardrobe in the Apple Developer site under Identifiers, and add the container iCloud.com.njarrar.wardrobe. The release workflow signs automatically and picks it up from there.
On any phone, the add button offers Take photo next to Choose images. Photos are turned upright and shrunk to 2048 px before upload.
The android/ folder holds the same Capacitor app for Android. It connects to your server the same way as the iPhone app, including plain http:// addresses on home Wi-Fi.
You need Android Studio (or the Android SDK and Java 21):
npm install
npm run android # builds the web app, copies it into android/, opens Android StudioPick a phone or emulator and press Run. To change the icon, edit the shirt in scripts/make-android-icons.mjs and run node scripts/make-android-icons.mjs.
Publish a GitHub release and the Release apps workflow builds both phone apps and uploads them to TestFlight and the Google Play internal test track. The workflow needs signing keys stored as GitHub secrets; it names any that are missing. The Store listing workflow (run it by hand) fills in both store listings, with fresh screenshots, from a listing kept in the STORE_LISTING_JSON secret. The privacy policy is docs/privacy.md.
Two skills in .claude/skills let Claude Code work on your closet without an API key, because Claude Code looks at your photos itself:
/import-clothes Import the clothes from ~/Pictures/outfits and add them to this wardrobe.
/style-outfits Put together six outfits for autumn.
The import skill finds each garment, cuts it out, checks every cutout, then writes to data/library.json and data/imported/. The outfit skill looks at your pieces and adds looks to data/outfits.json.
| Part | Where |
|---|---|
| Web app (React 19 + Vite) | src/ (closet in App.jsx, outfits in Outfits.jsx, settings in SettingsSheet.jsx) |
| Local server and API | scripts/import-job-api.mjs, scripts/serve.mjs |
| Rules shared by the server and the Worker (item edits, outfits) | shared/core.mjs |
| Cloudflare Worker (R2, D1, Queue, Images) | worker/, wrangler.jsonc |
| AI calls for Claude, ChatGPT and Gemini (finding clothes, styling outfits) | shared/ai.mjs |
| AI picker in Settings | src/AiSettings.jsx |
| iPhone app (Capacitor) | ios/ |
| Android app (Capacitor) | android/ |
| Docker image and Synology setup | Dockerfile, docker/, docker-compose.yml, docs/synology.md |
| Image publishing (GHCR, amd64 + arm64) | .github/workflows/docker.yml |
| Claude Code skills | .claude/skills/ |
All three AIs answer in structured JSON against the same schema. Claude calls use claude-opus-5, and if Claude declines to read a photo the API retries on the model Anthropic recommends (fallbacks: "default"). ChatGPT calls use OpenAI Chat Completions with a strict JSON schema; Gemini calls use generateContent with a JSON response schema. Both go through plain fetch, so they run the same on Node and on Cloudflare.
Your photos and closet stay in data/ on your computer (or in your own R2 and D1 on Cloudflare). data/ is never committed.
| Variable | Default |
|---|---|
WARDROBE_AI_PROVIDER |
claude, openai or gemini. Used until you pick one in the app; otherwise the first AI with a key |
ANTHROPIC_API_KEY |
Claude key (or add it in the app) |
OPENAI_API_KEY |
ChatGPT key (or add it in the app) |
GEMINI_API_KEY |
Gemini key (or add it in the app) |
WARDROBE_CLAUDE_MODEL |
claude-opus-5 |
WARDROBE_OPENAI_MODEL |
gpt-6.1-sol |
WARDROBE_GEMINI_MODEL |
gemini-3.8-flash |
WARDROBE_CUTOUT_MODEL |
onnx-community/BiRefNet_lite (computer only) |
WARDROBE_DATA_DIR |
data |
WARDROBE_HOST |
127.0.0.1 |
WARDROBE_TOKEN |
Required when WARDROBE_HOST is not local, and on Cloudflare |
PORT |
4173 (for npm start) |
PUID / PGID |
1026 / 100 (Docker only: owner of files in ./data) |
TZ |
Europe/London (Docker only) |
WITH_CUTOUT |
true (Docker build arg; false = smaller image without on-device cutouts) |
npm test # API and image tests, with a stand-in for the Claude, OpenAI and Gemini APIs
npm run check # build, test, and check the iOS app has the same version
npm run test:ui # open the built app on a phone-sized screen (needs Playwright's Chromium)
npm version 2.3.0 # bump the version everywhere, including the iOS appSee CHANGELOG.md. Publishing your own copy: docs/github.md.












