HISPATEC

Full-Stack Ecosystem Architecture

v1.0 · 4,078 lines · 14 tables · 9 MCP tools · 10 API modules
10
API Modules
14
DB Tables
9
MCP Tools
6
Regions
5
Math Models
10
Gov. Roles
4
Membership Tiers
UI
Frontend Layer
Static HTML + Vanilla JS · JWT in localStorage · ES/EN toggle
API
Express API — /hispatec/api/*
  • hispatec-authJWT
  • hispatec-membersCRUD
  • hispatec-matchingAI
  • hispatec-projectsLifecycle
  • hispatec-exchangeRFQ
  • hispatec-paymentsStripe
  • hispatec-metricsMath
  • hispatec-mcp9 tools
  • hispatec-adminRBAC
  • hispatec (router)Hub
->
Data Flow Paths
Browser --> Express /hispatec/api --> PostgreSQL
Claude Agent --> MCP /tools/call --> Math Engine --> DB
Member --> POST /match --> Cosine Sim --> Gini Fix --> Results
Payment --> Stripe API --> Transactions --> Escrow / Sub
AI
MCP Orchestrator — 9 AI Tools
match_members
evaluate_project
calc_gini
calc_trust
find_opportunities
optimize_allocation
risk_montecarlo
gen_report
network_value
fx
Mathematical Models — hispatec-math.js (713 lines)
Equity & Fairness
Gini Coefficient · Regional correction factors
Member Matching
9D cosine similarity · Weighted profile vectors
Trust Engine
PageRank-style propagation · d=0.85 · 50 iter
Risk Analysis
Monte Carlo 10K sims · Triangular distributions
HCI (HISPATEC Composite Index)
Equity 20% + Trust 20% + Network 20% + Projects 25% + Activation 15% · Target: 0.65
K
Auth & Governance
JWT (7d) · bcrypt 12 rounds · 4 access tiers
DB
PostgreSQL — 14 Tables
members
regions
projects
project_members
matches
trust_references
trust_scores
transactions
companies
rfqs
rfq_responses
opportunities
events
network_metrics
All prefixed hispatec_ · Raw SQL via Sequelize · SSL required
$
External Services
G
6 Global Regions
Norteamerica
Centroamerica y Caribe
Andina
Cono Sur
Peninsula Iberica
Africa y Filipinas
Rotating HQ every 3 years · Regional president/secretary/treasurer
P
Project Lifecycle — 6 Phases
Propuesta --> Analisis --> Equipo --> Recursos --> Ejecucion --> Completado
Draft by proposer Monte Carlo eval AI team matching Stripe escrow Active execution Results & close
M
Membership Tiers & Pricing
Fundador
Cimiento Estrategico
Invitation Only
Numerario
Motor Operativo
$25/mo
Protector
Soporte e Inversion
$100/mo
Patrono
Experiencia y Valor
$200/mo