📖 Project article — the how and why behind GalaxyBrain
🎥 Install VideoHow to make your own
A **starter template** for publishing your Obsidian vault as an interactive 3D knowledge graph website.Edit notes in Obsidian → push to GitHub → site rebuilds on Netlify or GitHub Pages automatically.
I'm releasing this for free because fun side projects are better when they aren't hidden behind a paywall — not everything needs to feed the soul-crushing capitalism machine. That said, I still have to pay rent. If you've found this helpful or end up using it yourself, please consider supporting me on Patreon. ❤️
Galaxy Brain consists of 3 main components:
- This codebase which creates a 3D graph based on notes in a
/vaultfolder. - Obsidian, a closed source (but free to use) note keeping app which we will use as a GUI
- Netlify (Or Github Pages), this is the service that hosts this codebase (for free) making it accessible on the internet.
While the intent is to use Obsidian as the User Interface, it's also entirely possible to use any Markdown editor. Additionally, there are some steps that require a Github account to connect Obsidian to a git repository. It should be trivial to use a different hosting service if you so desire.
I've done my best to keep the whole thing as flexible as I can manage, while also making it beginner friendly!
- Click Use this template → Create a new repository on the GitHub page for this repo
- Name your repo, set visibility (public or private — both work with Netlify)
- Clone it locally:
If you're using the CLI
git clone https://github.com/your-username/your-repo.git cd your-repo
pnpm install- Open Obsidian
- Click Open folder as vault
- Select the
vault/subfolder inside your cloned repo (not the repo root)
Obsidian will create a .obsidian/ folder inside vault/ with your settings. This is normal and gitignored.
In Settings:
| Section | Setting | Value |
|---|---|---|
| Files & Links | Default location for new notes | vault |
| Files & Links | Default location for new attachments | vault/attachments |
| Files & Links | Use [[Wikilinks]] | ✅ On |
| Editor | Strict line breaks | Off |
| Templates | Template folder location | template folder |
| Hotkeys | Templates: Insert template | alt+t (or whatever you want) |
This plugin auto-commits and pushes your notes to GitHub so the site rebuilds without you opening a terminal.
- Settings → Community plugins → Browse
- Search Obsidian Git → Install → Enable
- In the plugin's settings:
- Auto commit interval:
5(minutes, or your preference) - Auto push after commit: ✅ On
- Commit message:
vault: auto-save {{date}}
- Auto commit interval:
Obsidian Git needs write access to your remote repo. The easiest way is a GitHub Personal Access Token (PAT):
Hosting on GitHub Pages does not remove this requirement. If Obsidian Git is pushing commits for you, it still needs GitHub auth (PAT or SSH key).
-
Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
-
Create a token with Contents: Read and Write on your repo
-
In your local repo, embed the token in the remote URL:
git remote set-url origin https://YOUR_PAT@github.com/your-username/your-repo.git
Obsidian Git will use this URL. You won't be prompted for credentials again.
Alternatively, use SSH keys — see GitHub's SSH docs.
pnpm devOpen http://localhost:4321. The template notes appear in the graph. Edit or create a note in Obsidian and save — the browser will hot-reload.
Create a file in vault/, for example vault/My First Note.md:
---
publish: true
title: "My First Note"
tags: [topic]
---
# My First Note
Hello, graph! This links to [[Another Note]] which doesn't exist yet — it'll appear as a ghost node.Save it. The dev server will reflect the change after a restart (or run pnpm build to see the full output).
The pro way to do this is to press ctrl + N + `
git add .
git commit -m "initial vault"
git pushOR Deploy from inside Obsidian!
-
Go to app.netlify.com → Add new site → Import an existing project
-
Choose Deploy with GitHub and authorize access
-
Select your repo
-
Review build settings —
netlify.tomlpre-configures everything:Setting Value Build command pnpm astro clean && node scripts/sync-titles.mjs && pnpm buildPublish directory dist -
Click Deploy site
The build takes 1–3 minutes. Look for:
[build] Complete!
Your site is live at random-name.netlify.app.
If you'de like to point your GalaxyBrain at a custom domain, follow Netlify's instructions/prompts, it's pretty straight forward.
This repo includes a ready-to-use workflow at .github/workflows/deploy-pages.yml.
Note
Netlify is the default deployment path. GitHub Pages deployment is opt-in and manual.
- Push your repo to GitHub
- Go to Settings → Pages
- Under Build and deployment, set Source = GitHub Actions
- Open Actions → Deploy to GitHub Pages → Run workflow
- Set
enablement:falseif Pages is already enabledtrueif you want the action to attempt enabling/configuring Pages
- Run the workflow
- If your repo is named
username.github.io, the site is hosted at the root. - Any other repo name is hosted at
/repo-name/.
GalaxyBrain auto-detects this at build time and adjusts links/assets automatically.
Once your site is live and you’ve written a few of your own notes, you’ll want to remove all the template content. Here’s exactly what to delete and change.
In Obsidian (or your file manager), delete every file listed in vault/ folder. Ideally you leave the attachments folder, and template folder, but everything else can go.
The CTA that appeared after you first clicked the hub is controlled by a single constant in the source code. Open src/components/FullGraph.tsx and find this line near the top:
const SHOW_BUILD_CTA = true;Change it to:
const SHOW_BUILD_CTA = false;Save the file. The prompt will never appear again.
Once you’ve deleted the template notes, updated Welcome.md, and flipped the flag:
Push these new changes via Obsidian Git
Netlify will pick up the push and rebuild. Your graph will show only your notes.
Edit src/styles/global.css. CSS custom properties at the top of the file control both dark and light themes.
Edit src/pages/index.astro.
Edit src/layouts/NoteLayout.astro.
ForceGraph3D props in src/components/FullGraph.tsx control link distance, charge, particle speed, etc.
| 🐛 Found a bug? | Open an issue |
| ✨ Have an idea? | Request a feature |
| 💬 Just want to chat? | Start a discussion |
| 🌟 Built something? | Show it off |
Contributions are welcome! Read CONTRIBUTING.md for guidelines.
