Skip to main content

Multi-tenant Platform API

Build secure, scalable SaaS applications with role-based access control, invitation workflows, and comprehensive time tracking.

Quick start

Get up and running with the Platform API in minutes

1

Clone and install dependencies

Clone the repository and install the required dependencies:
git clone https://github.com/LeonardoCaero/platform-api.git
cd platform-api
npm install
2

Configure environment variables

Copy the example environment file and configure your database connection:
cp .env.example .env
Update the .env file with your PostgreSQL connection string and JWT secrets.
3

Initialize the database

Run database migrations and seed initial data:
npm run db:rebuild
4

Start the development server

Launch the API server:
npm run dev
The API will be available at http://localhost:4000

Core features

Everything you need to build a multi-tenant SaaS platform

Multi-tenancy

Isolated company workspaces with complete data separation and tenant-specific configurations

Authentication

JWT-based authentication with secure refresh tokens and automated token rotation

Role-based Access Control

Granular permissions system with company-specific roles and global platform permissions

Invitation System

Flexible invitation workflows for company creation and member onboarding

Time Tracking

Comprehensive time tracking with projects, categories, and client billing support

Client Management

Manage clients, sites, and rate rules with overtime calculations

API resources

Explore the available endpoints and integrate with your application

Authentication

User registration, login, and token management

Companies

Create and manage company workspaces

Users

User profiles and management

Memberships

Company member invitations and roles

Permissions

Permission management and access control

Time Tracking

Time entries, projects, and categories

Ready to get started?

Follow our quickstart guide to set up your first multi-tenant application with the Platform API.

View Quickstart Guide