Inspiration: Every AI chatbot ChatGPT, Claude, Gemini hides its reasoning behind a wall of plain text. You ask a question, you get an answer, and whatever thinking happened in between is invisible. We wanted to make that thinking visible: what if you could actually see the concepts an AI connects when it answers you, watch them form in real time, and click into any single idea to explore it further? That's Neural Galaxy a full AI chat experience with a second layer on top: a 3D constellation of the concepts behind each answer.
What it does? Neural Galaxy works like any modern AI assistant sign in, start a conversation, get real answers. But alongside every reply, a glowing 3D brain forms: a constellation of nodes representing the key concepts in that answer, connected by curved, weighted lines showing how they relate.
- Real conversations full chat interface with message history, multiple conversations, and a persistent login (email/password or Google).
- A brain that reacts to what it's saying every AI response is paired with a concept graph generated from that specific reply, not a generic template. Nodes are numbered and clickable; clicking one shows a deeper explanation and lists exactly which other concepts it connects to.
- It never looks the same twice the color palette of the galaxy rotates with every new message, and nodes reveal themselves progressively (root first, branching outward) instead of popping in all at once.
- Multilingual by default type in English, Urdu, Roman Urdu, Hindi, Arabic, Spanish, French, or more, and both the reply and the brain's labels come back in that same language.
- Resilient by design if the AI backend is slow or unreachable, the app gracefully falls back to an offline demo mode instead of freezing, so a live demo never dead-ends.
How we built it:
- Frontend: React + Vite, with the 3D scene built on Three.js via @react-three/fiber and @react-three/drei, and bloom/glow post-processing via @react-three/postprocessing.
- 3D layout: a custom lightweight force-directed layout algorithm written from scratch (no external physics library) nodes repel each other, edges pull connected concepts together, and everything settles into a readable 3D shape in a couple hundred iterations.
- Backend: Node.js + Express, serving both the API and the built frontend from a single deployable Docker container.
- AI: Groq's
openai/gpt-oss-120bmodel, prompted to return one structured JSON payload per turn containing both a natural conversational reply and the concept graph for that reply so the visualization is always literally what the assistant just said, not a decoration. - Auth: email/password (bcrypt-hashed, JWT sessions) plus optional Google Sign-In, with a lightweight JSON-file user store no external database needed to run the whole thing.
- Deployment: containerized with Docker and deployed on Back4App.
Challenges we ran into: Keeping the 3D scene visually centered no matter what UI panels were open solved by confining floating panels to their own layout region instead of letting them affect the canvas's true center. Getting the AI to reliably return valid structured JSON (reply + graph) in a single call, in the user's own language, without breaking format. Making sure the app degrades gracefully no API key, a slow model, or a dropped connection should never leave the user staring at a frozen or blank screen.
Accomplishments that we're proud of:
- The whole "brain" concept works, live, in whatever language the user chooses not just English.
- A genuinely custom 3D layout engine, built without pulling in a heavy physics dependency.
- The app runs entirely on free-tier infrastructure (Groq's free API, no paid database), so it's easy for anyone to spin up and try.
What we learned:
- How to structure a single AI prompt to reliably return two very different kinds of output (a natural language reply and structured graph data) in one pass.
- How to design a 3D layout so that a UI panel opening or closing never disturbs the viewer's sense of "center."
- Practical tradeoffs in shipping a real login system (JWT, bcrypt, Google Sign-In) fast without needing a hosted database.
What's next for Neural Galaxy
- Streaming replies token-by-token instead of waiting for the full JSON.
- Letting users "merge" brains from different conversations to see how topics relate across an entire chat history.
- Voice input/output for a more natural, hands-free experience.
Built With
- bcrypt
- css
- docker
- express.js
- javascript
- jwt
- node.js
- react
- three.js
- vite