Skip to content

ForgeBase - A flexible, scalable Backend as a Service (BaaS) framework that works with multiple backend frameworks. Built to overcome the limitations of existing BaaS solutions with support for horizontal scaling and robust database integrations.

License

Notifications You must be signed in to change notification settings

The-ForgeBase/forgebase-ts

Repository files navigation

ForgeBase TypeScript

Nx logo

Overview

ForgeBase is an open-source Backend as a Service (BaaS) framework designed to provide backend functionality for a variety of backend frameworks across multiple languages. This TypeScript implementation uses Nx as a monorepo management tool to organize the codebase into multiple libraries and applications.

Purpose

Our mission is to simplify backend development by providing a highly flexible, language-agnostic BaaS framework that developers can plug into their existing server setup. While we are 70% inspired by Pocketbase, we recognized its limitations—particularly its dependency on SQLite and its inability to scale horizontally. To overcome these challenges, we are building a better alternative that supports horizontal scaling and integrates with more robust databases like PostgreSQL, SurrealDB, etc.

Core Features

  • Authentication & Authorization: Fine-grained role, table, and namespace-level permissions
  • Database Integration: Compatibility with modern real-time databases like RethinkDB, SurrealDB, etc.
  • Object Storage: Built-in support for object storage solutions
  • Extendability: Easy to add custom routes and extend functionality beyond the BaaS features
  • Real-time Features: Full real-time support for database, presence, etc.

Project Structure

This monorepo is organized into two main directories:

Libraries (packages/)

  • Auth: A flexible authentication library providing multiple authentication strategies and framework adapters
  • API: Provides API functionalities and integrations
  • Common: Common utilities and shared code used across the project
  • Database: Database management and integration
  • Real-Time: Real-time communication and updates
  • Storage: Storage management and integration
  • Studio UI Utils: UI utilities for the Studio application
  • Studio UI: UI components for the Studio application

Applications (apps/)

  • Studio: Admin UI for managing ForgeBase instances
  • Docs: Documentation site
  • Nest Test: NestJS integration example
  • Hono Test: Hono integration example
  • Web App: Example web application

Getting Started

Prerequisites

  • Node.js (LTS version recommended)
  • pnpm

Installation

  1. Clone the repository:

    git clone https://github.com/The-ForgeBase/forgebase-ts.git
    cd forgebase-ts
  2. Install dependencies:

    pnpm install

Build

To build all apps and packages, run the following command:

cd my-turborepo
pnpm build

Develop

To develop all apps and packages, run the following command:

cd my-turborepo
pnpm dev

Remote Caching

Tip

Vercel Remote Cache is free for all plans. Get started today at vercel.com.

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd my-turborepo
npx turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

npx turbo link

Useful Links

Learn more about the power of Turborepo:

About

ForgeBase - A flexible, scalable Backend as a Service (BaaS) framework that works with multiple backend frameworks. Built to overcome the limitations of existing BaaS solutions with support for horizontal scaling and robust database integrations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages