How rodrigo-pacosillo/app-construcci-n- works
Constr-art is a construction-services website with public lead capture, an administrative operations panel, a client portal, and role-aware AI chat. A principal journey is a prospective customer submitting a quote request, staff managing the resulting customer and project records, and clients following their work through the portal. The tree documents these domains, while source excerpts verify selected chat, account, authentication, and data-access relationships. Many page-to-action and portal integrations were not sampled, so those links are marked unverified rather than asserted as direct calls.
Main entry points: route.ts Chat endpoint · (panel) Admin panel · db.ts Application database · (public) Marketing pages
Components 24
Public website
- Marketing pages
src/app/(public) - Quote request
src/app/(public)/cotizacion - Services and projects
src/app/(public)/servicios
Business operations
- Admin panel
src/app/admin/(panel) - Customer records
src/app/admin/(panel)/clientes - Projects and works
src/app/admin/(panel)/obras - Quotes and contracts
src/app/admin/(panel)/cotizaciones - Business modules
src/app/admin/(panel)
Client portal
- Client portal
src/app/cliente - Project and account views
src/app/cliente/proyectos
AI assistant
- Chat interface
src/components/chat/ChatShell.tsx - Chat endpoint
src/app/api/chat/route.ts - AI agents
src/lib/ai/agents.ts - Role-based tools
src/lib/ai/tools/index.ts - Knowledge base
src/lib/ai/conocimiento.ts - Chat sessions
src/lib/ai/sesiones.ts - Client greeting
src/lib/ai/saludos/cliente.ts - Client summary
src/lib/ai/datos/resumenCliente.ts
Shared platform
- Authentication
src/lib/auth.ts - Account completion
src/app/api/completar-cuenta/route.ts - Application database
src/lib/db.ts
Other components
- Prospective customer
- Client
- Chat user
Connections 26
- Prospective customer → Marketing pages: browses
- Marketing pages → Quote request: opens form
- Prospective customer → Quote request: submits request
- Marketing pages → Services and projects: shows offerings
- Admin panel → Customer records: manages customers
- Admin panel → Projects and works: manages works
- Admin panel → Quotes and contracts: manages sales
- Admin panel → Business modules: uses modules
- Client → Client portal: views account
- Client portal → Project and account views: shows project data
- Chat user → Chat interface: opens chat
- Chat interface → Chat endpoint: sends messages
- Chat endpoint → Application database: reads and writes
src/app/api/chat/route.ts - Chat endpoint → Role-based tools: builds tools
src/app/api/chat/route.ts - Chat endpoint → Chat sessions: creates sessions
src/app/api/chat/route.ts - Chat endpoint → Knowledge base: loads knowledge
src/app/api/chat/route.ts - Chat endpoint → Client greeting: builds greeting
src/app/api/chat/route.ts - Chat endpoint → AI agents: selects agent
src/app/api/chat/route.ts - Chat interface → Chat endpoint: renders chat panel
src/components/chat/ChatShell.tsx - Client greeting → Client summary: uses summary
src/lib/ai/saludos/cliente.ts - Client summary → Application database: queries records
src/lib/ai/datos/resumenCliente.ts - Client greeting → Application database: reads client context
- Authentication → Application database: checks credentials
src/lib/auth.ts - Account completion → Application database: creates account
src/app/api/completar-cuenta/route.ts - Authentication → Admin panel: guards access
- Quote request → Quotes and contracts: routes requests