Skip to content
Closed

Develop #1736

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6ea198d
feat: implementación inicial de la plataforma inmobiliaria
Cod3Genius Jun 9, 2025
f88b0e1
initial configuration project
Cod3Genius Jun 9, 2025
a664c77
feat: configure database with SQLModel and update main app initializa…
Cod3Genius Jun 9, 2025
97cfaf7
feat: configure database with SQLModel
Cod3Genius Jun 9, 2025
5d3fdec
docker configuration
Cod3Genius Jun 10, 2025
a1c6a11
complete tasks
Cod3Genius Jun 11, 2025
c5a0450
feature: nueva presentacion de genius industries
Cod3Genius Jul 1, 2025
6ae8358
🚀 feat: configuracion completa Dokploy con usuario CEO y limpieza arc…
Cod3Genius Jul 2, 2025
35ad95b
fix footer
Cod3Genius Jul 2, 2025
eef54e3
🚀 Sistema completo listo para Dokploy
Cod3Genius Jul 2, 2025
4920d71
🔧 Fix Dockerfile.dokploy - Versión simplificada para Dokploy
Cod3Genius Jul 2, 2025
12f7d71
🧹 LIMPIEZA COMPLETA - Solo archivos originales esenciales
Cod3Genius Jul 2, 2025
c5a490e
📚 RESTAURAR DOCUMENTOS ESENCIALES
Cod3Genius Jul 2, 2025
c15b38e
🔧 CORREGIR ERROR DOCKERFILE DOKPLOY
Cod3Genius Jul 3, 2025
f7cd243
🔧 DOCKERFILE AUTOCONTENIDO FINAL - SIN DEPENDENCIAS EXTERNAS
Cod3Genius Jul 3, 2025
66e2b20
🔧 CORREGIR ERROR CLERK - Agregar VITE_CLERK_PUBLISHABLE_KEY
Cod3Genius Jul 3, 2025
2c5de4c
🔧 Fix Dokploy build errors and frontend syntax issues
Cod3Genius Jul 3, 2025
144f50b
🔧 Fix TypeScript build errors and update backend to use UV
Cod3Genius Jul 3, 2025
b7439dd
🔧 Fix UV hatchling build configuration and Dockerfile order
Cod3Genius Jul 3, 2025
ce3d32d
🚀 Docker Unificado para Dokploy
Cod3Genius Jul 3, 2025
65489be
🧹 Limpiar repositorio para Dokploy
Cod3Genius Jul 3, 2025
275e5f5
dark mode migration
Cod3Genius Jul 10, 2025
c391a3c
fix: saving changes
Cod3Genius Jul 11, 2025
2939db6
saving changes
Cod3Genius Jul 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .cursor-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"description": "Desarrollo guiado para Genius Industries con reglas específicas de arquitectura y organización",
"rules": [
{
"title": "📦 Estructura del Proyecto",
"content": "Backend: `api/routes` (endpoints por dominio), `services` (lógica de negocio), `models.py` (modelos Pydantic), `core` (configuración). Frontend: `client` (API clients por dominio), `components` (UI por dominio), `routes` (páginas por dominio), `hooks` (hooks por dominio), `theme` (estilos Chakra UI), `utils` (utilidades por dominio)."
},
{
"title": "🧩 Flujo de Comunicación",
"content": "Siempre seguir Frontend → Backend → Nhost. Nhost → Backend → Frontend. No escribir directamente en Nhost desde frontend excepto para Realtime. Usar la arquitectura de 3 capas estrictamente."
},
{
"title": "🛠️ Backend - Tecnologías",
"content": "Usar solo Pydantic (❌ NO ORM como SQLAlchemy/Tortoise). FastAPI para endpoints. Async/await para operaciones asíncronas. Validación con Pydantic. Logging apropiado. Manejo consistente de errores. Gestión de dependencias con `uv`."
},
{
"title": "🎨 Frontend - Tecnologías",
"content": "React con TypeScript. Chakra UI para estilos (mantener theme/ y theme.tsx). React Query para estado y caché. Lazy loading para rutas. Error boundaries. Componentes atómicos. Gestión de dependencias con `npm`."
},
{
"title": "👥 Sistema de Roles",
"content": "Roles: CEO (acceso total), Gerente (gestión sucursal), Supervisor (gestión agentes), HR (gestión empleados), Support (atención cliente), Agentes (propiedades/clientes). Implementar guardias de ruta, middleware de roles, validación de permisos en endpoints, UI adaptativa por rol."
},
{
"title": "📁 Organización por Dominio",
"content": "Cada módulo debe tener su propia carpeta con todos sus archivos relacionados. Backend: routes/[dominio].py, services/[dominio].py. Frontend: components/[Dominio]/, hooks/use[Dominio].ts, client/[dominio]Api.ts. Mantener separación de responsabilidades clara."
},
{
"title": "🧼 Buenas Prácticas",
"content": "Código limpio y modular. Nombres en inglés. No duplicar lógica entre capas. No mezclar UI con lógica de negocio. Documentar funciones públicas. Usar TypeScript estricto. Implementar error handling. Mantener estructura consistente."
},
{
"title": "⚡ Comandos de Desarrollo",
"content": "Backend: `uv add [package]` (instalar), `uv sync` (sincronizar), `.venv\\Scripts\\activate` (activar). Frontend: `npm install` (instalar), `npm run dev` (desarrollo), `npm run build` (producción). Usar estos comandos exclusivamente."
},
{
"title": "🚫 Prohibiciones Estrictas",
"content": "❌ NO usar ORMs en backend. ❌ NO acceder directamente a Nhost desde frontend (excepto Realtime). ❌ NO crear carpetas fuera del estándar. ❌ NO mezclar capas (UI/lógica/datos). ❌ NO duplicar código entre módulos. ❌ NO ignorar tipado TypeScript. ❌ NO omitir manejo de errores."
},
{
"title": "🔒 Seguridad y Permisos",
"content": "Implementar middleware de autenticación. Validar permisos en cada endpoint. Configurar políticas RLS por rol. Auditoría de acciones. Logging de cambios. Guardias de ruta en frontend. Componentes condicionales por rol. Validación de acciones por rol."
}
],
"additional_context": {
"project_type": "Full-stack real estate management platform",
"auth_provider": "Clerk",
"database": "PostgreSQL + Nhost",
"styling": "Chakra UI",
"state_management": "React Query",
"build_tools": {
"backend": "uv (Python package manager)",
"frontend": "npm + Vite"
},
"key_domains": [
"authentication",
"properties",
"clients",
"transactions",
"analytics",
"legal",
"hr",
"support"
]
}
}
1 change: 1 addition & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.env
230 changes: 230 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
# ==============================================================================
# .dockerignore - GENIUS INDUSTRIES
# Optimizado para Dockerfile unificado
# ==============================================================================

