diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..ec2b712 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,33 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' + +export default [ + { ignores: ['dist'] }, + { + files: ['**/*.{js,jsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + parserOptions: { + ecmaVersion: 'latest', + ecmaFeatures: { jsx: true }, + sourceType: 'module', + }, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...js.configs.recommended.rules, + ...reactHooks.configs.recommended.rules, + 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +] diff --git a/index.html b/index.html new file mode 100644 index 0000000..dc7116a --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Huertos de Cine + + +
+ + + diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..30e99a0 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } + }, + "include": ["src"] + } \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..c8e96a6 --- /dev/null +++ b/package.json @@ -0,0 +1,46 @@ +{ + "name": "cineapolis-garden", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@fortawesome/fontawesome-free": "^6.7.2", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/free-regular-svg-icons": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", + "@fortawesome/react-fontawesome": "^0.2.2", + "axios": "^1.9.0", + "bootstrap": "^5.3.5", + "date-fns": "^2.30.0", + "dompurify": "^3.2.5", + "file-saver": "^2.0.5", + "framer-motion": "^12.16.0", + "react": "^19.1.0", + "react-bootstrap": "^2.10.10", + "react-dom": "^19.1.0", + "react-router-dom": "^7.1.5", + "react-simple-wysiwyg": "^3.2.2", + "react-slick": "^0.30.3", + "react-split": "^2.0.14", + "slick-carousel": "^1.8.1", + "vite-plugin-clean": "^2.0.1" + }, + "devDependencies": { + "@eslint/js": "^9.25.0", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.2", + "@vitejs/plugin-react": "^4.4.1", + "eslint": "^9.25.0", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.19", + "globals": "^16.0.0", + "vite": "^6.3.5" + } +} diff --git a/public/config/settings.dev.json b/public/config/settings.dev.json new file mode 100644 index 0000000..8db1dd4 --- /dev/null +++ b/public/config/settings.dev.json @@ -0,0 +1,47 @@ +{ + "apiConfig": { + "baseUrl": "https://api.miarma.net/cine/v1", + "baseRawUrl": "https://api.miarma.net/cine/raw/v1", + "coreUrl": "https://api.miarma.net/v1", + "coreRawUrl": "https://api.miarma.net/raw/v1", + "authUrl": "https://api.miarma.net/auth/v1", + "endpoints": { + "auth": { + "login": "/login", + "validateToken": "/validate-token", + "refreshToken": "/refresh-token", + "changePassword": "/change-password", + "loginValidate": "/login/validate" + }, + "movies": { + "getAll": "/movies", + "getById": "/movies/:movie_id", + "getVotes": "/movies/:movie_id/votes", + "getVotesSelf": "/movies/:movie_id/votes/self" + }, + "viewers": { + "getAll": "/viewers", + "getById": "/viewers/:viewer_id", + "getVotesByUserAndMovieId": "/viewers/:viewer_id/votes/:movie_id", + "metadata": "/viewers/metadata" + }, + "files": { + "all": "/files", + "byId": "/files/:file_id", + "upload": "/files/upload", + "download": "/files/download/:file_id", + "userFiles": "/files/myfiles" + }, + "users": { + "getAll": "/users", + "getById": "/users/:user_id", + "getStatus": "/users/:user_id/status", + "getRole": "/users/:user_id/role", + "checkExists": "/users/:user_id/exists", + "getAvatar": "/users/:user_id/avatar", + "updateAvatar": "/users/:user_id/avatar", + "getSelfInfo": "/users/me" + } + } + } +} \ No newline at end of file diff --git a/public/config/settings.prod.json b/public/config/settings.prod.json new file mode 100644 index 0000000..8db1dd4 --- /dev/null +++ b/public/config/settings.prod.json @@ -0,0 +1,47 @@ +{ + "apiConfig": { + "baseUrl": "https://api.miarma.net/cine/v1", + "baseRawUrl": "https://api.miarma.net/cine/raw/v1", + "coreUrl": "https://api.miarma.net/v1", + "coreRawUrl": "https://api.miarma.net/raw/v1", + "authUrl": "https://api.miarma.net/auth/v1", + "endpoints": { + "auth": { + "login": "/login", + "validateToken": "/validate-token", + "refreshToken": "/refresh-token", + "changePassword": "/change-password", + "loginValidate": "/login/validate" + }, + "movies": { + "getAll": "/movies", + "getById": "/movies/:movie_id", + "getVotes": "/movies/:movie_id/votes", + "getVotesSelf": "/movies/:movie_id/votes/self" + }, + "viewers": { + "getAll": "/viewers", + "getById": "/viewers/:viewer_id", + "getVotesByUserAndMovieId": "/viewers/:viewer_id/votes/:movie_id", + "metadata": "/viewers/metadata" + }, + "files": { + "all": "/files", + "byId": "/files/:file_id", + "upload": "/files/upload", + "download": "/files/download/:file_id", + "userFiles": "/files/myfiles" + }, + "users": { + "getAll": "/users", + "getById": "/users/:user_id", + "getStatus": "/users/:user_id/status", + "getRole": "/users/:user_id/role", + "checkExists": "/users/:user_id/exists", + "getAvatar": "/users/:user_id/avatar", + "updateAvatar": "/users/:user_id/avatar", + "getSelfInfo": "/users/me" + } + } + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..f280651 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/fonts/OpenSans.ttf b/public/fonts/OpenSans.ttf new file mode 100644 index 0000000..ac587b4 Binary files /dev/null and b/public/fonts/OpenSans.ttf differ diff --git a/public/fonts/ProductSansBold.ttf b/public/fonts/ProductSansBold.ttf new file mode 100644 index 0000000..d847195 Binary files /dev/null and b/public/fonts/ProductSansBold.ttf differ diff --git a/public/fonts/ProductSansBoldItalic.ttf b/public/fonts/ProductSansBoldItalic.ttf new file mode 100644 index 0000000..129d12d Binary files /dev/null and b/public/fonts/ProductSansBoldItalic.ttf differ diff --git a/public/fonts/ProductSansItalic.ttf b/public/fonts/ProductSansItalic.ttf new file mode 100644 index 0000000..5fc56d4 Binary files /dev/null and b/public/fonts/ProductSansItalic.ttf differ diff --git a/public/fonts/ProductSansRegular.ttf b/public/fonts/ProductSansRegular.ttf new file mode 100644 index 0000000..c0442ee Binary files /dev/null and b/public/fonts/ProductSansRegular.ttf differ diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..c23d80b --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,40 @@ +import Header from "@/components/Header"; +import { Route, Routes, Navigate, Link } from 'react-router-dom' +import Login from "@/pages/Login"; +import Votar from "@/pages/Votar"; +import NotFound from "@/pages/NotFound"; +import Footer from "@/components/Footer"; +import ProtectedRoute from "@/components/Auth/ProtectedRoute"; +import { CONSTANTS } from "@/util/constants"; +import FloatingMenu from "@/components/FloatingMenu/FloatingMenu"; +import IfRole from "@/components/Auth/IfRole"; +import Usuarios from "@/pages/Usuarios"; + +const App = () => { + return ( + <> +
+ + } /> + + + + } /> + } /> + + + + } /> + } /> + +