Skip to content

codefastlabs/codefast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,763 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeFast

A production-ready monorepo for building modern web applications with accessible UI components, high-performance styling utilities, and shared development tooling.

Release Test Coverage

NPM Version Bundle Size NPM Downloads GitHub tag

React TypeScript Radix UI TailwindCSS TanStack Start

License Contributors Open Issues GitHub Stars


Table of Contents

Introduction

CodeFast is a monorepo containing a production-ready UI component library and supporting tools for building modern web applications. The core package, @codefast/ui, provides 62 accessible components built on Radix UI primitives, styled with Tailwind CSS 4, and fully typed with TypeScript.

Key highlights:

  • Reusability — Versatile UI components that work across multiple projects.
  • Flexible Customization — Override or extend default styles with Tailwind Variants.
  • High Performance — Optimized for fast loading and minimal bundle size.
  • Clear Codebase — Modern, readable, and easy-to-maintain structure.

Architecture

graph TD
  subgraph apps [Apps]
    Web["@apps/ui<br/>Component showcase"]
  end

  subgraph packages [Packages]
    UI["@codefast/ui<br/>62 UI components"]
    TV["@codefast/tailwind-variants<br/>Variant styling API"]
    Theme["@codefast/theme<br/>Theme management"]
    DI["@codefast/di<br/>Dependency injection"]
    CLI["@codefast/cli<br/>Developer CLI"]
    TSConfig["@codefast/typescript-config<br/>TypeScript presets"]
  end

  Web --> UI
  Web --> Theme
  UI --> TV
  CLI --> DI
  UI -.->|dev dependency| TSConfig
  CLI -.->|dev dependency| TSConfig
  DI -.->|dev dependency| TSConfig
  Theme -.->|dev dependency| TSConfig
Loading

Packages

Package Description
@codefast/ui 62 accessible UI components built on Radix UI primitives
@codefast/tailwind-variants Type-safe variant API for Tailwind CSS (4–7× faster than tailwind-variants)
@codefast/theme Theme management with React 19 features (optimistic updates, cross-tab sync)
@codefast/di Lightweight dependency injection primitives for TypeScript
@codefast/cli Developer CLI for the monorepo (arrange, mirror, tag)
@codefast/typescript-config Shared TypeScript configuration presets
App / example Description
@apps/ui Docs/showcase site for @codefast/ui (TanStack Start), consuming local source
@examples/tanstack-start Consumer smoke-test: installs the published @codefast/* from npm (TanStack Start)

Getting Started

Use in Your Project

Install the UI component library:

pnpm add @codefast/ui

Import the required CSS and start using components:

import "@codefast/ui/css/style.css";
import { Button } from "@codefast/ui";

export default function App() {
  return <Button variant="outline">Click me</Button>;
}

See the individual package READMEs for detailed installation and usage instructions.

Develop Locally

Prerequisites

  • Node.js >= 24.0.0
  • pnpm 10.33.0

Setup

# Clone the repository
git clone https://github.com/codefastlabs/codefast.git
cd codefast

# Install dependencies
pnpm install

# Build all packages (required before running apps)
pnpm build:packages

Start development

# Start all apps and packages in dev mode
pnpm dev

# Or start a specific package
pnpm dev --filter=@codefast/ui

Scripts

Command Description
pnpm dev Build packages first, then start all apps and packages in development mode
pnpm build Build all apps and packages
pnpm build:packages Build only packages (excludes apps)
pnpm test Run tests across the monorepo
pnpm test:coverage Run tests with coverage reports
pnpm lint Run Oxlint (with type-aware rules via oxlint-tsgolint)
pnpm lint:fix Oxlint with --fix
pnpm format Format with Oxfmt
pnpm format:check Check formatting (CI)
pnpm check Lint + format check (common CI / pre-push static gate)
pnpm check:fix Lint with --fix + format write
pnpm check-types Run TypeScript type checking
pnpm clean Clean Turbo cache and task artifacts
pnpm deps:outdated List outdated dependencies (pnpm outdated)
pnpm deps:update Update all dependencies to latest (non-interactive)
pnpm deps:update:interactive Interactively update dependencies to latest

Technologies

Technology Purpose
React 19 Component framework with hooks, server components, and optimistic updates
TypeScript 5 Static type checking for safer, more maintainable code
Tailwind CSS 4 Utility-first CSS framework for rapid UI development
Radix UI Unstyled, accessible primitives for building UI components
TanStack Start Full-stack React framework powering the documentation site
Turbo High-performance monorepo build system with caching
pnpm Fast, disk space efficient package manager
Oxc (Oxlint, Oxfmt, oxlint-tsgolint) Fast lint and format; type-aware rules per Oxc docs
tsdown Fast TypeScript bundler powered by Rolldown
Changesets Versioning and changelog management for monorepo packages
Vitest Blazing fast unit testing framework
Zod TypeScript-first schema validation

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository.
  2. Clone your fork locally:
    git clone https://github.com/<your-username>/codefast.git
  3. Install dependencies:
    pnpm install
  4. Create a feature branch:
    git checkout -b feat/my-feature
  5. Make your changes and add tests where applicable. Before committing, run pnpm build:packages (needed for type-aware Oxlint), then pnpm lint, pnpm format:check, and pnpm test from the repo root.
    • For internal imports in apps/packages, use Node subpath imports via package.json#imports (for example #components/button).
    • Avoid compilerOptions.paths in tsconfig for internal aliases; reserve TS path mapping only for external compatibility requirements.
  6. Commit your changes following Conventional Commits:
    git commit -m "feat: add new component"
  7. Push to your branch and open a Pull Request.

Please check the open issues for ideas on where to contribute.

Security

If you discover a security vulnerability, please report it responsibly. Do not open a public issue. Instead, email the maintainers or use GitHub's private vulnerability reporting.

Code of Conduct

This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior via GitHub Issues.

Support

License

This project is licensed under the MIT License.

About

Beautiful, accessible React components for React 19

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors