Inspiration

The cosmos has always fascinated humanity - from ancient stargazers to modern astronomers, we've looked to the stars for meaning, guidance, and wonder. But what if we could turn that cosmic connection inward? What if our emotions could be visualized as the same beautiful nebulae that birth stars across the universe?

This question sparked Nebula Notes - a cosmic journaling app that transforms your innermost thoughts into stunning, real-time nebula visualizations. We wanted to create something that wasn't just another journaling app, but a bridge of your inner thoughts and the space, where your feelings become part of the cosmic dance.

What We Learned

Building Nebula Notes taught us the incredible power of Cloudflare Workers AI and how to leverage LLM API calls for creative applications. We learned to use Llama 3.1 8B Instruct to analyze journal text and extract nuanced, specific emotions that go far beyond simple sentiment detection. By crafting structured system prompts, we instructed the LLM to return emotions in JSON format with fields like sentiment, confidence, emotions[], and intensity.

The breakthrough was learning how to transform these LLM-analyzed emotions into visual animations. We built a pipeline: Journal Text → LLM Analysis → Emotion + Intensity → Color Palette → Nebula Animation. Each detected emotion maps to specific colors and intensity values that drive our WebGL particle system—joy creates bright blues and purples with high energy, while anxiety produces warm oranges with erratic movement. We also used the same LLM with different system prompts to create an AI assistant with distinct personalities for astronomy questions versus journal reflections. This project showed us that modern LLMs aren't just chatbots—they're powerful semantic engines that can transform unstructured text into structured, actionable data for creative applications like emotion-driven visualizations.

How We Built It

Nebula Notes is built on a modern, privacy-first architecture:

  • Frontend: Next.js 15 with React 19, TailwindCSS 4, and Framer Motion for smooth animations
  • AI Engine: Cloudflare Workers AI with Llama 3.1 8B Instruct for emotion analysis and chat
  • Visualization: Custom WebGL Canvas API implementation with realistic nebula physics
  • Deployment: Cloudflare Pages with OpenNext for seamless edge deployment

Challenges We Faced

Realistic Nebula Physics: Creating convincing nebula animations was surprisingly complex. We had to balance performance with visual fidelity, implementing multiple particle systems (cores, clouds, stars) that work together harmoniously.

AI Integration: Getting Cloudflare Workers AI to work seamlessly with our emotion analysis required careful prompt engineering and fallback systems. We wanted the AI to understand not just explicit emotions, but the subtle, implicit feelings in journal entries.

Responsive Design: Making the cosmic experience work across all devices while maintaining the immersive, space-like atmosphere required careful attention to responsive design and performance optimization.

The Result

Nebula Notes is more than just a journaling app - it's a cosmic companion that helps you explore your inner universe. Each emotion becomes a unique nebula, each thought a star in your personal galaxy. The AI-powered analysis provides gentle insights, while the stunning visualizations offer a new way to understand and process your feelings.

Share this project:

Updates