# Git
.git
.gitignore
.gitattributes

# Documentation
*.md
docs/
img/

# Development
.vscode/
.cursor/
*.log

# Environment files
.env*
!.env.example

# Backend Python
backend/.venv/
backend/__pycache__/
backend/.pytest_cache/
backend/.coverage
backend/*.pyc
backend/*.pyo
backend/*.pyd
backend/.Python
backend/build/
backend/develop-eggs/
backend/dist/
backend/downloads/
backend/eggs/
backend/.eggs/
backend/lib/
backend/lib64/
backend/parts/
backend/sdist/
backend/var/
backend/wheels/
backend/*.egg-info/
backend/.installed.cfg
backend/*.egg

# Frontend Node
frontend/node_modules/
frontend/.next/
frontend/out/
frontend/build/
frontend/dist/
frontend/.cache/
frontend/.parcel-cache/
frontend/.vite/
frontend/.turbo/

# Frontend development
frontend/.env.local
frontend/.env.development.local
frontend/.env.test.local
frontend/.env.production.local
frontend/npm-debug.log*
frontend/yarn-debug.log*
frontend/yarn-error.log*

# Testing
coverage/
.nyc_output/
.coverage
htmlcov/
.tox/
.nox/
.pytest_cache/
tests/__pycache__/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Docker
docker-compose.yml
docker-compose.*.yml
Dockerfile.dev

# Scripts
scripts/
hooks/
copier.yml

# Temporary files
*.tmp
*.temp
.tmp/
.temp/

# Nginx (ya no necesario)
nginx/
docker/

# Docker files
**/Dockerfile*
**/docker-compose*
**/.dockerignore

# Development files
**/.env.local
**/.env.development
**/.env.test
**/README.md
**/CHANGELOG.md
**/*.md

# IDE and editors
**/.vscode
**/.idea
**/*.swp
**/*.swo
**/*~

# Logs
**/logs
**/*.log
**/npm-debug.log*
**/yarn-debug.log*
**/yarn-error.log*
**/lerna-debug.log*

# Runtime data
**/pids
**/*.pid
**/*.seed
**/*.pid.lock

# Coverage directory used by tools like istanbul
**/coverage
**/.nyc_output

# Dependency directories
**/node_modules/
**/.npm
**/.yarn/cache
**/.yarn/unplugged
**/.yarn/build-state.yml
**/.yarn/install-state.gz
**/.pnp.*

