MCPcopy Index your code
hub / github.com/blockmatic/basilic

github.com/blockmatic/basilic @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,113 symbols 3,530 edges 566 files 25 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Basilic: API-First TypeScript FullStack Starter

Build production-ready APIs and apps with typed SDKs, out-of-the-box authentication, a portable architecture, AI tooling, and crypto integrations. Fastify • OpenAPI • Next.js • Expo — one stack, multiple platforms.

🚧 Active development — Explore, fork, and contribute. 🏗️

Features

  • 🤖 AI-first dev workflow — Agent rules, skills, MCP integrations, and automated CodeRabbit reviews
  • 🔌 REST API & JWT — OpenAPI spec, Swagger UI, JWT and API key auth for all clients
  • 📦 SDK generation — Type-safe clients from OpenAPI via HeyAPI
  • 🧩 Web3 & AI starters — Ready-to-use templates for Next.js, React, Expo, Fastify, and Ponder
  • 🔓 Zero vendor lock-in — Run on VPS, AWS, Vercel, or local
  • 🎨 Turbo monorepo + design system — ShadcnUI components with shared utilities
  • ⚙️ Preconfigured dev tools — Biome, Git workflows, hooks, and security checks
  • 🛡️ Security & quality — Automated checks in CI (e.g. Gitleaks, OSV)
  • ⛓️ Multichain — EVM, Solana; shared validation and chain-specific tooling
  • 📐 Conventions — Cursor rules per domain, @repo/error, Pino logging, shared TS and style
  • 🧑‍💻 TypeScript-first — End-to-end types from database to frontend

Technology stack

  • AI: AI SDK, OpenAI, Claude, Grok
  • Frontend: Next.js 16, React 19, Tailwind, ShadcnUI
  • Backend: Fastify, PostgreSQL, Supabase
  • Web3: Solidity, Viem, Wagmi, Ponder, Solana
  • DevOps: pnpm, TurboRepo, TypeScript, Biome, ESLint

Apps

  • API — Type-safe REST API built with Fastify & OpenAPI
  • Web App — Next.js app with monorepo integration
  • Mobile App — Expo app (Android, iOS, Web)
  • Documentation — Fumadocs-based docs site for architecture, ADRs, and development workflows

Packages

  • @repo/core — Runtime-agnostic API client and types generated from OpenAPI specs
  • @repo/cli — TypeScript CLI for API (API key auth; ideal for agentic integrations)
  • @repo/react — React Query hooks for @repo/core API functions
  • @repo/ui — Shared UI component library (Shadcn/ui, Tailwind)
  • @repo/utils — Shared utilities (async, data, debug, error, logger, web3)
  • @repo/error — Error reporting and utilities (captureError, getErrorMessage)
  • @repo/email — Email template library built with React Email
  • @repo/notif — Notification service (email, activity) with type-safe schemas

Scripts

Run with pnpm <script>.

Setup - setup — Full setup (install, hooks, gitleaks, osv, database) - setup:gitleaks, setup:osv — Install Gitleaks, OSV scanner - setup:database — Database tools (Docker, Supabase CLI) - reset — Local API database: Supabase reset + Drizzle migrations + seed (pnpm --filter @repo/api reset). See apps/api/README.md

Primary - build — Build packages and apps - dev — Start dev (core, react, error, utils, api, web) - qa — Full check: install → checktypes → lint → build → test (unit) → test:e2e (Fastify + Next, local spawn) Format / Lint - checktypes — Type-check all packages - format — Format code (Biome) - lint — Lint with Biome + ESLint - lint:biome, lint:biome:fix — Biome check, fix - lint:eslint, lint:eslint:fix — ESLint check, fix - lint:fix — Fix both linters Test - test — Run unit tests (packages + apps) - test:e2e — E2E (Fastify + Next) CI - Lint and security run on every PR. App E2E (web-e2e, api-e2e) and package tests (packages-test) run only when relevant code changes. Mobile: EAS build, preview on main, PR OTA—see GitHub Actions and Mobile CI/CD. Security - security:block-files — Block sensitive file patterns - security:secrets — Scan staged files for secrets - security:secrets:full — Full Gitleaks scan - security:osv — OSV vulnerability scan - security:audit — pnpm audit (high+) - security:check — Run security check script Hooks - hooks:pre-commit — Pre-commit: security + Biome staged - hooks:security — Block files, scan secrets, OSV Misc - update-deps — Update pnpm and all dependencies

Documentation

Full docs: basilic-docs.vercel.app

  • Dev Environments — Local vs remote (ports 3000, 3001, 8081; start:localhost, start:tunnel)

Extension points exported contracts — how you extend this code

ReportingAdapter (Interface)
* Minimal interface for reporting backend - compatible with @sentry/node and @sentry/nextjs
packages/error/src/core/capture-impl.ts
ChainMetadata (Interface)
(no doc)
packages/utils/src/web3/index.ts
EmailThemeProviderProps (Interface)
(no doc)
packages/email/components/theme.tsx
Config (Interface)
(no doc)
packages/core/src/gen/client/types.gen.ts
TeamContext (Interface)
(no doc)
packages/notif/src/base.ts
OAuthStateMeta (Interface)
(no doc)
apps/api/src/lib/oauth-shared.ts
ConversationMessage (Interface)
(no doc)
apps/web/components/assistant/conversation.tsx
CaptureErrorOptions (Interface)
(no doc)
packages/error/src/types.ts

Core symbols most depended-on inside this repo

cn
called by 298
packages/ui/src/lib/utils.ts
getDb
called by 68
apps/api/src/db/index.ts
hashToken
called by 43
apps/api/src/lib/jwt.ts
useReactApiConfig
called by 27
packages/react/src/context.tsx
getOrCreateSession
called by 24
apps/api/test/utils/auth-helper.ts
update
called by 23
packages/core/src/gen/client/utils.gen.ts
clear
called by 22
apps/api/test/utils/fake-email.ts
extractToken
called by 21
apps/api/test/utils/fake-email.ts

Shape

Function 1,027
Interface 49
Method 23
Class 14

Languages

TypeScript100%

Modules by API surface

packages/core/src/gen/sdk.gen.ts51 symbols
packages/ui/src/components/sidebar.tsx25 symbols
packages/core/src/gen/client/utils.gen.ts20 symbols
packages/ui/src/components/menubar.tsx16 symbols
packages/ui/src/components/dropdown-menu.tsx15 symbols
packages/ui/src/components/context-menu.tsx15 symbols
scripts/setup-database.mjs11 symbols
packages/utils/src/data/index.ts11 symbols
packages/ui/src/components/alert-dialog.tsx11 symbols
packages/ui/src/components/sheet.tsx10 symbols
packages/ui/src/components/select.tsx10 symbols
packages/ui/src/components/item.tsx10 symbols

For agents

$ claude mcp add basilic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact