Skip to main content
Better Skills is built with modern, type-safe technologies optimized for developer experience and performance.

Core technologies

Bun

Fast all-in-one JavaScript runtime and toolkit

TypeScript

Type-safe JavaScript for the entire stack

Turborepo

High-performance monorepo build system

PostgreSQL

Powerful open-source relational database

Runtime

Bun

Version: 1.3.5
Bun is a fast all-in-one JavaScript runtime and toolkit.
Why Bun?
  • Fast: 3-4x faster than Node.js for common operations
  • Native TypeScript: Run .ts files directly without transpilation
  • Built-in tools: Package manager, bundler, test runner all included
  • Web-standard APIs: Uses fetch, WebSocket, and other modern APIs
  • Drop-in Node.js replacement: Runs existing Node.js code
What we use:
  • Runtime for all applications
  • Package manager (bun install)
  • Bundler for production builds
  • Task runner for development
bun install
Better Skills requires Bun 1.3.5+. Do not use npm, pnpm, or yarn.

Frontend

Next.js

Version: 16.1.1
Website: nextjs.org
Next.js powers the web application at apps/web. Features used:
  • App Router: File-system based routing with layouts
  • React Server Components: Server-side rendering by default
  • Server Actions: Type-safe mutations without API routes
  • Streaming: Progressive rendering for better UX
  • Image Optimization: Automatic image optimization and lazy loading
Configuration:
next.config.js
export default {
  reactCompiler: true, // React 19 optimizing compiler
};
Better Skills uses React 19 with the new React Compiler for automatic optimization.

React

Version: 19.2.3 React 19 introduces:
  • React Compiler (automatic memoization)
  • Improved Suspense
  • Server Components
  • Server Actions

UI libraries

LibraryPurpose
shadcn/uiReusable component library
Tailwind CSSUtility-first styling
@base-ui/reactUnstyled accessible components
D3.jsGraph visualization
Lucide ReactIcon library
next-themesDark mode support

Backend

Hono

Version: 4.8.2
Website: hono.dev
Hono is the lightweight web framework for apps/server. Why Hono?
  • Fast: One of the fastest Node.js frameworks
  • Lightweight: Minimal overhead
  • Edge-ready: Runs on Cloudflare Workers, Deno, Bun
  • Type-safe: Full TypeScript support
  • Middleware ecosystem: Rich plugin system
Usage:
apps/server/src/runtime.ts
import { Hono } from "hono";
import { cors } from "hono/cors";
import { trpcServer } from "@hono/trpc-server";

const app = new Hono();

app.use("/api/*", cors({ 
  origin: env.CORS_ORIGIN,
  credentials: true 
}));

app.use("/trpc/*", trpcServer({ router: appRouter }));

export default app;

tRPC

Version: 11.7.2
Website: trpc.io
tRPC provides end-to-end type-safe APIs. Why tRPC?
  • End-to-end type safety: Types flow from server to client
  • No codegen: Types derived directly from router
  • Simple: Just TypeScript functions
  • Framework agnostic: Works with Next.js, React, CLI
Router definition:
packages/api/src/index.ts
import { router, protectedProcedure } from "./trpc";
import { z } from "zod";

export const appRouter = router({
  skill: {
    list: protectedProcedure.query(({ ctx }) => {
      return ctx.db.query.skills.findMany();
    }),
    
    create: protectedProcedure
      .input(z.object({ title: z.string(), content: z.string() }))
      .mutation(({ ctx, input }) => {
        return ctx.db.insert(skills).values(input);
      }),
  },
});

export type AppRouter = typeof appRouter;
Client usage:
apps/web/lib/trpc.ts
import { createTRPCClient } from "@trpc/client";
import type { AppRouter } from "@better-skills/api";

const client = createTRPCClient<AppRouter>({
  url: "http://localhost:3000/trpc",
});

// Fully typed!
const skills = await client.skill.list.query();
The AppRouter type is shared across all apps, ensuring type safety from server to client.

Database

PostgreSQL

Version: 17 (local) or Neon (cloud)
Website: postgresql.org
PostgreSQL is the primary database. Why PostgreSQL?
  • Reliable: Battle-tested for decades
  • Feature-rich: JSON, full-text search, geospatial
  • ACID compliant: Strong consistency guarantees
  • Extensible: Rich ecosystem of extensions
Deployment options:
  • Development: Local PostgreSQL 17
  • Production: Neon (serverless PostgreSQL with connection pooling)

Drizzle ORM

Version: 0.45.1
Website: orm.drizzle.team
Drizzle is the TypeScript ORM for Better Skills. Why Drizzle?
  • TypeScript-first: Schema defined in TypeScript
  • Lightweight: Minimal runtime overhead
  • Type-safe queries: Full IntelliSense for queries
  • SQL-like: Query builder resembles SQL
  • Migrations: Built-in migration system
