I can't stop doomscrolling Google Maps so I built AI that researches anywhere on Earth
An interactive 3D globe that lets you explore the fascinating history of any location on the planet. Born from opening Google Maps in satellite view at 2am and clicking on random shit - obscure atolls in the Pacific that look like someone dropped a pixel, unnamed mountains in Kyrgyzstan, Arctic settlements with 9 people. Places so remote they don't have Wikipedia pages.
I have a problem. I'll lose 6 hours to doomscrolling Google Maps. Just clicking. Finding volcanic islands that look photoshopped. Fjords that defy physics. Tiny dots of land in the middle of nowhere. And every single time I think: what IS this place? Who found it? Why does it exist? What happened here?
Then you try to research it and it's hell. 47 Wikipedia tabs. A poorly-translated Kazakh government PDF from 2003. A travel blog from 1987. A single Reddit comment from 2014 that says "I think my uncle went there once." You piece it together like a conspiracy theorist and still don't get the full story.
The information exists somewhere. Historical databases. Academic archives. Colonial records. Exploration logs from the 1800s. But it's scattered everywhere and takes forever to find.
Click anywhere on a globe. Get actual research. It searches hundreds of sources for up to 10 minutes and gives you the full story. With citations so you know it's not making shit up.
Not ChatGPT summarizing from training data. Actual research. It searches:
- Historical databases and archives
- Academic papers and journals
- Colonial records and exploration logs
- Archaeological surveys
- Wikipedia and structured knowledge bases
- Real-time web sources
Example: Tristan da Cunha (most remote inhabited island on Earth, population 245)
Click on it and you get:
- Discovery by Portuguese explorers in 1506
- British annexation in 1816 (strategic location during Napoleonic Wars)
- Volcanic eruption in 1961 that evacuated the entire population
- Current economy (crayfish export, philately)
- Cultural evolution of the tiny community
- Full timeline with sources
What would take hours of manual research happens automatically. And you can verify everything.
Because I've spent literal months of my life doomscrolling Google Maps clicking on random islands at 3am and I want to actually understand them. Not skim a 4-paragraph Wikipedia stub. Not guess based on the name. Proper historical research. Fast.
The databases exist. The archives are digitized. The APIs are built. Someone just needed to connect them to a globe and make it accessible.
This is what AI should be doing. Not writing emails. Augmenting genuine human curiosity about the world.
- Valyu DeepResearch API - Access to academic databases, archives, historical records
- Runs for up to 10 minutes - Searches hundreds of sources
- Full citations - Every claim linked to verifiable sources
- Live progress tracking - Watch the research unfold in real-time, see every source it queries
- 3D Satellite Visualization - Stunning Mapbox satellite imagery with globe projection
- Click literally anywhere - Any country, island, mountain, or geographical feature
- Random Discovery - "I'm Feeling Lucky" button for random location exploration
- Multiple Map Styles - Satellite, streets, outdoors, and more
- Research History - Save and revisit your discoveries (signed-in users)
- Shareable Links - Generate public links to research
- Mobile responsive - Works on phone/tablet/desktop
- 1 free query - No signup required to try it
- Sign up for more - 3 free queries per day, or upgrade for unlimited
- Valyu DeepResearch API - Comprehensive search across databases, archives, academic sources
- Next.js 15 + React 19 - Modern web framework
- Mapbox GL JS - Interactive 3D globe visualization
- Tailwind CSS + Framer Motion - Beautiful UI with smooth animations
- React Markdown - Rendering research reports
- Supabase - Authentication and database (production mode)
- SQLite - Local database (development mode)
- Polar - Subscription billing
- Drizzle ORM - Type-safe database queries
- Vercel - Deployment and hosting
- TypeScript - Type safety throughout
Fully open-source. Self-hostable. Model-agnostic.
For Development Mode (Easiest - No Auth Required):
- Node.js 18+
- pnpm, npm, or yarn
- Valyu DeepResearch API key (get one free at platform.valyu.ai)
- Mapbox access token (get one free at mapbox.com)
For Production Mode:
- All of the above, plus:
- Supabase account and project
- Polar account for billing (optional)
-
Clone the repository
git clone https://github.com/yorkeccak/history.git cd history
-
Install dependencies
pnpm install # or npm install # or yarn install
-
Set up environment variables
Create a
.env.localfile in the root directory:For Development Mode (Recommended for getting started):
# Development Mode - No Auth, No Billing, No Database Setup Required NEXT_PUBLIC_APP_MODE=development # Valyu API (Required) VALYU_API_KEY=valyu_your_api_key_here # Mapbox Configuration (Required) NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=pk.your_mapbox_access_token_here # App URL NEXT_PUBLIC_APP_URL=http://localhost:3000
For Production Mode:
# Production Mode NEXT_PUBLIC_APP_MODE=production NEXT_PUBLIC_APP_URL=https://yourdomain.com # Valyu API VALYU_API_KEY=valyu_your_api_key_here # Mapbox NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=pk.your_mapbox_access_token_here # Supabase NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here # Polar Billing (Optional) POLAR_ACCESS_TOKEN=polar_your_access_token_here POLAR_WEBHOOK_SECRET=whsec_your_webhook_secret_here POLAR_SUBSCRIPTION_PRODUCT_ID=prod_your_subscription_product_id_here POLAR_PAY_PER_USE_PRODUCT_ID=prod_your_pay_per_use_product_id_here
-
Run the development server
pnpm dev # or npm run dev # or yarn dev
-
Open your browser
Navigate to http://localhost:3000
-
Start exploring
- Click anywhere on the globe to research that location
- Use the "Random Location" button to discover somewhere new
- Watch the AI research unfold in real-time
-
Navigate the Globe
- Drag to rotate
- Scroll to zoom in/out
- The globe auto-rotates when idle
-
Research a Location
- Click on any country, city, island, or geographical feature
- A popup will show the location name
- The research interface opens automatically
-
Watch the Research
- See the AI's reasoning process
- View tool calls (web searches, database queries)
- See sources being discovered in real-time
-
Review Results
- Read the comprehensive historical analysis
- Click on source citations to verify information
- View images and visual aids (if available)
-
Save for Later (signed-in users)
- Your research is automatically saved
- Access past research from the sidebar
- Share research via shareable URLs
- Random Discovery: Click "Random Location" to explore a random place on Earth
- Map Styles: Switch between satellite, streets, and other map styles (signed-in users)
- Reasoning View: Click to see the detailed reasoning trace of the AI
- Dark Mode: Automatically matches your system preferences
History has two operating modes to make development easy:
NEXT_PUBLIC_APP_MODE=developmentFeatures:
- No Supabase required - uses local SQLite
- No authentication needed - auto-login as dev user
- Unlimited queries - no rate limits
- No billing integration
- Works completely offline (except API calls)
- Perfect for contributing and testing
NEXT_PUBLIC_APP_MODE=productionFeatures:
- Full authentication with Supabase
- Billing integration with Polar
- Rate limiting based on user tiers
- Cloud database storage
- Analytics and tracking
- 1 query (lifetime) - No account required
- After first query, prompted to sign up
- 3 queries per day - Resets at midnight
- Full access to research history
- Save and share research
- Monthly recurring with queries included
- Free trial period
- Priority support
- Resets on the 1st of each month
- Unlimited usage
- No monthly commitment
- Only pay for what you use
- Billed via Polar usage metering
- Go to platform.valyu.ai
- Sign up for a free account
- Navigate to API Keys
- Create a new API key
- Add it to
.env.localasVALYU_API_KEY
Pricing:
- Free tier available for testing
- Pay-as-you-go pricing for production
- Lite model: approximately $0.10 per research
- Heavy model: approximately $0.50 per research
- Go to mapbox.com
- Sign up for a free account
- Create a new access token
- Add it to
.env.localasNEXT_PUBLIC_MAPBOX_ACCESS_TOKEN
Pricing:
- 50,000 free map loads per month
- Additional usage billed per load (very affordable)
- Go to polar.sh
- Create an account
- Set up two products:
- Subscription Product: Monthly recurring with free trial
- Pay-Per-Use Product: Usage-based billing
- Create a meter for pay-per-use:
- Event name:
deep_research - Aggregation:
count - Set your desired pricing per unit
- Event name:
- Add product IDs and webhook secret to
.env.local
History uses a minimal database schema optimized for the DeepResearch API:
- id: UUID (primary key)
- email: text
- avatar_url: text
- subscription_tier: enum (free, pay_per_use, subscription)
- subscription_status: enum (active, inactive)
- polar_customer_id: text
- subscription_id: text
- created_at: timestamp
- updated_at: timestamp- id: UUID (primary key)
- user_id: UUID (foreign key to users)
- deepresearch_id: text (Valyu API task ID)
- location_name: text
- location_lat: float
- location_lng: float
- location_images: jsonb
- status: enum (queued, running, completed, failed)
- anonymous_id: text
- is_public: boolean
- share_token: text
- shared_at: timestamp
- created_at: timestamp
- updated_at: timestamp
- completed_at: timestamp- id: UUID (primary key)
- user_id: UUID (foreign key to users)
- usage_count: integer
- reset_date: text
- monthly_usage_count: integer
- monthly_reset_date: text
- last_request_at: timestamp
- created_at: timestamp
- updated_at: timestampNote: Full research content is stored in Valyu's DeepResearch API. We only store metadata and task IDs, keeping the database lean and avoiding duplication.
History is fully open-source. Contributions are welcome and appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test in development mode (
NEXT_PUBLIC_APP_MODE=development) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Additional map styles and visualizations
- Location bookmarking and collections
- Image galleries for historical locations
- Mobile app optimizations
- Multi-language support
- Data visualizations (timelines, charts)
- Advanced search and filtering
- Accessibility improvements
If you also spend hours clicking random islands on Google Maps, you'll understand why this needed to exist.
Perfect for:
- People who doomscroll maps like me
- History researchers who need quick location context
- Travel planners researching destinations
- Students learning world geography
- Anyone curious about literally any place on Earth
- Mapbox free tier limited to 50k loads/month
- DeepResearch API calls cost money (though very reasonable)
- Globe performance may be slower on older devices
- Some remote locations may have limited historical data
This project is open-source and available under the MIT License.
- Issues: Open an issue on GitHub
- Discussions: Join the discussion
- Hosted Version: Try it at history.valyu.ai
Future features under consideration:
- Timeline visualization with historical events
- Multiple locations comparison
- Historical image galleries from archives
- PDF export of research reports
- Collaborative research sharing
- Location bookmarks and collections
- Advanced filters (time periods, topics, event types)
- Mobile app versions (iOS, Android)
- Offline mode with cached research
- 3D historical recreations
- AR view for mobile devices
This project was born from countless hours spent exploring Google Maps, clicking on random islands, mountains, and remote places at 2am, and wanting to know their stories. Special thanks to:
- Valyu - For building an incredible DeepResearch API that makes this possible
- Mapbox - For beautiful, performant globe visualization
- Supabase - For making authentication and databases simple
- Polar - For developer-friendly billing
- The Geography Community - For inspiring curiosity about our planet
Built for geography enthusiasts, history buffs, map doomscrollers, and curious minds everywhere.
Explore. Discover. Learn.
