-
Notifications
You must be signed in to change notification settings - Fork 0
Fase 5: rediseño GUI-UX del portal con React + shadcn/ui #16
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,20 @@ FROM node:20-alpine | |
|
|
||
| WORKDIR /app | ||
|
|
||
| # Instalar dependencias primero para aprovechar la caché de capas | ||
| # Backend dependencies | ||
| COPY portal/package*.json ./portal/ | ||
| RUN cd /app/portal && npm ci --omit=dev | ||
|
|
||
| # Copiar todo el repositorio (portal + scripts + configs) | ||
| # Frontend dependencies | ||
| COPY portal/frontend/package*.json ./portal/frontend/ | ||
| RUN cd /app/portal/frontend && npm ci | ||
|
|
||
| # Copy full repo | ||
| COPY . /app | ||
|
|
||
| # Build React SPA into portal/public | ||
| RUN cd /app/portal/frontend && npm run build | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docker copy can clobber frontend modulesMedium Severity Frontend Reviewed by Cursor Bugbot for commit 87f9d55. Configure here. |
||
|
|
||
| WORKDIR /app/portal | ||
|
|
||
| ENV NODE_ENV=production \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": ["react", "typescript", "oxc"], | ||
| "rules": { | ||
| "react/rules-of-hooks": "error", | ||
| "react/only-export-components": ["warn", { "allowConstantExport": true }] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # React + TypeScript + Vite | ||
|
|
||
| This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules. | ||
|
|
||
| Currently, two official plugins are available: | ||
|
|
||
| - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) | ||
| - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) | ||
|
|
||
| ## React Compiler | ||
|
|
||
| The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). | ||
|
|
||
| ## Expanding the Oxlint configuration | ||
|
|
||
| If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": ["react", "typescript", "oxc"], | ||
| "options": { | ||
| "typeAware": true | ||
| }, | ||
| "rules": { | ||
| "react/rules-of-hooks": "error", | ||
| "react/only-export-components": ["warn", { "allowConstantExport": true }] | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "$schema": "https://ui.shadcn.com/schema.json", | ||
| "style": "new-york", | ||
| "rsc": false, | ||
| "tsx": true, | ||
| "tailwind": { | ||
| "config": "", | ||
| "css": "src/index.css", | ||
| "baseColor": "neutral", | ||
| "cssVariables": true, | ||
| "prefix": "" | ||
| }, | ||
| "iconLibrary": "lucide", | ||
| "rtl": false, | ||
| "aliases": { | ||
| "components": "@/components", | ||
| "utils": "@/lib/utils", | ||
| "ui": "@/components/ui", | ||
| "lib": "@/lib", | ||
| "hooks": "@/hooks" | ||
| }, | ||
| "menuColor": "default", | ||
| "menuAccent": "subtle", | ||
| "registries": {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <html lang="es"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>NEUBAT — Instalación desatendida de Arch Linux</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPA tests run without a build
High Severity
Generated
portal/public/index.htmlis gitignored, but the portal Jest job andmake testnever runnpm run build. Requests to/and/adminthereforesendFilea missing shell, so CI fails. The same unbuiltpublic/is what ISO and Ansible copy onto installed machines.Additional Locations (2)
.gitignore#L11-L15portal/tests/app.test.js#L40-L49Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.