|
1 |
| -# Devmx |
2 |
| - |
3 |
| -<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> |
4 |
| - |
5 |
| -✨ Your new, shiny [Nx workspace](https://nx.dev) is almost ready ✨. |
6 |
| - |
7 |
| -[Learn more about this workspace setup and its capabilities](https://nx.dev/getting-started/intro#learn-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed! |
| 1 | +``` |
| 2 | + _ |
| 3 | + __| | _____ ___ __ ___ __ __ |
| 4 | + / _` |/ _ \ \ / / '_ ` _ \\ \/ / |
| 5 | +| (_| | __/\ V /| | | | | |> < |
| 6 | + \__,_|\___| \_/ |_| |_| |_/_/\_\ |
| 7 | +``` |
| 8 | +# dev member experience |
8 | 9 |
|
9 |
| -## Finish your CI setup |
10 | 10 |
|
11 |
| -[Click here to finish setting up your workspace!](https://cloud.nx.app/connect/MMUTh7bF3w) |
| 11 | +## Para executar em dev |
12 | 12 |
|
| 13 | +### Requisitos |
| 14 | +1. [pnpm](https://pnpm.io/installation) instalado |
| 15 | +1. [docker](https://docs.docker.com/engine/install) instalado |
13 | 16 |
|
14 |
| -## Run tasks |
| 17 | +### Configurações |
15 | 18 |
|
16 |
| -To run tasks with Nx use: |
| 19 | +Clone o projeto |
17 | 20 |
|
18 | 21 | ```sh
|
19 |
| -npx nx <target> <project-name> |
| 22 | +git clone https://github.com/DeveloperParana/devmx |
20 | 23 | ```
|
21 | 24 |
|
22 |
| -For example: |
| 25 | +Configure a senha do banco e segredo jwt como quiser para uso local |
23 | 26 |
|
24 | 27 | ```sh
|
25 |
| -npx nx build myproject |
| 28 | +mv .env-example .env |
26 | 29 | ```
|
27 | 30 |
|
28 |
| -These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files. |
29 |
| - |
30 |
| -[More about running tasks in the docs »](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
31 |
| - |
32 |
| -## Add new projects |
| 31 | +Preencha os valores para `DB_USER`, `DB_PASS`, `JWT_SECRET` e salve antes de executar o docker. |
33 | 32 |
|
34 |
| -While you could add new projects to your workspace manually, you might want to leverage [Nx plugins](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) and their [code generation](https://nx.dev/features/generate-code?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) feature. |
35 |
| - |
36 |
| -To install a new plugin you can use the `nx add` command. Here's an example of adding the React plugin: |
37 | 33 | ```sh
|
38 |
| -npx nx add @nx/react |
| 34 | +docker compose up -d |
39 | 35 | ```
|
40 | 36 |
|
41 |
| -Use the plugin's generator to create new projects. For example, to create a new React app or library: |
| 37 | +Instale as dependências |
42 | 38 |
|
43 | 39 | ```sh
|
44 |
| -# Genenerate an app |
45 |
| -npx nx g @nx/react:app demo |
46 |
| - |
47 |
| -# Generate a library |
48 |
| -npx nx g @nx/react:lib some-lib |
| 40 | +pnpm install |
49 | 41 | ```
|
50 | 42 |
|
51 |
| -You can use `npx nx list` to get a list of installed plugins. Then, run `npx nx list <plugin-name>` to learn about more specific capabilities of a particular plugin. Alternatively, [install Nx Console](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) to browse plugins and generators in your IDE. |
52 |
| - |
53 |
| -[Learn more about Nx plugins »](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | [Browse the plugin registry »](https://nx.dev/plugin-registry?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
| 43 | +Execute o back-end e front-end |
54 | 44 |
|
| 45 | +```sh |
| 46 | +pnpm dev |
| 47 | +``` |
55 | 48 |
|
56 |
| -[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
| 49 | +## Para commits |
57 | 50 |
|
58 |
| -## Install Nx Console |
| 51 | +```sh |
| 52 | +pnpm cmt |
| 53 | +``` |
59 | 54 |
|
60 |
| -Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ. |
| 55 | +Responda as perguntas para fazer o commit. |
61 | 56 |
|
62 |
| -[Install Nx Console »](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
63 | 57 |
|
64 |
| -## Useful links |
| 58 | +## Responsabilidades e relacionamentos |
65 | 59 |
|
66 |
| -Learn more: |
| 60 | +Trata-se de responsabilidade e relacionamentos, ou seja, qual a responsabilidade de cada camada e quais camadas podem depender diretamente uma das outras. Na tabela a seguir vemos que camadas do tipo `util` podem depender apenas de camadas que também sejam do tipo `util`, camadas do tipo `domain` podem depender apenas de camadas do tipo `util` e `api`, camadas do tipo `data-source` podem depender apenas dos tipos `util`, `domain` e `api`, e assim por diante... |
67 | 61 |
|
68 |
| -- [Learn more about this workspace setup](https://nx.dev/getting-started/intro#learn-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
69 |
| -- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
70 |
| -- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
71 |
| -- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
| 62 | +Caso tenha interesse em aprofundar neste assunto e descobrir os motivos, recomendo que leia um conteúdo que escrevi ano passado, você pode fazer download através do link a seguir. [Arquitetura em camadas, uma abordagem sobre responsabilidades e relacionamentos](https://conteudode.dev/pdf/nx) |
72 | 63 |
|
73 |
| -And join the Nx community: |
74 |
| -- [Discord](https://go.nx.dev/community) |
75 |
| -- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl) |
76 |
| -- [Our Youtube channel](https://www.youtube.com/@nxdevtools) |
77 |
| -- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) |
| 64 | +| | util | domain | data-source | data-access | resource | feature | app | api | |
| 65 | +| ------------: | :--: | :----: | :---------: | :---------: | :------: | :-----: | :-: | :-: | |
| 66 | +| `util` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 67 | +| `domain` | 𝗫 | 𝗫 | ✓ | ✓ | 𝗫 | 𝗫 | 𝗫 | ✓ | |
| 68 | +| `data-source` | 𝗫 | 𝗫 | 𝗫 | 𝗫 | ✓ | 𝗫 | ✓ | ✓ | |
| 69 | +| `data-access` | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | ✓ | ✓ | ✓ | |
| 70 | +| `resource` | 𝗫 | 𝗫 | 𝗫 | 𝗫 | ✓ | 𝗫 | ✓ | ✓ | |
| 71 | +| `feature` | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | ✓ | ✓ | ✓ | |
| 72 | +| `app` | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | 𝗫 | |
| 73 | +| `api` | 𝗫 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
0 commit comments