Trip Spin - Devvit Three.js Travel Roulette Inspiration Trip Spin was born from the frustration of endless scrolling through travel websites and decision paralysis when choosing a destination. We've all been there - staring at a world map, overwhelmed by possibilities, asking "Where should I go next?"
The inspiration came from combining the excitement of spinning a roulette wheel with the authentic travel wisdom found in Reddit communities. Instead of generic travel guides, we wanted to harness the real experiences and recommendations that Redditors share daily across travel subreddits. The idea was simple: let chance decide your destination, then let the community guide your adventure.
What it does Trip Spin is an interactive Reddit Devvit application that transforms travel planning into an engaging game:
π Interactive Globe Spinning: Users spin a beautifully rendered Three.js globe to randomly select their next travel destination
π― AI-Powered Itineraries: Once a country is selected, the app searches Reddit for authentic travel posts and comments about that destination, then uses OpenAI to generate a personalized 3-day itinerary based on real community recommendations
π± Seamless Reddit Integration: Built as a native Reddit app using Devvit, allowing users to discover destinations directly within their favorite travel communities
π Social Sharing: Users can share their generated itineraries back to the subreddit, creating a viral loop where trip plans inspire others to join or plan their own adventures
β¨ Community-Driven: Every itinerary is powered by real Reddit posts and comments, ensuring authentic, tested travel advice from fellow travelers
How we built it Trip Spin leverages a modern, full-stack architecture designed for the Reddit Devvit platform:
Frontend (Three.js + TypeScript):
Built an immersive 3D globe using Three.js with realistic Earth textures and lighting Implemented smooth spinning animations and interactive controls Used Zustand for clean state management between game phases Created a responsive UI that works seamlessly within Reddit's embedded environment Backend (Express.js + Reddit API):
Developed Express.js server with TypeScript for type-safe API endpoints Integrated Reddit API to search and fetch authentic travel content from multiple subreddits Implemented intelligent content filtering to find the most relevant travel advice Built secure API endpoints for country selection, itinerary generation, and trip sharing AI Integration (OpenAI GPT-3.5):
Designed sophisticated prompts to transform raw Reddit content into structured itineraries Implemented robust JSON parsing with fallback handling for AI responses Created intelligent content extraction from Reddit posts and comments Built failsafe mechanisms with fallback itineraries when API limits are reached Reddit Platform Integration:
Configured Devvit for seamless Reddit ecosystem integration Implemented Reddit OAuth for user authentication Built automated post creation for shared trip itineraries Designed viral sharing mechanics that drive community engagement Build System & Development:
Dual Vite configuration for client and server builds TypeScript project references for shared type safety Comprehensive linting and formatting with ESLint and Prettier Hot reloading development environment with concurrent build processes Challenges we ran into Three.js Integration Complexity: Creating a smooth, interactive 3D globe within Reddit's embedded environment required careful performance optimization and responsive design considerations.
Reddit API Content Discovery: Developing algorithms to effectively search across multiple travel subreddits and extract meaningful travel advice from diverse post formats and comment structures.
AI Response Reliability: OpenAI sometimes returned responses wrapped in markdown code blocks instead of pure JSON, requiring robust parsing logic to handle various response formats consistently.
Devvit Platform Learning Curve: As a relatively new platform, Devvit required extensive experimentation to understand authentication flows, build processes, and deployment patterns.
Real-time State Management: Coordinating complex state transitions between globe spinning, content fetching, AI processing, and result display while maintaining smooth user experience.
Cross-Platform Compatibility: Ensuring the Three.js globe renders correctly across different devices and browsers within Reddit's iframe constraints.
Accomplishments that we're proud of π¨ Stunning Visual Experience: Created a beautiful, interactive 3D globe that feels native to Reddit while providing an engaging, game-like experience that makes travel planning fun.
π€ Intelligent AI Integration: Successfully transformed raw Reddit community content into structured, actionable travel itineraries that feel authentic and personalized.
π Seamless Reddit Integration: Built a true native Reddit experience that feels like a natural extension of the platform, not a separate application.
π Viral Social Mechanics: Designed sharing features that create a positive feedback loop - shared trips inspire others to spin the globe and plan their own adventures.
β‘ Performance Optimization: Achieved smooth 3D rendering and fast API responses despite the complexity of real-time Reddit content analysis and AI processing.
π§ Robust Architecture: Built a maintainable, type-safe codebase with comprehensive error handling and fallback mechanisms for reliable user experience.
What we learned Reddit Community Power: The depth and authenticity of travel advice available in Reddit communities far exceeds traditional travel resources - real experiences and honest recommendations create invaluable travel insights.
AI as Content Transformer: Large language models excel not just at generating content, but at intelligently restructuring and synthesizing existing community knowledge into actionable formats.
User Experience Design: Gamification elements like the spinning globe transform mundane decision-making into engaging experiences, making travel planning feel like discovery rather than work.
Platform-Native Development: Building applications that feel native to their platform (Reddit) creates significantly better user adoption and engagement than external integrations.
Community-Driven Growth: Features that encourage users to share back to the community create organic growth loops that benefit both individual users and the broader community.
TypeScript at Scale: Comprehensive type safety across client, server, and shared code dramatically improves development velocity and reduces runtime errors in complex applications.
What's next for Trip Spin π Enhanced Personalization:
User profile integration to remember preferences and past trips Machine learning recommendations based on user's Reddit activity and interests Customizable trip duration (weekend getaways to month-long adventures) πΊοΈ Expanded Geographic Features:
City-level destination selection for more specific planning Regional trip planning (multi-country European tours, Southeast Asia backpacking routes) Integration with real-time flight prices and travel deals π₯ Social Features:
Travel buddy matching - connect with other users planning similar trips Collaborative itinerary planning where multiple users can contribute Trip progress tracking and photo sharing integration
Built With
- es5
- javascript
- node.js
- openai
- three.js
- typescript
Log in or sign up for Devpost to join the conversation.