From 8c4510bcb0bbffd6be88642ec9fa3495c8a30e62 Mon Sep 17 00:00:00 2001 From: "Darlin Ruben Nina C." Date: Sun, 14 Jan 2024 00:59:25 -0400 Subject: [PATCH] frontend folder --- .dockerignore | 162 ++++++++++++++++++ docker-compose.yml | 35 ++++ frontend/{Quiz_front => }/.eslintrc.cjs | 0 frontend/{Quiz_front => }/.gitignore | 0 frontend/{Quiz_front => }/index.html | 0 frontend/{Quiz_front => }/package-lock.json | 0 frontend/{Quiz_front => }/package.json | 0 frontend/{Quiz_front => }/postcss.config.js | 0 .../{Quiz_front => }/public/img/404-2.png | Bin frontend/{Quiz_front => }/public/img/404.png | Bin frontend/{Quiz_front => }/public/vite.svg | 0 frontend/{Quiz_front => }/src/App.css | 0 frontend/{Quiz_front => }/src/App.tsx | 0 frontend/{Quiz_front => }/src/api/auth.ts | 0 frontend/{Quiz_front => }/src/api/quiz.ts | 0 frontend/{Quiz_front => }/src/app/hooks.ts | 0 frontend/{Quiz_front => }/src/app/store.ts | 0 .../{Quiz_front => }/src/assets/react.svg | 0 frontend/{Quiz_front => }/src/auth/login.tsx | 0 .../{Quiz_front => }/src/auth/register.tsx | 0 .../src/components/OptionForm.tsx | 0 .../src/components/QuestionForm .tsx | 0 .../src/components/QuestionItem.tsx | 0 .../src/components/QuizForm.tsx | 0 .../src/components/header.tsx | 0 .../src/components/loading.tsx | 0 .../src/components/myQuiz.tsx | 0 .../{Quiz_front => }/src/components/quiz.tsx | 0 .../src/components/style/QuestionForm.css | 0 .../src/hooks/useFetchMyUser.tsx | 0 .../src/hooks/useFetchOneQuiz.tsx | 0 .../src/hooks/useFetchQuiz.tsx | 0 .../src/hooks/useFetchRegister.tsx | 0 .../src/hooks/useFetchcreateQuiz.tsx | 0 .../src/hooks/useFetchlogin.tsx | 0 frontend/{Quiz_front => }/src/index.css | 0 .../src/interface/interfaces.ts | 0 frontend/{Quiz_front => }/src/main.tsx | 0 .../{Quiz_front => }/src/pages/dashboard.tsx | 0 .../src/redux/authUser.redux.ts | 0 .../{Quiz_front => }/src/redux/quiz.redux.ts | 0 frontend/{Quiz_front => }/src/routes.tsx | 0 .../src/utils/auth-protect-rutes.tsx | 0 .../src/utils/routes-protect.tsx | 0 .../src/utils/routes-whith-not-fount.tsx | 0 frontend/{Quiz_front => }/src/vite-env.d.ts | 0 frontend/{Quiz_front => }/tailwind.config.js | 0 frontend/{Quiz_front => }/tsconfig.json | 0 frontend/{Quiz_front => }/tsconfig.node.json | 0 frontend/{Quiz_front => }/vite.config.ts | 0 50 files changed, 197 insertions(+) create mode 100644 .dockerignore create mode 100644 docker-compose.yml rename frontend/{Quiz_front => }/.eslintrc.cjs (100%) rename frontend/{Quiz_front => }/.gitignore (100%) rename frontend/{Quiz_front => }/index.html (100%) rename frontend/{Quiz_front => }/package-lock.json (100%) rename frontend/{Quiz_front => }/package.json (100%) rename frontend/{Quiz_front => }/postcss.config.js (100%) rename frontend/{Quiz_front => }/public/img/404-2.png (100%) rename frontend/{Quiz_front => }/public/img/404.png (100%) rename frontend/{Quiz_front => }/public/vite.svg (100%) rename frontend/{Quiz_front => }/src/App.css (100%) rename frontend/{Quiz_front => }/src/App.tsx (100%) rename frontend/{Quiz_front => }/src/api/auth.ts (100%) rename frontend/{Quiz_front => }/src/api/quiz.ts (100%) rename frontend/{Quiz_front => }/src/app/hooks.ts (100%) rename frontend/{Quiz_front => }/src/app/store.ts (100%) rename frontend/{Quiz_front => }/src/assets/react.svg (100%) rename frontend/{Quiz_front => }/src/auth/login.tsx (100%) rename frontend/{Quiz_front => }/src/auth/register.tsx (100%) rename frontend/{Quiz_front => }/src/components/OptionForm.tsx (100%) rename frontend/{Quiz_front => }/src/components/QuestionForm .tsx (100%) rename frontend/{Quiz_front => }/src/components/QuestionItem.tsx (100%) rename frontend/{Quiz_front => }/src/components/QuizForm.tsx (100%) rename frontend/{Quiz_front => }/src/components/header.tsx (100%) rename frontend/{Quiz_front => }/src/components/loading.tsx (100%) rename frontend/{Quiz_front => }/src/components/myQuiz.tsx (100%) rename frontend/{Quiz_front => }/src/components/quiz.tsx (100%) rename frontend/{Quiz_front => }/src/components/style/QuestionForm.css (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchMyUser.tsx (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchOneQuiz.tsx (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchQuiz.tsx (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchRegister.tsx (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchcreateQuiz.tsx (100%) rename frontend/{Quiz_front => }/src/hooks/useFetchlogin.tsx (100%) rename frontend/{Quiz_front => }/src/index.css (100%) rename frontend/{Quiz_front => }/src/interface/interfaces.ts (100%) rename frontend/{Quiz_front => }/src/main.tsx (100%) rename frontend/{Quiz_front => }/src/pages/dashboard.tsx (100%) rename frontend/{Quiz_front => }/src/redux/authUser.redux.ts (100%) rename frontend/{Quiz_front => }/src/redux/quiz.redux.ts (100%) rename frontend/{Quiz_front => }/src/routes.tsx (100%) rename frontend/{Quiz_front => }/src/utils/auth-protect-rutes.tsx (100%) rename frontend/{Quiz_front => }/src/utils/routes-protect.tsx (100%) rename frontend/{Quiz_front => }/src/utils/routes-whith-not-fount.tsx (100%) rename frontend/{Quiz_front => }/src/vite-env.d.ts (100%) rename frontend/{Quiz_front => }/tailwind.config.js (100%) rename frontend/{Quiz_front => }/tsconfig.json (100%) rename frontend/{Quiz_front => }/tsconfig.node.json (100%) rename frontend/{Quiz_front => }/vite.config.ts (100%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3b95b60 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,162 @@ +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,node +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* +/migrations +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +/migrations +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov +/migrations +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d00f2f3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +version: '3' + +services: + # Servicio para el frontend React + frontend: + image: node:14 + working_dir: /app/frontend + volumes: + - ./frontend:/app/frontend + ports: + - "3000" + command: sh -c "npm install && npm run build && npm start" + environment: + CHOKIDAR_USEPOLLING: 'true' + + # Servicio para el backend Express + backend: + image: node:14 + working_dir: /app/backend + volumes: + - ./backend:/app/backend + ports: + - "5000:5000" + command: sh -c "npm install && npm run build && npm start" + + # Servicio para la base de datos PostgreSQL + postgres: + image: postgres:latest + environment: + POSTGRES_DB: mydatabase + POSTGRES_USER: myuser + POSTGRES_PASSWORD: mypassword + ports: + - "5432:5432" + - "5433:5433" diff --git a/frontend/Quiz_front/.eslintrc.cjs b/frontend/.eslintrc.cjs similarity index 100% rename from frontend/Quiz_front/.eslintrc.cjs rename to frontend/.eslintrc.cjs diff --git a/frontend/Quiz_front/.gitignore b/frontend/.gitignore similarity index 100% rename from frontend/Quiz_front/.gitignore rename to frontend/.gitignore diff --git a/frontend/Quiz_front/index.html b/frontend/index.html similarity index 100% rename from frontend/Quiz_front/index.html rename to frontend/index.html diff --git a/frontend/Quiz_front/package-lock.json b/frontend/package-lock.json similarity index 100% rename from frontend/Quiz_front/package-lock.json rename to frontend/package-lock.json diff --git a/frontend/Quiz_front/package.json b/frontend/package.json similarity index 100% rename from frontend/Quiz_front/package.json rename to frontend/package.json diff --git a/frontend/Quiz_front/postcss.config.js b/frontend/postcss.config.js similarity index 100% rename from frontend/Quiz_front/postcss.config.js rename to frontend/postcss.config.js diff --git a/frontend/Quiz_front/public/img/404-2.png b/frontend/public/img/404-2.png similarity index 100% rename from frontend/Quiz_front/public/img/404-2.png rename to frontend/public/img/404-2.png diff --git a/frontend/Quiz_front/public/img/404.png b/frontend/public/img/404.png similarity index 100% rename from frontend/Quiz_front/public/img/404.png rename to frontend/public/img/404.png diff --git a/frontend/Quiz_front/public/vite.svg b/frontend/public/vite.svg similarity index 100% rename from frontend/Quiz_front/public/vite.svg rename to frontend/public/vite.svg diff --git a/frontend/Quiz_front/src/App.css b/frontend/src/App.css similarity index 100% rename from frontend/Quiz_front/src/App.css rename to frontend/src/App.css diff --git a/frontend/Quiz_front/src/App.tsx b/frontend/src/App.tsx similarity index 100% rename from frontend/Quiz_front/src/App.tsx rename to frontend/src/App.tsx diff --git a/frontend/Quiz_front/src/api/auth.ts b/frontend/src/api/auth.ts similarity index 100% rename from frontend/Quiz_front/src/api/auth.ts rename to frontend/src/api/auth.ts diff --git a/frontend/Quiz_front/src/api/quiz.ts b/frontend/src/api/quiz.ts similarity index 100% rename from frontend/Quiz_front/src/api/quiz.ts rename to frontend/src/api/quiz.ts diff --git a/frontend/Quiz_front/src/app/hooks.ts b/frontend/src/app/hooks.ts similarity index 100% rename from frontend/Quiz_front/src/app/hooks.ts rename to frontend/src/app/hooks.ts diff --git a/frontend/Quiz_front/src/app/store.ts b/frontend/src/app/store.ts similarity index 100% rename from frontend/Quiz_front/src/app/store.ts rename to frontend/src/app/store.ts diff --git a/frontend/Quiz_front/src/assets/react.svg b/frontend/src/assets/react.svg similarity index 100% rename from frontend/Quiz_front/src/assets/react.svg rename to frontend/src/assets/react.svg diff --git a/frontend/Quiz_front/src/auth/login.tsx b/frontend/src/auth/login.tsx similarity index 100% rename from frontend/Quiz_front/src/auth/login.tsx rename to frontend/src/auth/login.tsx diff --git a/frontend/Quiz_front/src/auth/register.tsx b/frontend/src/auth/register.tsx similarity index 100% rename from frontend/Quiz_front/src/auth/register.tsx rename to frontend/src/auth/register.tsx diff --git a/frontend/Quiz_front/src/components/OptionForm.tsx b/frontend/src/components/OptionForm.tsx similarity index 100% rename from frontend/Quiz_front/src/components/OptionForm.tsx rename to frontend/src/components/OptionForm.tsx diff --git a/frontend/Quiz_front/src/components/QuestionForm .tsx b/frontend/src/components/QuestionForm .tsx similarity index 100% rename from frontend/Quiz_front/src/components/QuestionForm .tsx rename to frontend/src/components/QuestionForm .tsx diff --git a/frontend/Quiz_front/src/components/QuestionItem.tsx b/frontend/src/components/QuestionItem.tsx similarity index 100% rename from frontend/Quiz_front/src/components/QuestionItem.tsx rename to frontend/src/components/QuestionItem.tsx diff --git a/frontend/Quiz_front/src/components/QuizForm.tsx b/frontend/src/components/QuizForm.tsx similarity index 100% rename from frontend/Quiz_front/src/components/QuizForm.tsx rename to frontend/src/components/QuizForm.tsx diff --git a/frontend/Quiz_front/src/components/header.tsx b/frontend/src/components/header.tsx similarity index 100% rename from frontend/Quiz_front/src/components/header.tsx rename to frontend/src/components/header.tsx diff --git a/frontend/Quiz_front/src/components/loading.tsx b/frontend/src/components/loading.tsx similarity index 100% rename from frontend/Quiz_front/src/components/loading.tsx rename to frontend/src/components/loading.tsx diff --git a/frontend/Quiz_front/src/components/myQuiz.tsx b/frontend/src/components/myQuiz.tsx similarity index 100% rename from frontend/Quiz_front/src/components/myQuiz.tsx rename to frontend/src/components/myQuiz.tsx diff --git a/frontend/Quiz_front/src/components/quiz.tsx b/frontend/src/components/quiz.tsx similarity index 100% rename from frontend/Quiz_front/src/components/quiz.tsx rename to frontend/src/components/quiz.tsx diff --git a/frontend/Quiz_front/src/components/style/QuestionForm.css b/frontend/src/components/style/QuestionForm.css similarity index 100% rename from frontend/Quiz_front/src/components/style/QuestionForm.css rename to frontend/src/components/style/QuestionForm.css diff --git a/frontend/Quiz_front/src/hooks/useFetchMyUser.tsx b/frontend/src/hooks/useFetchMyUser.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchMyUser.tsx rename to frontend/src/hooks/useFetchMyUser.tsx diff --git a/frontend/Quiz_front/src/hooks/useFetchOneQuiz.tsx b/frontend/src/hooks/useFetchOneQuiz.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchOneQuiz.tsx rename to frontend/src/hooks/useFetchOneQuiz.tsx diff --git a/frontend/Quiz_front/src/hooks/useFetchQuiz.tsx b/frontend/src/hooks/useFetchQuiz.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchQuiz.tsx rename to frontend/src/hooks/useFetchQuiz.tsx diff --git a/frontend/Quiz_front/src/hooks/useFetchRegister.tsx b/frontend/src/hooks/useFetchRegister.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchRegister.tsx rename to frontend/src/hooks/useFetchRegister.tsx diff --git a/frontend/Quiz_front/src/hooks/useFetchcreateQuiz.tsx b/frontend/src/hooks/useFetchcreateQuiz.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchcreateQuiz.tsx rename to frontend/src/hooks/useFetchcreateQuiz.tsx diff --git a/frontend/Quiz_front/src/hooks/useFetchlogin.tsx b/frontend/src/hooks/useFetchlogin.tsx similarity index 100% rename from frontend/Quiz_front/src/hooks/useFetchlogin.tsx rename to frontend/src/hooks/useFetchlogin.tsx diff --git a/frontend/Quiz_front/src/index.css b/frontend/src/index.css similarity index 100% rename from frontend/Quiz_front/src/index.css rename to frontend/src/index.css diff --git a/frontend/Quiz_front/src/interface/interfaces.ts b/frontend/src/interface/interfaces.ts similarity index 100% rename from frontend/Quiz_front/src/interface/interfaces.ts rename to frontend/src/interface/interfaces.ts diff --git a/frontend/Quiz_front/src/main.tsx b/frontend/src/main.tsx similarity index 100% rename from frontend/Quiz_front/src/main.tsx rename to frontend/src/main.tsx diff --git a/frontend/Quiz_front/src/pages/dashboard.tsx b/frontend/src/pages/dashboard.tsx similarity index 100% rename from frontend/Quiz_front/src/pages/dashboard.tsx rename to frontend/src/pages/dashboard.tsx diff --git a/frontend/Quiz_front/src/redux/authUser.redux.ts b/frontend/src/redux/authUser.redux.ts similarity index 100% rename from frontend/Quiz_front/src/redux/authUser.redux.ts rename to frontend/src/redux/authUser.redux.ts diff --git a/frontend/Quiz_front/src/redux/quiz.redux.ts b/frontend/src/redux/quiz.redux.ts similarity index 100% rename from frontend/Quiz_front/src/redux/quiz.redux.ts rename to frontend/src/redux/quiz.redux.ts diff --git a/frontend/Quiz_front/src/routes.tsx b/frontend/src/routes.tsx similarity index 100% rename from frontend/Quiz_front/src/routes.tsx rename to frontend/src/routes.tsx diff --git a/frontend/Quiz_front/src/utils/auth-protect-rutes.tsx b/frontend/src/utils/auth-protect-rutes.tsx similarity index 100% rename from frontend/Quiz_front/src/utils/auth-protect-rutes.tsx rename to frontend/src/utils/auth-protect-rutes.tsx diff --git a/frontend/Quiz_front/src/utils/routes-protect.tsx b/frontend/src/utils/routes-protect.tsx similarity index 100% rename from frontend/Quiz_front/src/utils/routes-protect.tsx rename to frontend/src/utils/routes-protect.tsx diff --git a/frontend/Quiz_front/src/utils/routes-whith-not-fount.tsx b/frontend/src/utils/routes-whith-not-fount.tsx similarity index 100% rename from frontend/Quiz_front/src/utils/routes-whith-not-fount.tsx rename to frontend/src/utils/routes-whith-not-fount.tsx diff --git a/frontend/Quiz_front/src/vite-env.d.ts b/frontend/src/vite-env.d.ts similarity index 100% rename from frontend/Quiz_front/src/vite-env.d.ts rename to frontend/src/vite-env.d.ts diff --git a/frontend/Quiz_front/tailwind.config.js b/frontend/tailwind.config.js similarity index 100% rename from frontend/Quiz_front/tailwind.config.js rename to frontend/tailwind.config.js diff --git a/frontend/Quiz_front/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from frontend/Quiz_front/tsconfig.json rename to frontend/tsconfig.json diff --git a/frontend/Quiz_front/tsconfig.node.json b/frontend/tsconfig.node.json similarity index 100% rename from frontend/Quiz_front/tsconfig.node.json rename to frontend/tsconfig.node.json diff --git a/frontend/Quiz_front/vite.config.ts b/frontend/vite.config.ts similarity index 100% rename from frontend/Quiz_front/vite.config.ts rename to frontend/vite.config.ts