Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 2024/09 - 01 #18

Merged
merged 69 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ba943c3
update: Removing unused component
bush1D3v Sep 9, 2024
de1a00a
ci: Create pages.yml
bush1D3v Sep 10, 2024
40fae77
ci: Update pages.yml
bush1D3v Sep 10, 2024
96079ab
ci: Update pages.yml
bush1D3v Sep 10, 2024
c46fff5
delete: Cypress
bush1D3v Sep 11, 2024
a297d56
delete: Initial vue project
bush1D3v Sep 11, 2024
c9918f6
feat: Increase SEO
bush1D3v Sep 11, 2024
1edcc95
chore: Add locks to ignore
bush1D3v Sep 11, 2024
6c098cd
config: Create Chromatic config
bush1D3v Sep 11, 2024
1df05a1
docs: Update COMMIT_PATTERN.md
bush1D3v Sep 11, 2024
7f0801c
docs: Create Button stories
bush1D3v Sep 11, 2024
2849cfc
test: Create Button specs
bush1D3v Sep 11, 2024
3774840
style: HWB vars to RGB
bush1D3v Sep 11, 2024
37bc104
config: HWB vars to RGB
bush1D3v Sep 11, 2024
eb90ee0
build: Update vue app port
bush1D3v Sep 11, 2024
9c7c73b
build: Update vue app port
bush1D3v Sep 11, 2024
9e84a99
docs: Update README.md
bush1D3v Sep 11, 2024
a5be8b2
style: Bun lint
bush1D3v Sep 11, 2024
65eb008
style: Bun lint
bush1D3v Sep 11, 2024
4b5678e
build: Remove cypress from package.json
bush1D3v Sep 11, 2024
e486ad4
feat: Crete Footer component
bush1D3v Sep 11, 2024
38a9488
feat: Crete Header component
bush1D3v Sep 11, 2024
95a2b76
fix: Framework name
bush1D3v Sep 11, 2024
f53be7e
update: Create initial pages Layout
bush1D3v Sep 11, 2024
7df98be
feat: Export layout components
bush1D3v Sep 11, 2024
c2ffb47
update: Create initial Home
bush1D3v Sep 11, 2024
9c6b7c7
update: Create initial About
bush1D3v Sep 11, 2024
bce8132
feat: Create shadcn button
bush1D3v Sep 11, 2024
1a2d225
feat: Create shadcn button
bush1D3v Sep 11, 2024
477ee47
update: Router
bush1D3v Sep 11, 2024
0b354c5
update: Router
bush1D3v Sep 11, 2024
9ce606c
update: Removing unused component
bush1D3v Sep 9, 2024
841aa7b
delete: Cypress
bush1D3v Sep 11, 2024
489ecad
delete: Initial vue project
bush1D3v Sep 11, 2024
fde1e08
feat: Increase SEO
bush1D3v Sep 11, 2024
e2a575d
chore: Add locks to ignore
bush1D3v Sep 11, 2024
6f6512d
config: Create Chromatic config
bush1D3v Sep 11, 2024
97a3ee3
docs: Update COMMIT_PATTERN.md
bush1D3v Sep 11, 2024
fe81490
docs: Create Button stories
bush1D3v Sep 11, 2024
c42a8d3
test: Create Button specs
bush1D3v Sep 11, 2024
b97ee11
style: HWB vars to RGB
bush1D3v Sep 11, 2024
05c4ddf
config: HWB vars to RGB
bush1D3v Sep 11, 2024
5092d1c
build: Update vue app port
bush1D3v Sep 11, 2024
09421c1
build: Update vue app port
bush1D3v Sep 11, 2024
23a13f9
docs: Update README.md
bush1D3v Sep 11, 2024
b4a66bd
style: Bun lint
bush1D3v Sep 11, 2024
dd98f2f
style: Bun lint
bush1D3v Sep 11, 2024
d902d6f
build: Remove cypress from package.json
bush1D3v Sep 11, 2024
92b25e3
feat: Crete Footer component
bush1D3v Sep 11, 2024
d14107d
feat: Crete Header component
bush1D3v Sep 11, 2024
38b51ad
fix: Framework name
bush1D3v Sep 11, 2024
89d9866
update: Create initial pages Layout
bush1D3v Sep 11, 2024
cc34174
feat: Export layout components
bush1D3v Sep 11, 2024
e3ff0f3
update: Create initial Home
bush1D3v Sep 11, 2024
35b8c02
update: Create initial About
bush1D3v Sep 11, 2024
ac149d3
feat: Create shadcn button
bush1D3v Sep 11, 2024
6a0ff0a
feat: Create shadcn button
bush1D3v Sep 11, 2024
27bc175
update: Router
bush1D3v Sep 11, 2024
095fea1
update: Router
bush1D3v Sep 11, 2024
23f2287
ci: Update devskim.yml
bush1D3v Sep 11, 2024
d6ed920
ci: Update docker-image.yml
bush1D3v Sep 11, 2024
86130ab
config: Tailwind config to server
bush1D3v Sep 12, 2024
1983377
feat: Add logos to assets
bush1D3v Sep 12, 2024
eea8e4e
update: favicon.ico
bush1D3v Sep 12, 2024
434a228
update: logo.svg
bush1D3v Sep 12, 2024
cf894f0
update: Add project pallet color variables
bush1D3v Sep 12, 2024
c045995
Merge branch 'dev' into devv
bush1D3v Sep 12, 2024
0c27430
Merge pull request #12 from bush1D3v/devv
bush1D3v Sep 12, 2024
36f9055
bomb commit
bush1D3v Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ CONTRIBUTING.md
LICENSE
README.md
SECURITY.md
test-results
playwright-report
4 changes: 2 additions & 2 deletions .github/workflows/devskim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: DevSkim

