Somnio lets people log their dreams and then discover who else, anywhere, has dreamt something similar — surfaced not as a search box but as a living 3D network of glowing, connected orbs.
The matching problem
Real semantic similarity between two dream descriptions is an NLP-embeddings problem, and that gets expensive fast at any real scale. Instead, the matching engine weighs three cheaper, tag-driven signals: tag overlap (50%), extracted-keyword overlap (35%), and emotional-state similarity (15%). Two dreams connect once they cross a 20% similarity score, with anything past 70% flagged as a strong match.
Why a graph database
Dream connections are inherently graph-shaped — a dream can relate to dozens of others, each relationship carrying its own similarity weight. Modeling that in a relational schema means either a sprawling join table or giving up on querying it efficiently. Neo4j makes "find everything connected to this dream, ranked by strength" a native, fast query instead of a workaround.
Rendering the network
The frontend renders each dream as a glowing orb in 3D space via Three.js and React Three Fiber, with connecting lines drawn between related dreams. Lucid and recurring dreams get their own visual markers — sparkles and rings — so patterns are visible before you read a single word. Users can rotate and zoom through their own personal dream network, or the public one.
Privacy by default
Every dream is private unless the author opts it into the public network, and JWT-backed auth keeps that boundary enforced end to end — private dreams never enter the similarity index other users can query against.