2023-10-08 14:21:54 +03:00
---
title: Backend Development
sidebar_position: 0
sidebar_custom_props:
2023-10-19 17:32:29 +03:00
icon: TbTerminal
2023-10-08 14:21:54 +03:00
---
2023-10-10 13:33:17 +03:00
2024-02-05 17:01:37 +03:00
import DocCardList from '@theme/DocCardList';
<DocCardList />
## Useful commands
2024-03-25 14:31:18 +03:00
These commands should be exectued from packages/twenty-server folder.
2024-04-19 19:28:02 +03:00
From any other folder you can run `npx nx <command>` twenty-server.
2024-03-25 14:31:18 +03:00
2024-02-05 17:01:37 +03:00
### First time setup
```
2024-04-19 19:28:02 +03:00
npx nx database:reset # setup the database with dev seeds
2024-02-05 17:01:37 +03:00
```
### Starting the app
```
2024-04-19 19:28:02 +03:00
npx nx start
2024-02-05 17:01:37 +03:00
```
### Lint
```
2024-04-19 19:28:02 +03:00
npx nx lint
2024-02-05 17:01:37 +03:00
```
### Test
```
2024-04-19 19:28:02 +03:00
npx nx test:unit
2024-02-05 17:01:37 +03:00
```
### Resetting the database
If you want to reset the database, you can run the following command:
```bash
2024-04-19 19:28:02 +03:00
npx nx database:reset
2024-02-05 17:01:37 +03:00
```
:::warning
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**
- [NestJS](https://nestjs.com/)
- [TypeORM](https://typeorm.io/)
- [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)
**Database**
- [Postgres](https://www.postgresql.org/)
**Third-party integrations**
- [Sentry](https://sentry.io/welcome/) for tracking bugs
**Testing**
- [Jest](https://jestjs.io/)
**Tooling**
- [Yarn](https://yarnpkg.com/)
- [ESLint](https://eslint.org/)
**Development**
- [AWS EKS](https://aws.amazon.com/eks/)