mirror of
https://github.com/marcogll/gloria_app.git
synced 2026-03-15 11:24:43 +00:00
feat: Complete Sprints 3 & 4 - Email, Reschedule, OCR, Upload, Contact Forms
Sprint 3 - Crisis y Agenda (100%): - Implement SMTP email service with nodemailer - Create email templates (reschedule, daily agenda, course inquiry) - Add appointment reschedule functionality with modal - Add Google Calendar updateEvent function - Create scheduled job for daily agenda email at 10 PM - Add manual trigger endpoint for testing Sprint 4 - Pagos y Roles (100%): - Add Payment proof upload with OCR (tesseract.js, pdf-parse) - Extract data from proofs (amount, date, reference, sender, bank) - Create PaymentUpload component with drag & drop - Add course contact form to /cursos page - Update Services button to navigate to /servicios - Add Reschedule button to Assistant and Therapist dashboards - Add PaymentUpload component to Assistant dashboard - Add eventId field to Appointment model - Add OCR-extracted fields to Payment model - Update Prisma schema and generate client - Create API endpoints for reschedule, upload-proof, courses contact - Create manual trigger endpoint for daily agenda job - Initialize daily agenda job in layout.tsx Dependencies added: - nodemailer, node-cron, tesseract.js, sharp, pdf-parse, @types/nodemailer Files created/modified: - src/infrastructure/email/smtp.ts - src/lib/email/templates/* - src/jobs/send-daily-agenda.ts - src/app/api/calendar/reschedule/route.ts - src/app/api/payments/upload-proof/route.ts - src/app/api/contact/courses/route.ts - src/app/api/jobs/trigger-agenda/route.ts - src/components/dashboard/RescheduleModal.tsx - src/components/dashboard/PaymentUpload.tsx - src/components/forms/CourseContactForm.tsx - src/app/dashboard/asistente/page.tsx (updated) - src/app/dashboard/terapeuta/page.tsx (updated) - src/app/cursos/page.tsx (updated) - src/components/layout/Services.tsx (updated) - src/infrastructure/external/calendar.ts (updated) - src/app/layout.tsx (updated) - prisma/schema.prisma (updated) - src/lib/validations.ts (updated) - src/lib/env.ts (updated) Tests: - TypeScript typecheck: No errors - ESLint: Only warnings (img tags, react-hooks) - Production build: Successful Documentation: - Updated CHANGELOG.md with Sprint 3/4 changes - Updated PROGRESS.md with 100% completion status - Updated TASKS.md with completed tasks
This commit is contained in:
83
README.md
83
README.md
@@ -31,7 +31,8 @@ El proyecto sigue una arquitectura de **Monolito Modular**, manteniendo simplici
|
||||
|
||||
* Next.js 14 (App Router)
|
||||
* Tailwind CSS
|
||||
* Radix UI
|
||||
* Shadcn/ui (Radix UI based)
|
||||
* TypeScript 5.x
|
||||
|
||||
**Backend**
|
||||
|
||||
@@ -58,6 +59,12 @@ El proyecto sigue una arquitectura de **Monolito Modular**, manteniendo simplici
|
||||
* Docker Compose
|
||||
* Hostinger VPS
|
||||
|
||||
**Development**
|
||||
|
||||
* Node.js 22.x
|
||||
* pnpm (package manager)
|
||||
* ESLint + Prettier
|
||||
|
||||
---
|
||||
|
||||
## 📂 Estructura de Carpetas
|
||||
@@ -88,7 +95,8 @@ El proyecto sigue una arquitectura de **Monolito Modular**, manteniendo simplici
|
||||
|
||||
### Prerrequisitos
|
||||
|
||||
* Node.js 18+
|
||||
* Node.js 22.x
|
||||
* pnpm (instalar con `npm install -g pnpm`)
|
||||
* Docker & Docker Compose
|
||||
* Instancia activa de Evolution API
|
||||
|
||||
@@ -103,7 +111,13 @@ git clone https://github.com/usuario/gloria-platform.git
|
||||
cd gloria-platform
|
||||
```
|
||||
|
||||
#### 2. Variables de Entorno
|
||||
#### 2. Instalar Dependencias
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
#### 3. Variables de Entorno
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
@@ -111,34 +125,51 @@ cp .env.example .env
|
||||
|
||||
Configurar valores en `.env`.
|
||||
|
||||
#### 3. Levantar Redis
|
||||
#### 4. Levantar Redis
|
||||
|
||||
```bash
|
||||
docker-compose up -d redis
|
||||
docker compose up -d redis
|
||||
```
|
||||
|
||||
#### 4. Base de Datos
|
||||
#### 5. Base de Datos
|
||||
|
||||
```bash
|
||||
npx prisma db push
|
||||
pnpm prisma db push
|
||||
```
|
||||
|
||||
#### 5. Ejecutar en Desarrollo
|
||||
#### 6. Ejecutar en Desarrollo
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
El servidor estará disponible en http://localhost:3000
|
||||
|
||||
#### 7. Build de Producción
|
||||
|
||||
```bash
|
||||
pnpm build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Variables de Entorno
|
||||
|
||||
| Variable | Descripción |
|
||||
| ------------------ | --------------------------- |
|
||||
| DATABASE_URL | Ruta a la base SQLite |
|
||||
| REDIS_URL | Conexión Redis |
|
||||
| EVOLUTION_API_KEY | Token WhatsApp API |
|
||||
| Variable | Descripción |
|
||||
| --- | --- |
|
||||
| NODE_ENV | Environment (development/production) |
|
||||
| DATABASE_URL | Ruta a la base SQLite |
|
||||
| REDIS_URL | Conexión Redis |
|
||||
| NEXTAUTH_SECRET | Secret para NextAuth |
|
||||
| EVOLUTION_API_URL | URL de Evolution API |
|
||||
| EVOLUTION_API_KEY | Token de WhatsApp API |
|
||||
| EVOLUTION_INSTANCE_ID | ID de instancia WhatsApp |
|
||||
| GOOGLE_CALENDAR_ID | ID del calendario principal |
|
||||
| GOOGLE_CLIENT_ID | Client ID Google OAuth |
|
||||
| GOOGLE_CLIENT_SECRET | Client Secret Google OAuth |
|
||||
| WHATSAPP_PHONE_NUMBER | Número de WhatsApp de Gloria |
|
||||
|
||||
Ver `.env.example` para todas las variables disponibles.
|
||||
|
||||
---
|
||||
|
||||
@@ -161,6 +192,30 @@ npm run dev
|
||||
|
||||
---
|
||||
|
||||
## 📚 Scripts Disponibles
|
||||
|
||||
```bash
|
||||
pnpm dev # Inicia servidor de desarrollo
|
||||
pnpm build # Build de producción
|
||||
pnpm start # Inicia servidor de producción
|
||||
pnpm lint # Ejecuta ESLint
|
||||
pnpm typecheck # Ejecuta TypeScript checker
|
||||
pnpm prisma:studio # Abre Prisma Studio
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 Estado del Proyecto
|
||||
|
||||
Ver progreso detallado en:
|
||||
- **[PROGRESS.md](./PROGRESS.md)** - Seguimiento por Sprint
|
||||
- **[TASKS.md](./TASKS.md)** - Plan de ejecución
|
||||
- **[CHANGELOG.md](./CHANGELOG.md)** - Historial de cambios
|
||||
|
||||
**Estado Actual:** Sprint 1 - Cimientos e Infraestructura 🚧 En Progreso
|
||||
|
||||
---
|
||||
|
||||
## 🚢 Despliegue en Producción (Hostinger VPS)
|
||||
|
||||
Usar configuración optimizada:
|
||||
|
||||
Reference in New Issue
Block a user