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.
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.
- 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.
This monorepo is organized into two main directories:
- 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
- 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
- Node.js (LTS version recommended)
- pnpm
-
Clone the repository:
git clone https://github.com/The-ForgeBase/forgebase-ts.git cd forgebase-ts -
Install dependencies:
pnpm install
To build all apps and packages, run the following command:
cd my-turborepo
pnpm build
To develop all apps and packages, run the following command:
cd my-turborepo
pnpm dev
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
Learn more about the power of Turborepo:
