TypeGraph
Type-safe graphs on Postgres/SQLite (no graph DB required)
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
Hi HN, I built TypeGraph, a type-safe knowledge graph library that runs on your existing Postgres or SQLite.After years of building knowledge graphs and other graphy things, I had the same issues whenever an application’s relationship modeling (permissions, RAG context, recommendations) outgrew standard ORMs: deploy a dedicated graph database (heavy ops, separate infra, data syncing headaches), or roll a graph-in-SQL implementation by hand.I've hand-rolled enough of these to know the drill: same table structures, same traversal boilerplate, same performance surprises. I wanted graph semantics without graph infrastructure so I built TypeGraph as that pattern packaged as a library. It runs on anything from in-memory SQLite to a full Postgres cluster, using Zod for a single source of truth (driving your DB schema, API validation, and TS types).You query it with a fluent builder that's fully typed through traversals: const results = await store .query() .from("Person", "p") .traverse("worksAt", "e") .to("Company", "c") .whereNode("c", (c) => c.industry.eq("Tech")) .select((ctx) => ({ person: ctx.p.name, company: ctx.c.name, role: ctx.e.role, })) .execute(); Eject at any time and you're left with clean, well-structured SQL tables and nothing proprietary to untangle.A few things that set it apart from rolling your own:* Ontology reasoning: subClassOf, implies, inverseOf — query for "Media" and automatically get Podcasts and Articles. Define "Admin implies Editor" and permission checks expand automatically.* Vector + graph queries: combine embedding similarity search with graph traversal in one query. Uses pgvector on Postgres, sqlite-vec on SQLite.* Incremental adoption: builds on Drizzle. Add graph capabilities to an existing project without replacing your ORM or migrating your database.Where it works well: knowledge graphs for RAG (vector similarity + graph context), relationship-based access control, recommendations, social features, any domain where multi-hop relationships are core.Where it doesn't: billions of edges (use a graph database), heavy graph algorithms like PageRank (use specialized tools), distributed graph processing.Docs: https://typegraph.devGitHub: https://github.com/nicia-ai/typegraph/Happy to answer questions about the design, implementation, or tradeoffs.
HN · launched Feb 24, 2026 · 5 upvotes (top 89%) · 0 views
Niche: knowledge base and graph software · 107 launches, 1 in the last 7 days · Explore this niche →
Category and tags
- Horizontal
- Data infrastructure
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 107 launches in knowledge base and graph software →
Could you build this?
Partial Building basic CRUD helpers on Postgres or SQLite is straightforward, but implementing a robust bitemporal graph engine with recursive CTE traversals and type inference is mathematically complex.
What it would actually take: A production version requires an ontology engine using Zod mapped dynamically to optimized relational schemas, compiling high-level graph traversals into performant recursive SQL CTEs. It must handle bitemporal state tracking (valid time vs. transaction time), index tuning across graph edges, and complex compile-time TypeScript type acrobatics.
Discussion
No comments on this launch.
Competitors
Other products that read as similar to this one : 307 launches clear the similarity bar, closest 8 shown.
Attention rank: #281 of 308 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 118 days after the earliest competitor.
- BlitzGraph · hn · 2026-06-16 · 15 upvotes · similarity 0.61
- SQLite Graph Ext · hn · 2025-10-29 · 35 upvotes · similarity 0.56
- Ontology-driven knowledge graph extraction from text · hn · 2025-11-24 · 13 upvotes · similarity 0.55
- LatticeDB · hn · 2026-08-25 · 190 upvotes · similarity 0.54
- Typol · hn · 2026-06-07 · 5 upvotes · similarity 0.51
- TuringDB · hn · 2026-01-28 · 7 upvotes · similarity 0.50
- jevgraph · github · 2026-09-20 · 19 upvotes · similarity 0.49
- Pg-typesafe · hn · 2026-02-17 · 69 upvotes · similarity 0.49
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.