Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kyc-kyb-system/identity-matching-engine/target/
188 changes: 188 additions & 0 deletions customer-portal-full/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# ============================================================================
# Unified Insurance Platform — Environment Variables Reference
# Copy this file to .env and fill in your values
# ============================================================================

# ── Application ──────────────────────────────────────────────────────────────
NODE_ENV=production
PORT=5000
APP_NAME=unified-insurance-platform
APP_URL=https://insurance.example.com

# ── Authentication & OAuth ────────────────────────────────────────────────────
VITE_OAUTH_PORTAL_URL=https://auth.insurance.example.com
VITE_APP_ID=unified-insurance-platform
OAUTH_SERVER_URL=https://auth.insurance.example.com
JWT_SECRET=<generate-with: openssl rand -hex 64>
JWT_EXPIRY=24h
SESSION_SECRET=<generate-with: openssl rand -hex 32>

# ── Database ──────────────────────────────────────────────────────────────────
DATABASE_URL=postgresql://insurance_user:password@localhost:5432/insurance_db
DATABASE_POOL_MIN=2
DATABASE_POOL_MAX=20
DATABASE_SSL=true
# Read replica (for analytics queries)
DATABASE_READ_REPLICA_URL=postgresql://insurance_user:password@replica:5432/insurance_db

# ── Redis Cache ───────────────────────────────────────────────────────────────
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=<your-redis-password>
REDIS_TLS=true
CACHE_TTL_SECONDS=300

# ── Core Microservice URLs ────────────────────────────────────────────────────
POLICY_SERVICE_URL=http://policy-service:8081
CLAIM_SERVICE_URL=http://claims-adjudication:8082
PAYMENT_SERVICE_URL=http://payment-service:8083
CUSTOMER_SERVICE_URL=http://customer-360-service:8084
VERIFICATION_SERVICE_URL=http://kyc-orchestrator:8085
TELCO_SERVICE_URL=http://telco-integration:8010
FRAUD_DATABASE_URL=http://fraud-detection:8020

# ── Extended Microservice URLs ────────────────────────────────────────────────
ACTUARIAL_SERVICE_URL=http://actuarial-module:8091
BANCASSURANCE_SERVICE_URL=http://bancassurance-integration:8092
GROUP_LIFE_SERVICE_URL=http://group-life-admin:8093
NMID_SERVICE_URL=http://nmid-integration:8094
PFA_SERVICE_URL=http://pfa-integration:8095
REINSURANCE_SERVICE_URL=http://reinsurance-management:8096
KYC_SERVICE_URL=http://enhanced-kyc-kyb:8097
ANALYTICS_SERVICE_URL=http://analytics-service:8098
GEOSPATIAL_SERVICE_URL=http://geospatial-service:8099
COMMUNICATION_SERVICE_URL=http://communication-service:8100
DOCUMENT_SERVICE_URL=http://document-management:8101
UNDERWRITING_SERVICE_URL=http://underwriting-service:8102
ERPNEXT_SERVICE_URL=http://erpnext-integration:8103
OPENIMIS_SERVICE_URL=http://openimis-integration:8104
ETHERISC_SERVICE_URL=http://etherisc-gif:8105
MOJALOOP_SERVICE_URL=http://mojaloop-integration:8106
GDPR_SERVICE_URL=http://gdpr-compliance:8107
USSD_SERVICE_URL=http://ussd-gateway:8108

# ── AI / LLM ──────────────────────────────────────────────────────────────────
OPENAI_API_KEY=<your-openai-api-key>
OPENAI_MODEL=gpt-4o
AI_ADVISOR_ENABLED=true
FRAUD_AI_MODEL_ENDPOINT=http://ray-serve:8000/fraud-detection
CHURN_AI_MODEL_ENDPOINT=http://ray-serve:8000/churn-prediction
UNDERWRITING_AI_MODEL_ENDPOINT=http://ray-serve:8000/underwriting-risk

# ── Payment Gateways ──────────────────────────────────────────────────────────
PAYSTACK_SECRET_KEY=sk_live_<your-paystack-secret>
PAYSTACK_PUBLIC_KEY=pk_live_<your-paystack-public>
FLUTTERWAVE_SECRET_KEY=FLWSECK_<your-flutterwave-secret>
FLUTTERWAVE_PUBLIC_KEY=FLWPUBK_<your-flutterwave-public>
INTERSWITCH_CLIENT_ID=<your-interswitch-client-id>
INTERSWITCH_CLIENT_SECRET=<your-interswitch-client-secret>
REMITA_MERCHANT_ID=<your-remita-merchant-id>
REMITA_API_KEY=<your-remita-api-key>

# ── Nigerian Telcos (for credit scoring) ─────────────────────────────────────
MTN_API_KEY=<your-mtn-api-key>
MTN_API_SECRET=<your-mtn-api-secret>
AIRTEL_API_KEY=<your-airtel-api-key>
AIRTEL_API_SECRET=<your-airtel-api-secret>
GLO_API_KEY=<your-glo-api-key>
NINE_MOBILE_API_KEY=<your-9mobile-api-key>

# ── NAICOM & Regulatory ───────────────────────────────────────────────────────
NAICOM_API_KEY=<your-naicom-api-key>
NAICOM_API_URL=https://api.naicom.gov.ng
NMID_API_KEY=<your-nmid-api-key>
NMID_API_URL=https://api.nmid.gov.ng
NIN_VERIFICATION_API_KEY=<your-nin-api-key>
NIN_API_URL=https://api.nimc.gov.ng
BVN_VERIFICATION_API_KEY=<your-bvn-api-key>
BVN_API_URL=https://api.nibss-plc.org.ng
CAC_API_KEY=<your-cac-api-key>

