Files
twenty/packages/twenty-docs/docs/contributor/server/server.mdx
Charles Bochet e576fe0d67 Update yarn commands (#4644)
* Simplify commands

* Simplify commands

* Migrate all dev commands to project.json

* Fix tests
2024-03-25 12:31:18 +01:00

87 lines
1.6 KiB
Plaintext

---
title: Backend Development
sidebar_position: 0
sidebar_custom_props:
icon: TbTerminal
---
import DocCardList from '@theme/DocCardList';
<DocCardList />
## Useful commands
These commands should be exectued from packages/twenty-server folder.
From any other folder you can run `yarn nx <command>` twenty-server.
### First time setup
```
yarn nx database:reset # setup the database with dev seeds
```
### Starting the app
```
yarn nx start
```
### Lint
```
yarn nx lint
```
### Test
```
yarn nx test:unit
```
### Resetting the database
If you want to reset the database, you can run the following command:
```bash
yarn nx database:reset
```
:::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/)