> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Comenzi Backend

## Comenzi utile

Aceste comenzi ar trebui să fie executate din dosarul packages/twenty-server.
Din orice alt dosar poți rula `npx nx {command} twenty-server` (sau `npx nx run twenty-server:{command}`).

### Configurare de la prima utilizare

```
npx nx database:reset twenty-server # setup the database with dev seeds
```

### Pornirea serverului

```
npx nx run twenty-server:start
```

### Lint

```
npx nx run twenty-server:lint # pass --fix to fix lint errors
```

### Test

```
npx nx run twenty-server:test:unit          # run unit tests
npx nx run twenty-server:test:integration   # run integration tests
```

Notă: poți rula `npx nx run twenty-server:test:integration:with-db-reset` în cazul în care trebuie să resetezi baza de date înainte de a rula testele de integrare.

### Resetarea bazei de date

Dacă vrei să resetezi și să configurezi baza de date, poți rula comanda următoare:

```bash theme={null}
npx nx run twenty-server:database:reset
```

### Migrații

#### Pentru obiectele din schematizările de Bază/Metadate (TypeORM)

```bash theme={null}
npx nx run twenty-server:database:migrate:generate
```

## Tehnologii Utilizate

Twenty folosește în principal NestJS pentru backend.

Prisma a fost primul ORM pe care l-am folosit. Dar pentru a permite utilizatorilor să creeze câmpuri și obiecte personalizate, un nivel inferior a făcut mai mult sens, deoarece trebuie să avem un control detaliat. Proiectul folosește acum TypeORM.

Iată cum arată acum stack-ul tehnologic.

**Nucleu**

* [NestJS](https://nestjs.com/)
* [TypeORM](https://typeorm.io/)
* [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)

**Bază de date**

* [Postgres](https://www.postgresql.org/)

**Integrări terțe**

* [Sentry](https://sentry.io/welcome/) pentru urmărirea erorilor

**Testare**

* [Jest](https://jestjs.io/)

**Instrumente**

* [Yarn](https://yarnpkg.com/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)

**Dezvoltare**

* [AWS EKS](https://aws.amazon.com/eks/)
