base structure
This commit is contained in:
commit
50fe5ef848
1 changed files with 110 additions and 0 deletions
110
README.md
Normal file
110
README.md
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# WearLab
|
||||
|
||||
React + Symfony 7 + PostgreSQL + Redis — contenerizado con Docker.
|
||||
|
||||
---
|
||||
|
||||
## Stack
|
||||
|
||||
| Capa | Tecnología |
|
||||
|---|---|
|
||||
| Frontend | React 19, Vite, TypeScript |
|
||||
| Backend | Symfony 7, PHP 8.4 |
|
||||
| Base de datos | PostgreSQL 16 |
|
||||
| Caché | Redis 7 |
|
||||
| Proxy | Nginx |
|
||||
| Containers | Docker + Docker Compose |
|
||||
|
||||
---
|
||||
|
||||
## Estructura del repositorio
|
||||
|
||||
```
|
||||
wearlab/
|
||||
├── frontend/ ← React + Vite + TypeScript
|
||||
│ ├── Dockerfile
|
||||
│ └── src/
|
||||
├── backend/ ← Symfony 7 API
|
||||
│ ├── Dockerfile
|
||||
│ └── src/
|
||||
├── docker/
|
||||
│ └── nginx/
|
||||
│ ├── nginx.dev.conf
|
||||
│ └── nginx.prod.conf
|
||||
├── docs/ ← Arquitectura y documentación
|
||||
├── docker-compose.yml ← Desarrollo local
|
||||
├── .env ← Variables por defecto (no secretos)
|
||||
└── README.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Desarrollo local
|
||||
|
||||
### Requisitos
|
||||
|
||||
- Docker Engine 26+
|
||||
- Docker Compose plugin 2.27+
|
||||
- Git
|
||||
|
||||
> No necesitas PHP ni Node instalados en tu máquina. Todo corre dentro de Docker.
|
||||
|
||||
### Primeros pasos
|
||||
|
||||
```bash
|
||||
cd wearlab
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Servicios disponibles:
|
||||
|
||||
| Servicio | URL |
|
||||
|---|---|
|
||||
| App (frontend + API) | http://localhost:8080 |
|
||||
| Frontend HMR directo | http://localhost:5173 |
|
||||
| PostgreSQL | localhost:5432 |
|
||||
| Redis | localhost:6379 |
|
||||
|
||||
### Migrar la base de datos
|
||||
|
||||
```bash
|
||||
docker compose exec backend php bin/console doctrine:migrations:migrate
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Comandos útiles
|
||||
|
||||
```bash
|
||||
# Ver logs de un servicio
|
||||
docker compose logs -f backend
|
||||
|
||||
# Abrir shell en el backend
|
||||
docker compose exec backend bash
|
||||
|
||||
# Abrir shell en el frontend
|
||||
docker compose exec frontend sh
|
||||
|
||||
# Limpiar caché de Symfony
|
||||
docker compose exec backend php bin/console cache:clear
|
||||
|
||||
# Listar rutas del API
|
||||
docker compose exec backend php bin/console debug:router
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
# Frontend
|
||||
docker compose exec frontend npm run test
|
||||
docker compose exec frontend npm run typecheck
|
||||
|
||||
# Backend
|
||||
docker compose exec backend vendor/bin/phpunit
|
||||
docker compose exec backend vendor/bin/phpstan analyse
|
||||
docker compose exec backend vendor/bin/php-cs-fixer check
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Ver [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) para la guía completa de arquitectura.
|
||||
Loading…
Reference in a new issue