07 Estructura del proyecto - UnaiMunoz/Visualist GitHub Wiki

Estructura del proyecto

Front-end

frontend/
β”œβ”€β”€ public/                     # Recursos estΓ‘ticos
β”‚   └── _redirects              # Reglas de redirecciΓ³n de Netlify para SPA
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/             # Componentes reutilizables de React
β”‚   β”‚   β”œβ”€β”€ Carousel.jsx
β”‚   β”‚   β”œβ”€β”€ CarouselItem.jsx
β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”œβ”€β”€ Hero.jsx
β”‚   β”‚   β”œβ”€β”€ Layout.jsx
β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ context/                # GestiΓ³n del estado de autenticaciΓ³n
β”‚   β”‚   └── AuthContext.jsx
β”‚   β”œβ”€β”€ css/                    # Hojas de estilo CSS
β”‚   β”‚   β”œβ”€β”€ index2.css
β”‚   β”‚   β”œβ”€β”€ auth.css
β”‚   β”‚   β”œβ”€β”€ media-detail.css
β”‚   β”‚   β”œβ”€β”€ profile.css
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ pages/                  # PΓ‘ginas principales
β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”œβ”€β”€ Movies.jsx
β”‚   β”‚   β”œβ”€β”€ MovieDetail.jsx
β”‚   β”‚   β”œβ”€β”€ Series.jsx
β”‚   β”‚   β”œβ”€β”€ SeriesDetail.jsx
β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”œβ”€β”€ Register.jsx
β”‚   β”‚   └── Profile.jsx
β”‚   β”œβ”€β”€ services/               # Servicios API
β”‚   β”‚   β”œβ”€β”€ authServices.js
β”‚   β”‚   β”œβ”€β”€ listServices.js
β”‚   β”‚   β”œβ”€β”€ moviesServices.js
β”‚   β”‚   β”œβ”€β”€ seriesServices.js
β”‚   β”‚   └── userServices.js
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ main.jsx
β”‚   └── index.css
└── package.json                # Dependencias y scripts de construcciΓ³n

Back-end

backend/
β”œβ”€β”€ .env.example              # Variables de entorno de ejemplo
β”œβ”€β”€ .htaccess                 # ConfiguraciΓ³n para Apache
β”œβ”€β”€ README.md
β”œβ”€β”€ index.php                 # Punto de entrada del backend
β”œβ”€β”€ api/                      # Endpoints de API organizados por funcionalidad
β”‚   β”œβ”€β”€ auth/                 # Endpoints de autenticaciΓ³n
β”‚   β”‚   β”œβ”€β”€ login.php
β”‚   β”‚   β”œβ”€β”€ logout.php
β”‚   β”‚   β”œβ”€β”€ register.php
β”‚   β”‚   β”œβ”€β”€ session.php
β”‚   β”‚   └── update-profile.php
β”‚   β”œβ”€β”€ lists/                # GestiΓ³n de listas de usuario
β”‚   β”‚   β”œβ”€β”€ add.php
β”‚   β”‚   β”œβ”€β”€ check.php
β”‚   β”‚   β”œβ”€β”€ get-data.php
β”‚   β”‚   β”œβ”€β”€ get.php
β”‚   β”‚   β”œβ”€β”€ remove.php
β”‚   β”‚   └── update-data.php
β”‚   β”œβ”€β”€ movies/               # Endpoints de datos de pelΓ­culas
β”‚   β”‚   β”œβ”€β”€ detail.php
β”‚   β”‚   β”œβ”€β”€ index.php
β”‚   β”‚   β”œβ”€β”€ search.php
β”‚   β”‚   └── top.php
β”‚   └── series/               # Endpoints de datos de series de TV
β”‚       β”œβ”€β”€ detail.php
β”‚       β”œβ”€β”€ index.php
β”‚       β”œβ”€β”€ search.php
β”‚       └── top.php
β”œβ”€β”€ config/                   # ConfiguraciΓ³n
β”‚   └── config.php
└── includes/                 # Clases compartidas y utilidades
    β”œβ”€β”€ Database.php
    β”œβ”€β”€ ListManager.php
    β”œβ”€β”€ TMDBService.php
    └── User.php