Schema definition:
packages/db/src/schema/skills.ts
import { pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";

export const skills = pgTable("skills", {
  id: uuid("id").primaryKey().defaultRandom(),
  userId: uuid("user_id").notNull(),
  title: text("title").notNull(),
  content: text("content").notNull(),
  createdAt: timestamp("created_at").defaultNow(),
});
Type-safe queries:
import { db } from "@better-skills/db";
import { skills } from "@better-skills/db/schema";
import { eq } from "drizzle-orm";

// Fully typed!
const userSkills = await db
  .select()
  .from(skills)
  .where(eq(skills.userId, userId));

Neon

Website: neon.tech Neon provides serverless PostgreSQL for production. Features:
  • Serverless: Scales to zero
  • Connection pooling: PgBouncer built-in
  • Branching: Database branches for development
  • Backups: Automated point-in-time recovery

Authentication

Better Auth

Version: 1.4.18
Website: better-auth.com
Better Auth handles authentication and user management. Why Better Auth?
  • Type-safe: Full TypeScript support
  • Flexible: Supports multiple providers
  • Database-agnostic: Works with any database via adapters
  • Secure: Built-in CSRF protection
Configuration:
packages/auth/src/index.ts
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";

export const auth = betterAuth({
  database: drizzleAdapter(db, { provider: "pg" }),
  socialProviders: {
    google: {
      clientId: env.GOOGLE_CLIENT_ID,
      clientSecret: env.GOOGLE_CLIENT_SECRET,
    },
    github: {
      clientId: env.GITHUB_CLIENT_ID,
      clientSecret: env.GITHUB_CLIENT_SECRET,
    },
  },
});
Supported providers:
  • Google OAuth
  • GitHub OAuth

CLI

@clack/prompts

Website: github.com/natemoo-re/clack Clack powers the interactive CLI in apps/cli. Features:
  • Beautiful, accessible prompts
  • Keyboard navigation
  • Multi-select, text input, confirm
  • Loading spinners
  • Color output
Usage:
apps/cli/src/index.ts
import * as p from "@clack/prompts";

p.intro("Better Skills CLI");

const skill = await p.text({
  message: "Skill name?",
  placeholder: "My skill",
});

const spinner = p.spinner();
spinner.start("Creating skill...");

await trpc.skill.create.mutate({ title: skill });

spinner.stop("Skill created!");
p.outro("Done!");

Build tools

Turborepo

Version: 2.6.3
Website: turbo.build
Turborepo orchestrates builds across the monorepo. Features:
  • Intelligent caching: Never rebuild unchanged packages
  • Parallel execution: Run tasks in parallel when possible
  • Dependency awareness: Respects package dependencies
  • Remote caching: Share cache across team (optional)
Benefits for Better Skills:
  • Instant rebuilds when nothing changed
  • Fast CI/CD pipelines
  • Consistent builds across environments

Oxlint & Oxfmt

Versions: oxlint 1.41.0, oxfmt 0.26.0
Website: oxc-project.github.io
Ox tools provide fast linting and formatting. Why Ox?
  • Fast: 50-100x faster than ESLint/Prettier
  • No config needed: Sensible defaults
  • Rust-powered: Built in Rust for performance
Usage:
bun run check  # Runs oxlint && oxfmt --write

tsdown

Website: github.com/antfu/tsdown tsdown bundles the server for production. Usage:
cd apps/server
bun run build  # Uses tsdown to create dist/index.mjs

Development tools

TypeScript

Version: 5.x
Website: typescriptlang.org
All code is written in TypeScript for type safety. Configuration:
packages/config/tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "module": "ESNext",
    "moduleResolution": "bundler",
    "jsx": "react-jsx"
  }
}
All packages extend this base config.

Husky

Version: 9.1.7
Website: typicode.github.io/husky
Husky runs Git hooks for code quality. Hooks:
  • pre-commit: Runs oxlint and oxfmt on staged files
Setup:
bun run prepare  # Initializes Husky

lint-staged

Version: 16.1.2 lint-staged runs linters on staged files only. Configuration:
package.json
{
  "lint-staged": {
    "*": "oxlint",
    "*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}": "oxfmt --write"
  }
}

Validation

Zod

Version: 4.1.13
Website: zod.dev
Zod validates data at runtime. Usage:
  • Environment variable validation
  • tRPC input validation
  • Form validation
  • API response validation
Example:
import { z } from "zod";

const skillSchema = z.object({
  title: z.string().min(1).max(100),
  content: z.string().min(10),
});

// Throws if invalid
const skill = skillSchema.parse(input);

Markdown processing

gray-matter

Version: 4.0.3 Parses YAML frontmatter from markdown files. Usage:
import matter from "gray-matter";

const { data, content } = matter(markdownString);
// data = { title: "...", description: "..." }
// content = "# Heading\n\nContent..."

Version management

Dependency versions are managed through:
  1. Catalog (root package.json) - Shared versions
  2. Package-specific - Unique dependencies
Update all dependencies:
bun update

Tech stack summary

LayerTechnologyPurpose
RuntimeBun 1.3.5JavaScript runtime
LanguageTypeScript 5Type safety
WebNext.js 16Frontend framework
UIReact 19UI library
APIHono 4.8Web framework
RPCtRPC 11.7Type-safe API
DatabasePostgreSQL 17Data storage
ORMDrizzle 0.45Database queries
AuthBetter Auth 1.4Authentication
BuildTurborepo 2.6Monorepo builds
LintOxlint 1.41Code linting
FormatOxfmt 0.26Code formatting
CLI@clack/promptsInteractive CLI
ValidationZod 4.1Runtime validation

Philosophy

Better Skills technology choices follow these principles:
From database schema to UI components, types flow through the entire stack.
Fast tools, great error messages, minimal configuration.
Choose fast tools: Bun, Hono, Drizzle, Ox, Turborepo.
Use Web APIs, ESM, async/await, and latest language features.
Only add dependencies that provide significant value.

Next steps

Development Setup

Get started with development

Architecture

Understand system architecture

Monorepo Structure

Learn about workspace organization

Database Setup

Configure your database

Build docs developers (and LLMs) love