# Backend specific
backend/.venv/
backend/__pycache__/
backend/**/*.pyc
backend/**/*.pyo
backend/**/*.pyd
backend/**/__pycache__/
backend/**/*.so
backend/.pytest_cache/
backend/.coverage
backend/htmlcov/
backend/.tox/
backend/.cache
backend/nosetests.xml
backend/coverage.xml
backend/*.cover
backend/.hypothesis/
backend/.pytest_cache/

# Frontend specific
frontend/node_modules/
frontend/.next/
frontend/out/
frontend/build/
frontend/dist/
frontend/.cache/
frontend/.parcel-cache/
frontend/.nuxt/
frontend/.vuepress/dist/
frontend/.serverless/
frontend/.fusebox/
frontend/.dynamodb/

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Temporary files
**/tmp/
**/temp/
**/*.tmp
**/*.temp

# Test files (keep only essential ones)
**/test_*
**/tests_*
**/*_test.py
**/*_test.ts
**/*_test.js

# Documentation
**/docs/
**/*.md

# Include essential scripts
!scripts/*.sh
!scripts/supervisord.conf
!scripts/start-dokploy.sh
!backend/pyproject.toml
!backend/uv.lock
!backend/alembic.ini
!frontend/package.json
!frontend/package-lock.json
70 changes: 55 additions & 15 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,73 @@ FRONTEND_HOST=http://localhost:5173
# Environment: local, staging, production
ENVIRONMENT=local

PROJECT_NAME="Full Stack FastAPI Project"
STACK_NAME=full-stack-fastapi-project
# Project Info
PROJECT_NAME="Genius Industries"
STACK_NAME=genius-industries-dev
VERSION=1.0.0
API_V1_STR=/api/v1

# Backend
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com"
SECRET_KEY=changethis
[email protected]
FIRST_SUPERUSER_PASSWORD=changethis
BACKEND_CORS_ORIGINS=http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,https://geniusindustries.org,https://api.geniusindustries.org
SECRET_KEY=dev-secret-key-change-in-production
ACCESS_TOKEN_EXPIRE_MINUTES=11520 # 8 days

# 🚀 LOCAL DEVELOPMENT - PostgreSQL Local Docker Container

# LOCAL PostgreSQL Configuration (DEVELOPMENT)
DATABASE_URL=postgresql://postgres:[email protected]:5432/genius_dev?sslmode=enable

# Postgres Individual Settings (LOCAL)
POSTGRES_SERVER=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_DB=genius_dev
POSTGRES_USER=postgres
POSTGRES_PASSWORD=KhloeMF0911$

# CONNECTION POOLING (LOCAL DEVELOPMENT)
POSTGRES_POOL_SIZE=5
POSTGRES_MAX_OVERFLOW=10
POSTGRES_POOL_TIMEOUT=30
POSTGRES_POOL_RECYCLE=3600

# Clerk Configuration (DEVELOPMENT)
CLERK_SECRET_KEY=sk_test_Ac9CFXrXjuYrzrO6tqiUbhF6cs8rWP3qAjFhPPiIej
CLERK_PUBLISHABLE_KEY=pk_test_Y3V0ZS1yYXR0bGVyLTU5LmNsZXJrLmFjY291bnRzLmRldiQ
VITE_CLERK_PUBLISHABLE_KEY=pk_test_Y3V0ZS1yYXR0bGVyLTU5LmNsZXJrLmFjY291bnRzLmRldiQ
CLERK_WEBHOOK_SECRET=whsec_2SJfIN5+fw5mgOkFWfi8n6PF5p07WNla

# Emails
SMTP_HOST=
SMTP_USER=
SMTP_PASSWORD=
[email protected]
[email protected]
EMAILS_FROM_NAME=Genius Industries
SMTP_TLS=True
SMTP_SSL=False
SMTP_PORT=587
EMAIL_RESET_TOKEN_EXPIRE_HOURS=48
[email protected]

# Postgres
POSTGRES_SERVER=localhost
POSTGRES_PORT=5432
POSTGRES_DB=app
POSTGRES_USER=postgres
POSTGRES_PASSWORD=changethis
# Storage
STORAGE_BUCKET=genius-storage

# Logging
LOG_LEVEL=DEBUG
LOG_FORMAT=json

# Feature Flags
ENABLE_DOCS=true
ENABLE_TEST_ROUTE=true

# Sentry
SENTRY_DSN=

# Configure these with your own Docker registry images
DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_FRONTEND=frontend
DOCKER_IMAGE_BACKEND=genius-backend
DOCKER_IMAGE_FRONTEND=genius-frontend

# CEO User Configuration
[email protected]
CEO_USER_PASSWORD=GeniusCEO2025!
[email protected]
VITE_CLERK_PUBLISHABLE_KEY=pk_test_Y3V0ZS1yYXR0bGVyLTU5LmNsZXJrLmFjY291bnRzLmRldiQ
Loading
Loading