Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 24 additions & 143 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,154 +1,35 @@
# Basilic
# Basilic: Web3 & AI App Starters

TypeScript monorepo with REST API architecture.
Full-stack monorepo starter for Web3 and AI applications.

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

## Features

- 🤖 **AI-first dev workflow** — Optimized Cursor rules, skills, MCP integrations (ShadcnUI, Supabase, V0, GitHub), and automated CodeRabbit reviews.
- 🔌 **REST API & JWT** — OpenAPI spec, Swagger UI, JWT 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, Cosmos; tooling and smart contract dev environments.
- 📐 **Conventions** — Cursor rules per domain, @repo/sentry, Pino logging, shared TS and style.
- 🧑‍💻 **TypeScript-first** — End-to-end types from database to frontend.

```
## Technology stack

## Quick Start

```bash
pnpm install
pnpm dev
```

## Commands

### Development
- `pnpm dev` - Start all apps in development mode (see [Development Workflow](#development-workflow))
- `pnpm build` - Build all apps and packages
- `pnpm lint` - Lint all code (Biome + ESLint)
- `pnpm lint:fix` - Auto-fix lint issues (Biome + ESLint)
- `pnpm format` - Format all code (Biome)
- `pnpm checktypes` - Type check all TypeScript
- `pnpm test` - Run all tests
- `pnpm qa` - Quality assurance: install dependencies, lint, type-check, build, and test everything

## Development Workflow

### Turborepo Setup

This monorepo uses **Turborepo** for task orchestration and caching. Turborepo provides:

- **Intelligent caching** - Only rebuilds what changed
- **Parallel execution** - Runs independent tasks simultaneously
- **Task dependencies** - Ensures correct build order
- **Remote caching** - Share cache across team and CI/CD

### `pnpm dev` - Development Mode

The `pnpm dev` command starts all development servers with watch mode:

```bash
pnpm dev
```

This runs:
- **`@repo/core`** - Watches for OpenAPI changes and regenerates API client
- **`@repo/react`** - Watches for OpenAPI changes and regenerates React hooks, watches TypeScript for rebuilds
- **`@repo/sentry`** - Watches TypeScript for rebuilds
- **`@repo/utils`** - Watches TypeScript for rebuilds
- **`@repo/fastify`** - Starts Fastify API server with OpenAPI generation watcher
- **`@repo/next`** - Starts Next.js development server

**Key Features:**
- **Watch mode** - All packages automatically rebuild when source files change
- **OpenAPI regeneration** - `core` and `react` packages watch for OpenAPI spec changes and regenerate clients
- **Hot reload** - Next.js and Fastify support hot module replacement

### `pnpm qa` - Quality Assurance

The `pnpm qa` command runs a complete quality check:

```bash
pnpm qa
```

This executes:
1. **`pnpm i`** - Install/update dependencies
2. **`turbo run checktypes`** - Type-check all packages
3. **`pnpm lint:fix`** - Auto-fix linting (ESLint + Biome)
4. **`pnpm build`** - Build all packages (excluding contracts)
5. **`turbo run test`** - Test all packages (excluding contracts)

**Use Cases:**
- Before committing changes
- Before opening a pull request
- In CI/CD pipelines
- When verifying the entire codebase

### Running Individual Apps

You can run individual apps directly, but remember to build dependencies first:

```bash
# Build required packages
pnpm build --filter=@repo/core --filter=@repo/react --filter=@repo/sentry --filter=@repo/utils

# Then run the app
cd apps/next
pnpm dev
```

See individual app READMEs (e.g., `apps/next/README.md`) for app-specific instructions.

### Security
- `pnpm secrets:scan:staged` - Scan staged files for secrets (gitleaks)
- `pnpm secrets:scan` - Scan entire repository for secrets (gitleaks)
- `pnpm deps:osv` - Scan dependencies for vulnerabilities (OSV Scanner)
- `pnpm deps:audit` - Run pnpm audit for dependency vulnerabilities

## CI/CD Workflows

GitHub Actions workflows automate quality checks:

### Lint Workflow (`.github/workflows/lint.yml`)

Runs on all pull requests to ensure code quality:
- Executes `pnpm lint` (Biome + ESLint)
- Catches linting errors before merge
- Can be manually triggered via `workflow_dispatch`

### Security Workflow (`.github/workflows/security.yml`)

Runs on all pull requests and pushes to main:
- **Secret scanning** - Scans repository with gitleaks and TruffleHog
- **Dependency scanning** - Checks for vulnerabilities with OSV Scanner and pnpm audit
- **Git history scan** - Scans entire git history for exposed secrets
- All checks must pass for CI to succeed

See [Security Guide](@apps/docu/content/docs/security/index.mdx) for complete details.

## Structure

- **`apps/`** - Applications (API, Web, Docs)
- **`packages/`** - Shared packages (core, react, ui, utils)
- **`tools/`** - Shared development tooling (eslint, typescript configs)
- **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

## Documentation

Full documentation: [https://basilic-docs.vercel.app/docs](https://basilic-docs.vercel.app/docs)

### Get Started
- [Getting Started](@apps/docu/content/docs/development/index.mdx) - 15-minute setup guide
- [AI-Driven Development](@apps/docu/content/docs/development/ai-workflow.mdx) - Recommended workflow with Cursor

### Architecture
- [Monorepo Structure](@apps/docu/content/docs/architecture/monorepo.mdx) - Package organization
- [API Development](@apps/docu/content/docs/architecture/api.mdx) - REST API with OpenAPI and client generation
- [Portability Strategy](@apps/docu/content/docs/architecture/portability.mdx) - Zero vendor lock-in

### Guides
- [Development Tooling](@apps/docu/content/docs/development/dev-tooling.mdx) - Turborepo setup, pnpm dev, and pnpm qa workflows
- [Security Guide](@apps/docu/content/docs/architecture/security.mdx) - Security baseline and secret scanning
- [Error Handling Guide](@apps/docu/content/docs/architecture/error-handling.mdx) - Error handling with Sentry integration
- [Deployment Guide](@apps/docu/content/docs/deployment/index.mdx) - Deployment options and strategies
- [Publishing Guide](@apps/docu/content/docs/deployment/publishing.mdx) - Publishing packages to npm
Full docs: [basilic-docs.vercel.app/docs](https://basilic-docs.vercel.app/docs)

### Cursor Setup
- [Cursor Setup Guide](@apps/docu/content/docs/development/cursor-setup.mdx) - Configure IDE and MCP servers
## Contributing

### Deep Dives
- [Architecture](@apps/docu/content/docs/architecture/index.mdx) - Architecture overview
See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and guidelines.
4 changes: 2 additions & 2 deletions apps/docu/components/landing/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export function Hero() {
</h1>

<p className="mx-auto mt-4 max-w-2xl text-pretty text-sm leading-relaxed text-muted-foreground sm:text-base md:mt-6 md:text-lg">
Build production-ready APIs with TypeScript, Fastify, and OpenAPI. AI-native development,
portable architecture, and first-class web3 support built in.
Production-ready frontends and APIs with TypeScript, Next.js, Fastify, and OpenAPI.
AI-native development, portable architecture, and first-class web3 support built in.
</p>

{/* CTA */}
Expand Down
Loading