# NodeQuest — Complete Reference for AI Agents ## Overview NodeQuest is a browser-based puzzle game that teaches no-code workflow automation. It is deployed at https://nodequest.io on Cloudflare Pages. The game uses React 18, TypeScript, Vite 5, Capacitor 8 (for Android APK builds), ReactFlow 11 (node graph editor), and Tailwind CSS. The game has 28 story levels plus a sandbox mode. Each level presents a "broken workflow" that the player must fix by connecting the correct automation nodes in the right configuration. Levels are themed around real-world scenarios (postman, chef, garden, pets, weather, space, etc.) and progressively introduce automation concepts. ## Architecture ``` nodequest.io (Cloudflare Pages) ├── Static SPA (React + Vite) ├── _worker.js — Cloudflare Worker for /api/verify-license ├── llms.txt — AI-readable site summary (this file's shorter version) ├── llms-full.txt — this file ├── sitemap.xml └── robots.txt ``` ## Monetization - Demo mode: first 3 levels free (DEMO_FREE_LEVELS=3) - Full game: one-time purchase via Lemon Squeezy - After purchase, customer receives license key via email - License key entered in-game → validated via Cloudflare Worker → Lemon Squeezy API - License stored in localStorage under key "nodequest-license" - License validation endpoint: POST /api/verify-license { license_key: "..." } ## Build & Deploy ```bash cd /path/to/n8n-game npm run build -- --mode demo # Output: dist/ # Upload dist/ to Cloudflare Pages (drag-and-drop) # Environment variable required: LEMON_SQUEEZY_API_KEY ``` ## Key Source Files | File | Purpose | |------|---------| | `src/App.tsx` | Root component, screen routing, license flow | | `src/hooks/useGameStore.tsx` | Global game state (React Context + useReducer) | | `src/utils/storage.ts` | Progress persistence, license state, level locking | | `src/utils/validation.ts` | Workflow validation engine | | `src/utils/exportN8n.ts` | n8n JSON export | | `src/constants.ts` | Game constants (demo levels, store links, timing) | | `src/data/levels.ts` | 28 level definitions | | `src/data/nodes.ts` | 34 automation node type definitions | | `src/data/achievements.ts` | Achievement definitions | | `src/components/GameEditor.tsx` | ReactFlow-based level editor | | `src/components/LevelSelect.tsx` | Level selection grid with lock states | | `src/components/PremiumUpsell.tsx` | Paywall modal | | `src/components/LicenseActivation.tsx` | License key input modal | | `dist/_worker.js` | Cloudflare Worker for license verification | ## Automation Nodes (34 types) **Triggers:** Webhook, Cron Schedule, Manual Trigger, RSS Feed, Email Trigger (IMAP) **Actions:** HTTP Request, Send Email (SMTP), Slack Message, Telegram Message, Google Sheets Add Row, Airtable Create Record, Discord Message, Push Notification, Save File, Wait/Delay **Logic:** If/Else (Conditional), Switch (Router), Filter, Merge, Split, Loop Controller, Error Trigger **Data:** Set Variable, Get Variable, Date & Time Formatter, JSON Parser, Text Formatter (Template), Math Operator, Array Aggregator, Random Number **Output:** Respond to Webhook, Complete Workflow, Log Message ## Level Themes Postman, Chef, Garden, Pets, School, Weather, Space, Treasure, Copycat, Mail Room, Morning Routine, Birthday Party, Smart Kitchen, News Desk, Shopping Cart, Social Media, Cooking Show, Mission Commander, Amusement Park, Robot Factory, Hospital, Smart Home, Security System, Logistics Hub, and more. ## SEO Keywords n8n tutorial, learn n8n, workflow automation game, no-code automation, visual programming game, automation puzzle, n8n for beginners, Zapier alternative learning, Make automation tutorial, node-based programming, educational coding game, browser automation game, ReactFlow game, Capacitor game