Skip to content

Latest commit

 

History

History
118 lines (87 loc) · 3.37 KB

File metadata and controls

118 lines (87 loc) · 3.37 KB

Base0 Banner

A minimal backend platform

License Bun TypeScript Hono React


Overview

A lightweight backend platform providing authentication, document storage, file handling, and RBAC through a type-safe API and React-based control plane.

Base0 Dashboard Preview

Architecture

The platform is engineered as a monorepo leveraging Bun and Turborepo. It prioritizes:

  • Edge-native compatibility: Designed to run efficiently on modern runtimes.
  • Type Safety: End-to-end typing shared between client and server.
  • Minimalism: Leveraging standard Web APIs (Request/Response) over heavy framework abstractions.

Core Features

Authentication

  • JWT-based session management with automatic access and refresh token rotation.
  • Secure, industry-standard password hashing using Argon2id.
  • Passwordless authentication flows using Magic Links.
  • Extensible OAuth2 interface supporting providers like GitHub and Google.

Data Engine

  • Dynamic schema definitions utilizing runtime Zod validation.
  • Strict multi-tenant isolation via logical project separation.
  • Advanced querying capabilities leveraging PostgreSQL JSONB.

Blob Storage

  • Pluggable driver architecture supporting Local filesystem and S3-compatible providers (AWS, MinIO, R2).
  • Secure, presigned upload mechanisms and streaming downloads.
  • Integrated file metadata tracking and management.

Access Control

  • Granular Role-Based Access Control (RBAC) with Owner, Admin, Member, and Viewer roles.
  • Project-scoped API keys with precise permission enforcement.
  • Native rate limiting to prevent abuse.

Technology Stack

  • Runtime: Bun v1.2+
  • API Framework: Hono
  • Database: PostgreSQL (JSONB) with Drizzle ORM
  • Dashboard: React 19, Vite 6, Tailwind CSS v4
  • Routing: TanStack Router
  • State Management: TanStack Query
  • Tooling: Turborepo, Biome

Getting Started

Prerequisites

  • Bun: v1.2 or higher
  • Docker: Required for local PostgreSQL instance

Installation

  1. Clone the repository

    git clone https://github.com/itisrohit/base0.git
    cd base0
  2. Install dependencies

    bun install
  3. Configure environment

    cp .env.example .env
  4. Initialize infrastructure Start the database container and apply schema migrations:

    docker-compose up -d db
    bun run db:push

Development

To start the API and Dashboard simultaneously in development mode:

bun run dev

Contributing

Please review CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License.