# ── SMS / Email / Push Notifications ─────────────────────────────────────────
TWILIO_ACCOUNT_SID=<your-twilio-account-sid>
TWILIO_AUTH_TOKEN=<your-twilio-auth-token>
TWILIO_PHONE_NUMBER=+1234567890
TERMII_API_KEY=<your-termii-api-key>
SENDGRID_API_KEY=SG.<your-sendgrid-api-key>
EMAIL_FROM=noreply@insurance.example.com
FIREBASE_SERVER_KEY=<your-firebase-server-key>
FIREBASE_PROJECT_ID=<your-firebase-project-id>

# ── WhatsApp Business API ─────────────────────────────────────────────────────
WHATSAPP_API_URL=https://graph.facebook.com/v18.0
WHATSAPP_PHONE_NUMBER_ID=<your-phone-number-id>
WHATSAPP_ACCESS_TOKEN=<your-whatsapp-access-token>
WHATSAPP_VERIFY_TOKEN=<generate-random-string>

# ── Storage ───────────────────────────────────────────────────────────────────
AWS_ACCESS_KEY_ID=<your-aws-access-key>
AWS_SECRET_ACCESS_KEY=<your-aws-secret-key>
AWS_REGION=af-south-1
S3_BUCKET_DOCUMENTS=insurance-documents-prod
S3_BUCKET_CLAIMS=insurance-claims-prod
S3_BUCKET_BACKUPS=insurance-backups-prod
# Or use MinIO for on-premise
MINIO_ENDPOINT=http://minio:9000
MINIO_ACCESS_KEY=<your-minio-access-key>
MINIO_SECRET_KEY=<your-minio-secret-key>

# ── Observability ─────────────────────────────────────────────────────────────
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
OTEL_SERVICE_NAME=customer-portal
JAEGER_ENDPOINT=http://jaeger:14268/api/traces
PROMETHEUS_METRICS_PORT=9090
LOG_LEVEL=info
LOG_FORMAT=json

# ── Security ──────────────────────────────────────────────────────────────────
VAULT_ADDR=http://vault:8200
VAULT_TOKEN=<your-vault-token>
VAULT_ROLE=insurance-platform
ENCRYPTION_KEY=<generate-with: openssl rand -hex 32>
CORS_ORIGINS=https://insurance.example.com,https://admin.insurance.example.com
RATE_LIMIT_MAX=100
RATE_LIMIT_WINDOW_MS=60000

# ── Feature Flags (Unleash) ───────────────────────────────────────────────────
UNLEASH_URL=http://unleash:4242/api
UNLEASH_API_TOKEN=<your-unleash-api-token>
UNLEASH_APP_NAME=insurance-platform
UNLEASH_ENVIRONMENT=production

# ── ERPNext Integration ───────────────────────────────────────────────────────
ERPNEXT_URL=https://erp.insurance.example.com
ERPNEXT_API_KEY=<your-erpnext-api-key>
ERPNEXT_API_SECRET=<your-erpnext-api-secret>

# ── OpenIMIS Integration ──────────────────────────────────────────────────────
OPENIMIS_URL=https://openimis.insurance.example.com
OPENIMIS_USERNAME=<your-openimis-username>
OPENIMIS_PASSWORD=<your-openimis-password>

# ── Etherisc Parametric Insurance ────────────────────────────────────────────
ETHERISC_API_KEY=<your-etherisc-api-key>
ETHERISC_PRODUCT_ID=<your-product-id>
CHAINLINK_NODE_URL=http://chainlink-node:6688
WEATHER_API_KEY=<your-openweathermap-api-key>

# ── Mojaloop Payments ─────────────────────────────────────────────────────────
MOJALOOP_HUB_URL=https://mojaloop.insurance.example.com
MOJALOOP_DFSP_ID=<your-dfsp-id>
MOJALOOP_JWS_KEY=<your-jws-private-key>

# ── Analytics ─────────────────────────────────────────────────────────────────
VITE_ANALYTICS_ENDPOINT=https://analytics.insurance.example.com
VITE_ANALYTICS_WEBSITE_ID=<your-analytics-website-id>
APACHE_PINOT_URL=http://pinot-broker:8099
APACHE_ICEBERG_CATALOG_URL=http://iceberg-rest:8181

# ── Geospatial ────────────────────────────────────────────────────────────────
GOOGLE_MAPS_API_KEY=<your-google-maps-api-key>
MAPBOX_ACCESS_TOKEN=<your-mapbox-token>

# ── Owner / Admin ─────────────────────────────────────────────────────────────
OWNER_OPEN_ID=admin
ADMIN_EMAIL=admin@insurance.example.com

# ── Internal API ─────────────────────────────────────────────────────────────
BUILT_IN_FORGE_API_URL=http://localhost:8080
BUILT_IN_FORGE_API_KEY=<your-forge-api-key>
107 changes: 107 additions & 0 deletions customer-portal-full/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Dependencies
**/node_modules
.pnpm-store/

# Build outputs
dist/
build/
*.dist

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

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

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

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

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

# nyc test coverage
.nyc_output

# Dependency directories
jspm_packages/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

# Database
*.db
*.sqlite
*.sqlite3
Empty file added customer-portal-full/.gitkeep
Empty file.
35 changes: 35 additions & 0 deletions customer-portal-full/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Dependencies
node_modules/
.pnpm-store/

# Build outputs
dist/
build/
*.dist

# Generated files
*.tsbuildinfo
coverage/

# Package files
package-lock.json
pnpm-lock.yaml

# Database
*.db
*.sqlite
*.sqlite3

# Logs
*.log

# Environment files
.env*

# IDE files
.vscode/
.idea/

# OS files
.DS_Store
Thumbs.db
15 changes: 15 additions & 0 deletions customer-portal-full/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "lf",
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"proseWrap": "preserve"
}
Loading