Files
twenty/packages/twenty-docs/l/cs/developers/contribute/capabilities/frontend-development/frontend-commands.mdx
T
github-actions[bot] 2de681da72 i18n - docs translations (#22317)
Created by Github action

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22317?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

Co-authored-by: github-actions <github-actions@twenty.com>
2026-06-29 17:12:55 +02:00

92 lines
2.3 KiB
Plaintext

---
title: Příkazy Frontend
icon: terminal
---
## Užitečné příkazy
### Spuštění aplikace
```bash
npx nx start twenty-front
```
### Regenerujte schéma GraphQL na základě API graphql schématu
```bash
npx nx run twenty-front:graphql:generate --configuration=metadata
```
NEBO
```bash
npx nx run twenty-front:graphql:generate
```
### Linter
```bash
npx nx run twenty-front:lint # pass --fix to fix lint errors
```
## Překlady
```bash
npx nx run twenty-front:lingui:extract
npx nx run twenty-front:lingui:compile
```
### Testovat
```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)
```
## Technologický stack
Projekt má čistý a jednoduchý stack s minimálním počtem šablonových kódů.
**Aplikace**
* [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/)
**Testování**
* [Jest](https://jestjs.io/)
* [Storybook](https://storybook.js.org/)
**Nástroje**
* [Yarn](https://yarnpkg.com/)
* [Craco](https://craco.js.org/docs/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
## Architektura
### Směrování
[React Router](https://reactrouter.com/) zajišťuje směrování.
Aby se předešlo zbytečné [re-renders](/l/cs/developers/contribute/capabilities/frontend-development/best-practices-front#managing-re-renders) ) je všechna směrovací logika v `useEffect` v `PageChangeEffect`.
### Správa stavu
[Jotai](https://jotai.org/) zajišťuje správu stavu.
Podívejte se na [osvědčené postupy](/l/cs/developers/contribute/capabilities/frontend-development/best-practices-front#state-management) pro více informací o správě stavu.
## Testování
[Jest](https://jestjs.io/) slouží jako nástroj pro testování jednotek, zatímco [Storybook](https://storybook.js.org/) je pro testování komponent.
Jest je primárně určen pro testování pomocných funkcí, nikoli samotných komponent.
Storybook slouží k testování chování izolovaných komponent, stejně jako k zobrazování návrhového systému.