DEV Community

Aniket Singanjude
Aniket Singanjude

Posted on

Midnight Oracle: An Open-Weight AI Fortune Teller Beyond the Veil

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Midnight Oracle is an AI-powered digital fortune teller that brings a mysterious supernatural experience to the web.

Inspired by Halloween, tarot symbolism, and the idea of mysterious entities communicating from beyond the veil, I wanted to build something more immersive than a conventional AI chatbot.

Users enter a mystical chamber, interact with an animated 3D crystal ball, select a tarot-inspired reading category, and ask questions about:

  • Love & Relationships – Explore fictional readings about relationships and emotional connections.
  • Career & Destiny – Discover imaginative perspectives about career paths and opportunities.
  • Luck & Fortune – Receive mysterious readings filled with symbolic signs.
  • General Mysteries – Ask the Oracle anything and uncover an unexpected fictional prophecy.

The Oracle responds with a personalized fortune, symbolic signs, a reflective message, and mystical elements such as a lucky colour, number, and object.

The experience features an original gothic-inspired interface with a 3D crystal ball, floating tarot cards, an animated ghost entity, atmospheric particles, and subtle lighting effects.

Midnight Oracle is designed purely for entertainment. Its fortunes are fictional interpretations, not actual supernatural predictions.

Demo

Live Demo: [Insert deployed application URL]

Video Demonstration: [Insert video link]

Code

GitHub Repository: https://github.com/aniket937/Midnight-Oracle

Explore the complete project, including its frontend, backend, AI integration, 3D components, and setup instructions.

How I Built It

I built Midnight Oracle using a modern full-stack architecture combining web technologies, 3D rendering, and open-weight AI.

Frontend:

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • Three.js
  • React Three Fiber
  • Drei

Backend:

  • Python 3.13
  • FastAPI
  • Pydantic
  • HTTPX

AI Integration:

  • OpenRouter API
  • Open-weight Gemma / Qwen model: [Insert exact model ID]
  • Ollama for local inference (if implemented)

How the AI Works

Users submit a question along with a selected fortune category.

The FastAPI backend processes the request and sends it to the configured open-weight language model using a carefully designed system prompt that defines the Midnight Oracle's personality.

The model generates a structured response containing:

  • Fortune title
  • Mystical introduction
  • Main fortune interpretation
  • Three symbolic signs
  • Reflective message
  • Lucky colour, number, and object

Pydantic validates the response before it is displayed on the frontend as an animated prophecy card.

The frontend handles the 3D environment, tarot interactions, crystal ball animations, fortune generation experience, and reading history.

Why Does Open Innovation Matter?

The most important decision in this project was making an open-weight AI model central to the experience rather than relying entirely on a proprietary AI API.

Using open-weight models gives Midnight Oracle flexibility and independence.

1. Model Freedom

The application can be configured to use different compatible open-weight models instead of being permanently tied to one model provider.

2. Local AI Possibility

With a local Ollama setup, the Oracle can generate fortunes without sending prompts to an external inference service. Once the model is downloaded, local inference can work without an internet connection.

3. Greater Control

The system prompt and model configuration can be modified to change the Oracle's personality, response style, and behaviour.

4. Reduced Provider Dependency

The application architecture separates AI inference from the frontend. This makes it easier to replace or change the inference provider without rebuilding the entire experience.

Open innovation makes the project more adaptable and gives users more control over how their AI experience operates.

The Spirit of It

There is something fascinating about asking a question in an empty, dark chamber and receiving a mysterious response from an entity that doesn't really exist.

That was the inspiration behind Midnight Oracle.

I wanted to combine the atmosphere of Halloween, the symbolism of tarot cards, and the possibilities of open-weight AI into one interactive experience.

The crystal ball represents the unknown, the ghost represents the mystery, and the AI represents the intelligence hidden inside the machine.

Not every mystery needs an answer. Some just need an Oracle.

Top comments (0)