Inspiration

History is full of pivotal moments—small changes that could have reshaped the world. We wanted to build something that lets users explore those alternate realities in a fun, intelligent, and deeply imaginative way. “What Ifs” was born from our love of storytelling, curiosity, and the desire to blend AI with factual historical data to generate immersive, alternate timelines.

What it does

What Ifs is a web app that allows users to ask “what if” questions about history—like What if the moon landing failed? or What if the Cold War ended in the 1950s? The app uses Perplexity’s Sonar API to research real historical events and then crafts plausible alternate timelines grounded in fact but driven by creative, logical speculation. Each answer is shown as a scrollable, citation-backed timeline that feels like stepping into an alternate universe.

How we built it

We built the backend using Python and FastAPI, which handles user input and communicates with the Perplexity Sonar API. The API provides grounded responses, including citations, which we process and format into a timeline structure. On the frontend, we used React and Tailwind CSS to build a clean, interactive user interface where users can type questions and explore alternate timelines. Hosting was done via Vercel for quick deployment.

Challenges we ran into

One of the main challenges was designing prompts that would produce structured, creative, and citation-backed responses from the Sonar API. We also had to work around some rate limits and latency issues during testing. On the frontend, presenting the information in a fun yet informative way required several UI/UX iterations to keep the experience engaging but not overwhelming.

Accomplishments that we're proud of

We’re proud of turning an abstract idea into a fully functional, polished MVP within a short timeframe. “What Ifs” doesn’t just imagine alternate histories—it makes them feel real and learnable. The fact that we integrated AI, factual research, and creative storytelling into a cohesive product is something we’re genuinely excited about.

What we learned

We learned a lot about prompt engineering, particularly when using research-augmented APIs like Sonar. We also discovered how important UI design is when presenting complex information like alternate historical events. Most importantly, we realized that with the right tools and approach, it’s possible to combine creativity and credibility in a meaningful way.

What's next for What Ifs

Next, we plan to add features like voice narration, downloadable timelines, and a compare mode to show real vs. alternate history side-by-side. We’re also exploring educational use cases where students can use What Ifs as a learning tool to understand cause and effect in history. With more refinement, we believe this project could evolve into an AI-powered sandbox for historical imagination and education.

Built With

  • netlify
  • next.js
  • perplexity
  • tailwind
Share this project:

Updates