- Frontend: https://escapeai-smoky.vercel.app/
- Backend: https://escapeai.onrender.com
EscapeAI is an immersive, story-driven escape room experience that uses artificial intelligence to create dynamic storylines and personalized challenges. Every player’s journey is unique, shaped by their decisions and the AI’s storytelling.
EscapeAI was designed to bring together the thrill of puzzle-solving and the creativity of AI-driven narratives. Instead of following a fixed storyline, players are guided through evolving scenarios that adapt to their choices. The system generates new rooms, story branches, and endings based on player interactions, ensuring no two sessions are ever the same.
The platform includes the following key sections:
- Dynamic story generation using Gemini AI, adapting to player choices in real time.
- Secure Google authentication for login and session tracking.
- Fully responsive and interactive user interface with animations and transitions.
- Persistent game session management with MongoDB integration.
- Real-time data exchange between frontend and backend for smooth gameplay.
- AI-based summarization of gameplay to generate personalized endings.
- React.js for component-based UI
- Tailwind CSS for modern styling
- Framer Motion for animations and transitions
- Axios for API communication
- Node.js and Express.js for server and API management
- MongoDB with Mongoose for database operations
- Google Gemini API for AI-driven content generation
- JWT for secure user session handling
- Navigate to the backend folder:
cd backend - Install dependencies:
npm install
- Create a
.envfile and add the following configuration:PORT=5000 MONGO_URI=your_mongodb_connection_string GEMINI_API_KEY=your_google_genai_api_key JWT_SECRET=your_jwt_secret CLIENT_URL=http://localhost:5173
- Start the backend server:
npm run dev
- Navigate to the frontend folder:
cd frontend - Install dependencies:
npm install
- Add a
.envfile with the backend URL (optional):VITE_GOOGLE_CLIENT_ID = "YOUR_GOOGLE_CLIENT_ID" VITE_API_URL = "http://localhost:8080"
- Run the frontend application:
npm run dev
The backend integrates Google’s Gemini API for the following functions:
| AI Service | Description |
|---|---|
| Story Plan | Generates the entire narrative outline |
| Initial Room | Builds the first scene and challenges |
| Next Room | Produces the next scene based on player’s choice |
| Summary | Creates a conclusion and performance summary |
All AI responses are JSON-validated before being stored in MongoDB.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
Login using Google |
| POST | /api/auth/refresh |
Refresh JWT token |
| GET | /api/auth/me |
Fetch logged-in user profile |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/game/start |
Start a new AI escape session |
| POST | /api/game/choose |
Submit user choice and get next room |
| POST | /api/game/summary/:sessionId |
Get AI summary for a session |
| GET | /api/game/current |
Get current session data |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/session/history/all |
Fetch all previous sessions |
| GET | /api/session/:id |
Fetch a specific session |
- Start the Game: When a player begins, the backend requests the Gemini API to generate a story plan and the first room.
- Player Choices: Each choice is sent to the backend, which triggers the AI to produce the next room based on context and decisions.
- Session Management: The player’s progress is stored in MongoDB, ensuring continuity and history tracking.
- Game Summary: Once the player reaches the end, the AI generates a complete story summary with insights into the path taken.
- Multiplayer cooperative escape experiences.
- Visual and sound integration for immersive storytelling.
- Leaderboards and performance-based achievements.
- Advanced memory-based AI story continuity across sessions.
- Nidhish Agarwal
- Yash Kanwar
- Varsha Vijayashwini Panda





