Getting started

Self-Hosting

Extending

Rest APIs
GraphQL APIs

Contributing

User Guide

Backend Commands

Backend Commands

Backend Commands
In this article

Useful commands

These commands should be exectued from packages/twenty-server folder. From any other folder you can run npx nx <command> twenty-server.

First time setup

npx nx database:reset # setup the database with dev seeds

Starting the app

npx nx start

Lint

npx nx lint

Test

npx nx test:unit

Resetting the database

If you want to reset the database, you can run the following command:

npx nx database:reset

This will drop the database and re-run the migrations and seed.

Make sure to back up any data you want to keep before running this command.

Tech Stack

Twenty primarily uses NestJS for the backend.

Prisma was the first ORM we used. But in order to allow users to create custom fields and custom objects, a lower-level made more sense as we need to have fine-grained control. The project now uses TypeORM.

Here's what the tech stack now looks like.

Core

Database

Third-party integrations

Testing

Tooling

Development

Noticed something to change?

As an open-source company, we welcome contributions through Github. Help us keep it up-to-date, accurate, and easy to understand by getting involved and sharing your ideas!

twenty github image
The #1 Open Source CRM
©2024 Twenty PBC