{"id":31696600,"url":"https://github.com/joupify/smartstay","last_synced_at":"2026-04-13T06:02:13.683Z","repository":{"id":310284322,"uuid":"1025809200","full_name":"joupify/SmartStay","owner":"joupify","description":"Rails 7 app managing lodgings with Redis Stack, real-time notifications, full-text and AI-powered vector search using OpenAI embeddings.","archived":false,"fork":false,"pushed_at":"2025-08-17T01:48:35.000Z","size":17173,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-17T03:12:39.337Z","etag":null,"topics":["ai","docker","docker-compose","openai","rails","real-time","redis","redis-cache","redisclient","redisearch","ruby","vector-search"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joupify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T20:49:58.000Z","updated_at":"2025-08-17T01:48:38.000Z","dependencies_parsed_at":"2025-08-17T03:12:46.091Z","dependency_job_id":"9295caa3-65ea-4486-b270-9071b43e8027","html_url":"https://github.com/joupify/SmartStay","commit_stats":null,"previous_names":["joupify/smartstay"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/joupify/SmartStay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joupify%2FSmartStay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joupify%2FSmartStay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joupify%2FSmartStay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joupify%2FSmartStay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joupify","download_url":"https://codeload.github.com/joupify/SmartStay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joupify%2FSmartStay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278981518,"owners_count":26079640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","docker","docker-compose","openai","rails","real-time","redis","redis-cache","redisclient","redisearch","ruby","vector-search"],"created_at":"2025-10-08T17:09:32.207Z","updated_at":"2025-10-08T17:09:37.279Z","avatar_url":"https://github.com/joupify.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartStay – Redis + AI Challenge [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nRails 7 application for managing lodgings with Redis Stack, real-time notifications via ActionCable, and AI integration (vector search with embeddings).\n\n## 🎯 Challenge Goal\n\nStore lodgings exclusively in Redis (no SQL database).\n\nReal-time notifications for creation, update, and deletion.\n\nFull-text search with RediSearch.\n\nAI similarity search using Redis Vector Search + embeddings (currently mock).\n\n## ✅ Implemented Features\n\n- ✔ CRUD for lodgings (stored in Redis)\n- ✔ Real-time broadcasts via ActionCable\n- ✔ User notifications with Bootstrap Toasts\n- ✔ Full-text search via RediSearch\n- ✔ Popularity tracking with Redis ZSET\n- ✔ Event history via Redis Streams\n- ✔ Minimal dashboard: Top popular lodgings + recent events\n- ✔ Persistence enabled (AOF with Docker)\n\n## 🔥 Upcoming Features\n\n- 🔍 AI vector search with real OpenAI embeddings\n- 🧠 AI Assistant for recommendations\n- 📊 Advanced dashboard for analytics\n- ✅ Deployment on Render + Redis Cloud\n\n## 🛠 Tech Stack\n\n- Ruby: 3.1.3\n- Rails: 7.2.2.1\n- Redis Stack: Search, Vector, Streams\n- ActionCable: Real-time notifications\n- Bootstrap 5: Responsive UI\n- Docker: Redis Stack container\n- AI: OpenAI embeddings (mocked if no key)\n\n## 🔧 Installation \u0026 Setup\n\n1️⃣ Clone the repo\n\ngit clone https://github.com/joupify/smartstay.git  \ncd smartstay  \n2️⃣ Install dependencies\n\nbundle install  \n3️⃣ Run Redis Stack with persistence\n\ndocker run -d \\\n --name redis-stack \\\n -p 6380:6379 \\\n -p 8001:8001 \\\n -v ~/redis-data:/data \\\n redis/redis-stack:latest\nRedis Insight GUI: http://localhost:8001\n\nRedis accessible: localhost:6380\n\n4️⃣ Start Rails server\n\nApp URL: http://localhost:3000\n\n✅ Quick Check (Rails console)\n\nservice = RedisLodgingService.new\nservice.save_lodging(id: SecureRandom.uuid, title: \"Cozy studio\", description: \"Nice studio with balcony\", price: 600)\nservice.list_all_lodgings\n\n🔍 Search (RediSearch)\n\nservice.text_search(\"studio\")\n(Index is auto-created if missing)\n\n🤖 AI Similar Search\n\nUses **OpenAI embeddings** (model: `text-embedding-3-small`) when `OPENAI_API_KEY` is set.\nFalls back to mock embeddings only if no API key is provided.\nButton **\"Find Similar\"** triggers semantic search via Redis Vector Search (KNN).\n\n📡 Real-time Notifications\n\nOpen 2 browser tabs, add a lodging → instant notification (via ActionCable)\n\nUI (Bootstrap Toast container):\n\n\u003cdiv id=\"notifications\"\n     class=\"toast-container position-fixed top-0 end-0 p-3\"\n     data-turbo-permanent\u003e\n\u003c/div\u003e\n\n📊 Dashboard\n\nTotal Lodgings\n\nTop Popular Lodgings (via ZSET)\n\nRecent Events (via Redis Streams)\n\n✅ Redis Persistence  \nEnable AOF:\n\ndocker exec -it redis-stack redis-cli CONFIG SET appendonly yes\ndocker exec -it redis-stack redis-cli CONFIG REWRITE\n\n📸 Screenshots  \nSee screenshots in the French section below.\n\n✅ Next Steps\nSwitch from mock embeddings → real OpenAI API\n\nDeployment on Render + Redis Cloud\n\nAdd analytics (stream aggregation)\n\n## 🎥 Demo Video\n\nWatch the full demo with subtitles:  \n[▶ Watch on Youtube](https://youtu.be/pAIY7tOzB7I)\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## 👩‍💻 Author\n\n**Malika (joupify)**  \n[GitHub](https://github.com/joupify)\n\n[![DEV Post](https://img.shields.io/badge/DEV-Read%20Article-black?logo=dev.to)](https://dev.to/joupify/smartstay-redis-powered-real-time-ai-lodging-manager-51o8)\n\n## 🤝 Contributing\n\nContributions are welcome!  \nFeel free to fork the repo and submit a Pull Request.\n\n## 🇫🇷 Version Française\n\nApplication Rails 7 pour la gestion des logements avec Redis Stack, notifications en temps réel via ActionCable, et intégration IA (recherche vectorielle avec embeddings).\n\n🎯 Objectif du Challenge\nStocker les logements exclusivement dans Redis (sans base SQL)\nNotifications en temps réel (création, mise à jour, suppression)\nRecherche textuelle avec RediSearch\nRecherche similaire via Redis Vector Search + embeddings IA (mock actuellement)\n\n✅ Fonctionnalités Implémentées  \n✔ CRUD complet (logements stockés dans Redis)\n\n✔ Diffusion temps réel avec ActionCable\n\n✔ Notifications utilisateur (Bootstrap Toasts)\n\n✔ Recherche textuelle rapide grâce à RediSearch\n\n✔ Suivi de popularité avec Redis ZSET\n\n✔ Historique des événements avec Redis Streams\n\n✔ Mini-dashboard : Top logements + événements récents\n\n✔ Persistance activée (AOF avec Docker)\n\n🔥 Fonctionnalités à venir\n\n🔍 Recherche vectorielle IA avec embeddings OpenAI réels\n\n🧠 Assistant IA pour recommandations\n\n📊 Tableau de bord avancé pour les statistiques\n\n✅ Déploiement sur Render + Redis Cloud\n\n🛠 Stack Technique\n\nRuby : 3.1.3\n\nRails : 7.2.2.1\n\nRedis Stack : Search, Vector, Streams\n\nActionCable : Notifications temps réel\n\nBootstrap 5 : Interface responsive\n\nDocker : Conteneur Redis Stack\n\nIA : OpenAI embeddings (mock si clé absente)\n\n🔧 Installation \u0026 Configuration\n\n1️⃣ Cloner le projet\n\ngit clone https://github.com/joupify/smartstay.git\n\ncd smartstay  \n2️⃣ Installer les dépendances\n\nbundle install  \n3️⃣ Lancer Redis Stack avec persistance\n\ndocker run -d \\\n --name redis-stack \\\n -p 6380:6379 \\\n -p 8001:8001 \\\n -v ~/redis-data:/data \\\n redis/redis-stack:latest\nInterface Redis Insight : http://localhost:8001\nRedis accessible : localhost:6380\n\n4️⃣ Démarrer le serveur Rails\n\nbin/dev\nApplication : http://localhost:3000\n\n✅ Vérification rapide (console Rails)\n\nservice = RedisLodgingService.new\nservice.save_lodging(id: SecureRandom.uuid, title: \"Studio cosy\", description: \"Bel studio avec balcon\", price: 600)\nservice.list_all_lodgings\n\n🔍 Recherche (RediSearch)\n\nservice.text_search(\"studio\")\n(L’index est créé automatiquement au démarrage si absent)\n\n🤖 Recherche similaire IA\n\nUtilise **les embeddings OpenAI** (modèle : `text-embedding-3-small`) si `OPENAI_API_KEY` est défini.  \nRevient à des embeddings simulés uniquement si aucune clé API n’est disponible.  \nLe bouton **\"Voir similaires\"** déclenche une recherche sémantique via Redis Vector Search (KNN).\n\n📡 Notifications Temps Réel\n\nOuvrir 2 navigateurs, ajouter un logement → notification instantanée (via ActionCable)\n\nUI (container Toast Bootstrap) :\n\n\u003cdiv id=\"notifications\"\n     class=\"toast-container position-fixed top-0 end-0 p-3\"\n     data-turbo-permanent\u003e\n\u003c/div\u003e\n\n📊 Dashboard  \nNombre total de logements\n\nTop logements populaires (via ZSET)\n\nÉvénements récents (via Redis Streams)\n\n✅ Persistance Redis  \nActiver AOF :\n\ndocker exec -it redis-stack redis-cli CONFIG SET appendonly yes\ndocker exec -it redis-stack redis-cli CONFIG REWRITE\n\n### 📸 Captures d’écran\n\n---\n\n\n### Screenshots\n\n📌 **Home Page (CRUD Operations)**  \n![Home](docs/screenshots/home.png)\n\n📌 **Real-Time Notifications (2 Browsers)**  \n![Notifications](docs/screenshots/notif.png)\n\n📌 **Text \u0026 AI-powered Search (See Similar Button)**  \n![Search](docs/screenshots/search.png)\n\n📌 **Dashboard (Top Lodgings \u0026 Recent Events)**  \n![Dashboard](docs/screenshots/dashboard.png)\n\n---\n\n🔥 Fonctionnalités à venir\n\n🔍 Recherche vectorielle IA avec de vrais embeddings OpenAI\n\n🧠 Assistant IA pour recommandations\n\n📊 Tableau de bord avancé pour les statistiques\n\n✅ Déploiement sur Render + Redis Cloud\n\n## 🎥 Demo Video\n\nWatch the full demo with subtitles:  \n[▶ Watch on Youtube](https://youtu.be/pAIY7tOzB7I)\n\n## 👩‍💻 Author\n\n**Malika (joupify)**  \n[GitHub](https://github.com/joupify)\n\n[![DEV Post](https://img.shields.io/badge/DEV-Read%20Article-black?logo=dev.to)](https://dev.to/joupify/smartstay-redis-powered-real-time-ai-lodging-manager-51o8)\n\n## 📄 Licence\n\nCe projet est sous licence [MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoupify%2Fsmartstay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoupify%2Fsmartstay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoupify%2Fsmartstay/lists"}