on:
push:
branches: [ "main" ]
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "dev" ]
schedule:
- cron: '35 6 * * 3'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on:
schedule:
- cron: '36 20 * * *'
push:
branches: [ "main" ]
branches: [ "main", "dev" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
branches: [ "main", "dev" ]

env:
REGISTRY: ghcr.io
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy to Github Pages # Defines the name of the GitHub Actions workflow.

on:
push:
branches:
- main # Triggers the workflow on each push to the 'develop' branch.

jobs:
build:
name: Build # Defines the name of the build job.
runs-on: ubuntu-latest # Specifies the operating system for the job.

steps:
- name: Checkout Repo # Checks out the repository.
uses: actions/checkout@v4

- name: Create Node Environment # Sets up Node.js environment.
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install Packages and Build Application # Installs npm packages and builds the Vue.js application.
run: |
npm install
npm ci
npm run build

- name: Setup Pages # Configures pages for deployment.
id: pages
uses: actions/configure-pages@v3

- name: Build with Jekyll # Builds the application with Jekyll.
uses: actions/jekyll-build-pages@v1
with:
source: ./dist/
destination: ./_site

- name: Upload artifact # Uploads the build artifact.
uses: actions/upload-pages-artifact@v2

deploy:
name: Deploy Application # Defines the name of the deployment job.

# Add a dependency to the build job
needs: build # Specifies that the deployment job depends on the successful completion of the build job.

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # Grants write permission to deploy to Pages.
id-token: write # Grants write permission to verify the deployment source.

environment:
name: github-pages # Specifies the environment for deployment.
url: ${{ steps.deployment.outputs.page_url }} # Retrieves the deployment URL from the previous deployment step.

runs-on: ubuntu-latest # Specifies the operating system for the deployment job.
steps:
- name: Deploy to GitHub Pages # Deploys the application to GitHub Pages.
id: deployment
uses: actions/deploy-pages@v2 # Specifies the version of the deployment action.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ coverage
*.tsbuildinfo
.env
bun.lockb
package-lock.json
yarn.lock
pnpm-lock.yaml

*storybook.log
test-results
playwright-report
33 changes: 15 additions & 18 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import type {StorybookConfig} from "@storybook/vue3-vite";
import type { StorybookConfig } from "@storybook/vue3-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.stories.ts"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@chromatic-com/storybook",
],
framework: {
name: "@storybook-vue/vue3",
options: {
docgen: "vue-component-meta",
},
},
docs: {
autodocs: "tag",
},
staticDirs: ["../public"],
stories: [ "../stories/**/*.stories.ts" ],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/vue3-vite",
options: {},
},
docs: {},
staticDirs: [ "../public" ],
};
export default config;
2 changes: 1 addition & 1 deletion .storybook/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ addons.setConfig({
theme: create({
base: "dark",
textColor: "white",
appPreviewBg: "#333333",
appPreviewBg: "#0f101d",
brandTitle: "NEI Market Analytics",
brandUrl: "https://bush1d3v-portfolio.vercel.app/",
brandImage: "logo.svg",
Expand Down
16 changes: 13 additions & 3 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const preview: Preview = {
values: [
{
name: "dark",
value: "#333333",
value: "#0f101d",
},
{
name: "light",
Expand All @@ -29,8 +29,18 @@ const preview: Preview = {
],
},
},
tags: ["autodocs"],
decorators: [withActions],
tags: ["autodocs", "autodocs"],
decorators: [
withActions,
(story) => ({
components: {story},
template: `
<div style="display: flex; justify-content: center; align-items: center; width: 50dvw; height: 50dvh;">
<story />
</div>
`,
}),
],
};

export default preview;
6 changes: 6 additions & 0 deletions COMMIT_PATTERN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ PT-BR 🇧🇷
| revert | Commits que revertem alterações anteriores. Eles são usados para desfazer um ou mais commits anteriores que introduziram problemas ou comportamentos indesejados. |
| style | Commits relacionados a melhorias na formatação do código, como ajustes de espaçamento, formatação de código e outros aspectos visuais. Isso ajuda a manter um estilo de código consistente e legível. |
| test | Commits relacionados a testes, como adição de novos testes, correções de testes existentes ou melhorias na infraestrutura de testes. Testes rigorosos são essenciais para garantir que o código funcione corretamente e para evitar regressões. |
| update | Commits relacionados a atualizações gerais que não se enquadram em outras categorias específicas. Atualizações de códigos já existentes e suas funcionalidades. |
| config | Commits relacionados a alterações de configuração no projeto. Isso pode incluir mudanças em arquivos de configuração, ajustes em scripts de build, configurações de ferramentas de desenvolvimento, ou qualquer outra modificação que afete a configuração do ambiente de desenvolvimento ou produção.
| delete | Commits relacionados a exclusão de arquivos ou diretórios. Isso pode incluir mudanças em arquivos ou diretórios que foram excluídos do projeto. |

ENG 🇺🇸
| Category | Description |
Expand All @@ -27,3 +30,6 @@ ENG 🇺🇸
| revert | Commits that revert previous changes. They are used to undo one or more previous commits that introduced problems or unwanted behavior. |
| style | Commits related to improvements in code formatting, such as spacing adjustments, code formatting and other visual aspects. This helps maintain a consistent and readable code style. |
| test | Test-related commits, such as adding new tests, fixing existing tests, or improving the testing infrastructure. Rigorous testing is essential to ensure code works correctly and to avoid regressions. |
| update | Commits related to general updates that do not fit into other specific categories. Updates to existing code and its functionalities. |
| config | Commits related to configuration changes in the project. This can include changes to configuration files, adjustments to build scripts, development tool configurations, or any other modifications that affect the development or production environment configuration. |
| delete | Commits related to file or directory deletion. This may include changes to files or directories that were removed from the project.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ FROM node:20

RUN apt-get update && apt-get install -y \
xdg-utils \
git-all
git-all \
libevent-2.1-7 \
libgstreamer-plugins-bad1.0-0

WORKDIR /app

COPY . .

RUN npm install

EXPOSE 3000
EXPOSE 5173

EXPOSE 6006

EXPOSE 9323

CMD ["npm", "run", "dev"]
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ O **NEI Market Analytics** é um projeto de código aberto projetado para fornec
<img align='center' height='70' width='70' title='Docker' alt='docker' src='https://github.com/devicons/devicon/blob/master/icons/docker/docker-plain.svg' /> &nbsp;
<img align='center' height='60' width='50' title='Vitest' alt='vitest' src='https://github.com/bush1D3v/tsbank_api/assets/133554156/74803ee6-3f6e-4335-9f56-cb887a4285ff' /> &nbsp;&nbsp;
<img align='center' height='54' width='44' title='Storybook-js' alt='storybook-js' src='https://github.com/bush1D3v/my_portfolio/assets/133554156/213c8aa4-ce24-4b30-8e07-dceb476e8589' /> &nbsp;&nbsp;&nbsp;
<img align='center' height='54' width='54' title='Cypress' alt='cypress' src='https://github.com/user-attachments/assets/8eb060a2-57dc-4028-9e6b-9c93644fb545' /> &nbsp;&nbsp;&nbsp;
<img align='center' height='50' width='50' title='VueUse' alt='vueuse' src='https://github.com/user-attachments/assets/c4eb21ad-858d-4f28-a2c7-1dd0c23342c1' /> &nbsp;
<img align='center' height='50' width='50' title='VueUse' alt='vueuse' src='https://github.com/user-attachments/assets/c4eb21ad-858d-4f28-a2c7-1dd0c23342c1' /> &nbsp;&nbsp;
<img align='center' height='50' width='60' title='Playwright' alt='playwright' src='https://github.com/user-attachments/assets/1ce5b208-a75b-48e0-bd5c-e663f4e02302' /> &nbsp;
<img align='center' height='50' width='60' title='Biomejs' alt='biomejs' src='https://github.com/user-attachments/assets/b3d8a249-e17f-4e64-9608-4a4783b7bbc0' /> &nbsp;
<img align='center' height='50' width='50' title='Chromatic' alt='chromatic' src='https://github.com/user-attachments/assets/6edd5832-5db7-4e2a-a8e4-4bbe7b8e7208' /> &nbsp;
</div>
Expand Down Expand Up @@ -77,22 +77,15 @@ bun build
bun test:unit
```

### Executar testes de ponta a ponta com [Cypress](https://www.cypress.io/)
### Executar testes de ponta a ponta com [Playwright](https://playwright.dev/)

```sh
bun test:e2e:dev
bun test:e2e
```

Isso executa os testes de ponta a ponta no servidor de desenvolvimento Vite.
É muito mais rápido do que a compilação de produção.

Mas ainda é recomendado testar a compilação de produção com `test:e2e` antes de implantar (por exemplo, em ambientes de CI):

```sh
bun build
bun test:e2e
```

ENG 🇺🇸

# 📊 Nei Market Analytics
Expand Down Expand Up @@ -123,8 +116,8 @@ The **NEI Market Analytics** is an open-source project designed to provide compr
<img align='center' height='70' width='70' title='Docker' alt='docker' src='https://github.com/devicons/devicon/blob/master/icons/docker/docker-plain.svg' /> &nbsp;
<img align='center' height='54' width='44' title='Vitest' alt='vitest' src='https://github.com/bush1D3v/tsbank_api/assets/133554156/74803ee6-3f6e-4335-9f56-cb887a4285ff' /> &nbsp;&nbsp;
<img align='center' height='54' width='44' title='Storybook-js' alt='storybook-js' src='https://github.com/bush1D3v/my_portfolio/assets/133554156/213c8aa4-ce24-4b30-8e07-dceb476e8589' /> &nbsp;&nbsp;&nbsp;
<img align='center' height='54' width='54' title='Cypress' alt='cypress' src='https://github.com/user-attachments/assets/8eb060a2-57dc-4028-9e6b-9c93644fb545' /> &nbsp;&nbsp;&nbsp;
<img align='center' height='50' width='50' title='VueUse' alt='vueuse' src='https://github.com/user-attachments/assets/c4eb21ad-858d-4f28-a2c7-1dd0c23342c1' /> &nbsp;
<img align='center' height='50' width='50' title='VueUse' alt='vueuse' src='https://github.com/user-attachments/assets/c4eb21ad-858d-4f28-a2c7-1dd0c23342c1' /> &nbsp;&nbsp;
<img align='center' height='50' width='60' title='Playwright' alt='playwright' src='https://github.com/user-attachments/assets/1ce5b208-a75b-48e0-bd5c-e663f4e02302' /> &nbsp;
<img align='center' height='50' width='60' title='Biomejs' alt='biomejs' src='https://github.com/user-attachments/assets/b3d8a249-e17f-4e64-9608-4a4783b7bbc0' /> &nbsp;
<img align='center' height='50' width='50' title='Chromatic' alt='chromatic' src='https://github.com/user-attachments/assets/6edd5832-5db7-4e2a-a8e4-4bbe7b8e7208' /> &nbsp;
</div>
Expand Down Expand Up @@ -173,18 +166,8 @@ bun build
bun test:unit
```

### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
### Run E2E Tests with [Playwright](https://playwright.dev/)

```sh
bun test:e2e:dev
```

This runs the end-to-end tests against the Vite development server.
It is much faster than the production build.

But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):

```sh
bun build
bun test:e2e
```
5 changes: 5 additions & 0 deletions chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"onlyChanged": true,
"projectId": "Project:66e0e7399fb56c0cbb1451d2",
"zip": true
}
32 changes: 16 additions & 16 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "new-york",
"typescript": true,
"tsConfigPath": "./tsconfig.json",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/css/main.css",
"baseColor": "stone",
"cssVariables": true
},
"framework": "vite",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
"$schema": "https://shadcn-vue.com/schema.json",
"style": "new-york",
"typescript": true,
"tsConfigPath": "./tsconfig.json",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/css/main.css",
"baseColor": "stone",
"cssVariables": true
},
"framework": "vite",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
8 changes: 0 additions & 8 deletions cypress.config.ts

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/e2e/example.cy.ts

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/e2e/tsconfig.json

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

Loading
Loading