The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
---
title: Comandos del Frontend
---
import { PageBanner } from "/snippets/page-banner.mdx"
## Comandos útiles
### Iniciando la aplicación
```bash
npx nx start twenty-front
```
### Regenerar el esquema de graphql basado en el esquema API graphql
```bash
npx nx run twenty-front:graphql:generate --configuration=metadata
```
O
```bash
npx nx run twenty-front:graphql:generate
```
### Lint
```bash
npx nx run twenty-front:lint # pass --fix to fix lint errors
```
## Traducciones
```bash
npx nx run twenty-front:lingui:extract
npx nx run twenty-front:lingui:compile
```
### Prueba
```bash
npx nx run twenty-front:test # run jest tests
npx nx run twenty-front:storybook:serve:dev # run storybook
npx nx run twenty-front:storybook:test # run tests # (needs yarn storybook:serve:dev to be running)
npx nx run twenty-front:storybook:coverage # (needs yarn storybook:serve:dev to be running)
```
## Stack Tecnológico
El proyecto tiene un stack limpio y sencillo, con un código boilerplate mínimo.
**Aplicación**
* [React](https://react.dev/)
* [Apollo](https://www.apollographql.com/docs/)
* [GraphQL Codegen](https://the-guild.dev/graphql/codegen)
* [Jotai](https://jotai.org/)
* [TypeScript](https://www.typescriptlang.org/)
**Pruebas**
* [Jest](https://jestjs.io/)
* [Storybook](https://storybook.js.org/)
**Herramientas**
* [Yarn](https://yarnpkg.com/)
* [Craco](https://craco.js.org/docs/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
## Arquitectura
### Enrutamiento
[React Router](https://reactrouter.com/) maneja el enrutamiento.
Para evitar [re-renders]innecesarios (/developers/contribute/capabilities/frontend-development/best-practices-front#managing-re-renders) toda la lógica de enrutamiento está en un `useEffect` en `PageChangeEffect`.
### Gestión del Estado
[Jotai](https://jotai.org/) gestiona el estado.
Ver [mejores prácticas](/l/es/developers/contribute/capabilities/frontend-development/best-practices-front#state-management) para más información sobre la gestión del estado.
## Pruebas
[Jest](https://jestjs.io/) sirve como la herramienta para pruebas unitarias mientras [Storybook](https://storybook.js.org/) es para pruebas de componentes.
Jest es principalmente para probar funciones utilitarias, y no los componentes en sí mismos.
Storybook es para probar el comportamiento de componentes aislados, así como mostrar el sistema de diseño.
<PageBanner illustration="card-page-cli" />