Your wardrobe in your pocket: digitise your clothes with a photo and let AI suggest what to wear based on the weather and the occasion.
Armario Virtual ("Virtual Wardrobe") is a mobile app with its own API for managing your personal wardrobe. You can add clothing items by hand or from a photo analysed by AI, check the weather where you are, and build outfits manually or have Gemini generate them from a natural-language description.
βΉοΈ The app UI, API routes and code are in Spanish (e.g. prendas = clothing items).
TFG.-.Video.demo.-.Trim.mp4
TFG.-.Video.demo.-.Trim2.mp4
- π Authentication: sign-up, login and persistent sessions with Firebase Authentication.
- π Clothing items:
- Manual entry: name, type, colours, warmth level and elegance level.
- AI entry: take a photo or pick one from your gallery; it is uploaded to Cloudinary and Gemini analyses it to fill in every field automatically.
- π§₯ Outfits:
- Manual creation by combining items from your wardrobe.
- AI generation: describe the occasion ("dinner with friends", "job interview"...) and the AI picks items from your catalogue, taking the current weather into account.
- π¦οΈ Live weather: the home screen shows the weather at your location (OpenWeatherMap +
expo-location). - ποΈ Gallery and details: view, edit and delete items and outfits.
- π€ Account: edit your name and sign out.
All AI features run on Gemini (gemini-2.5-flash-lite by default) with structured output: the model returns JSON that is validated against a Pydantic schema before anything is saved to the database.
Clothing items are rated on two 1β5 scales:
| Level | Warmth | Elegance |
|---|---|---|
| 1 | Very light (> 30 Β°C) | Sporty / Loungewear |
| 2 | Light (20β25 Β°C) | Casual |
| 3 | Medium (15β20 Β°C) | Smart casual |
| 4 | Warm (5β15 Β°C) | Semi-formal |
| 5 | Very warm (< 5 Β°C) | Formal / Black tie |
- Item from image (
POST /api/prendas/desde-imagen-ia): Gemini receives the photo and the list of colours in the database, and returns the name, type, colours, warmth level and elegance level. - Outfit from text (
POST /api/outfits/generar-desde-ia): Gemini receives your description, your clothing catalogue and, if you send coordinates, the temperature and "feels like" temperature. If the description and the weather conflict, the description wins. The chosen items are then checked to make sure they exist and belong to you.
ββββββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββββββ
β Mobile app (Expo) β HTTP β FastAPI API β ORM β MySQL β
β React Native + Redux β ββββββΆ β routers β crud β β ββββββΆ β β
ββββββββββββ¬ββββββββββββ β models / schemas β ββββββββββββ
β ββββββββ¬βββββββββ¬βββββββ
β photos β β
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββ ββββββββββββββββββ
β Cloudinary β β Gemini β β OpenWeatherMap β
ββββββββββββββ ββββββββββββ ββββββββββββββββββ
Firebase Auth handles sign-in from the app.
| Area | Technology |
|---|---|
| Mobile app | React Native 0.81, Expo SDK 54, Expo Router, Redux Toolkit, expo-image-picker, expo-location |
| Authentication | Firebase Authentication |
| Images | Cloudinary |
| Backend | Python, FastAPI, SQLAlchemy 2, Pydantic 2, pydantic-settings |
| Database | MySQL (PyMySQL) |
| AI | Google Gemini (google-genai) with structured JSON output |
| Weather | OpenWeatherMap API |
| Tests | Pytest |
| Package managers | pnpm (frontend), pip (backend) |
Interactive docs (Swagger) at http://localhost:8000/docs.
| Resource | Endpoints |
|---|---|
Users /api/usuarios |
GET /, GET /{id}, GET /{id}/prendas, GET /{id}/outfits, POST /, PUT /{id}, DELETE /{id} |
Items /api/prendas |
GET /, GET /{id}, POST /, POST /desde-imagen-ia, PUT /{id}, DELETE /{id} |
Outfits /api/outfits |
GET /, GET /{id}, POST /, POST /generar-desde-ia, PUT /{id}, DELETE /{id} |
Colours /api/colores |
GET /, GET /{id}, POST /, PUT /{id}, DELETE /{id} |
Weather /api/clima |
GET /actual?lat=...&lon=... |
ArmarioVirtual/
βββ backend/
β βββ app/
β β βββ core/config.py # Environment variables
β β βββ database/database.py # SQLAlchemy engine and session
β β βββ models/ # User, Item, Outfit, Colour and join tables
β β βββ schemas/ # Pydantic request/response schemas
β β βββ crud/ # Business logic + AI (ia_utils, prenda_ia_crud, outfit_ia_crud)
β β βββ routers/ # REST endpoints
β β βββ main.py
β βββ tests/ # User, item, outfit and colour tests
β βββ requirements.txt
βββ frontend/
βββ app/ # Expo Router routes
β βββ (tabs)/ # home, items, outfits, account
β βββ prendas/ # item detail, edit, manual and AI creation
β βββ outfits/ # outfit detail, edit, manual and AI creation
βββ src/
βββ features/ # auth, home, prendas, outfits, usuarios (api, screens, state)
βββ shared/ # HTTP client, Firebase, Cloudinary, theme, components
βββ store/ # Redux store
- Node.js 18+ and
pnpm - Python 3.10+
- A MySQL server
- Expo Go on your phone, or an emulator (Android Studio / Xcode)
- API keys for Gemini, OpenWeatherMap, Firebase and Cloudinary
cd backend
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
pip install -r requirements.txtCreate a .env file in backend/:
DATABASE_URL=mysql+pymysql://<user>:<password>@localhost:3306/<database>
GEMINI_API_KEY=<your_gemini_api_key>
GEMINI_MODEL=gemini-2.5-flash-lite
OPENWEATHER_API_KEY=<your_openweather_api_key>Start the server (tables are created automatically on startup):
uvicorn app.main:app --host 0.0.0.0 --port 8000Run the tests (they use an in-memory SQLite database, no MySQL needed):
pytestcd frontend
pnpm installSet the variables in a .env file (or in app.json):
EXPO_PUBLIC_BACKEND_URL=http://<BACKEND_LOCAL_IP>:8000
EXPO_PUBLIC_CLOUDINARY_CLOUD_NAME=<your_cloud_name>
EXPO_PUBLIC_CLOUDINARY_UPLOAD_PRESET=<your_upload_preset>
EXPO_PUBLIC_CLOUDINARY_UPLOAD_FOLDER=<your_upload_folder>
EXPO_PUBLIC_FIREBASE_API_KEY=<your_firebase_api_key>
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=<your_firebase_auth_domain>
EXPO_PUBLIC_FIREBASE_PROJECT_ID=<your_firebase_project_id>
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=<your_firebase_storage_bucket>
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=<your_firebase_messaging_sender_id>
EXPO_PUBLIC_FIREBASE_APP_ID=<your_firebase_app_id>Start the app and scan the QR code with Expo Go (Android) or the Camera app (iOS):
pnpm startπ‘ Use your computer's local IP in
EXPO_PUBLIC_BACKEND_URL(notlocalhost) so your phone can reach the backend.
Made by Francisco RamΓrez CaΓ±adas