diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index f007164..a65b213 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -27,6 +27,7 @@ jobs:
# ============================================================
- name: Log in to GHCR
run: |
+ echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io \
-u "${{ github.actor }}" --password-stdin
diff --git a/README.md b/README.md
index ac600be..7a357c1 100644
--- a/README.md
+++ b/README.md
@@ -1,1014 +1,165 @@
-# ๐ฆ NeuroBank FastAPI Toolkit
+### โก๐ช **GLITCH-TITLE: _Exploit to Karpathy_**
+### **Neiland โข NeuroBank FastAPI Toolkit**
-
-
-
+โโโโโโโ EXPLOIT TO KARPATHY โโโโโโโ
+โโโโโ NEUROBANK FASTAPI TOOLKIT โโโโโ
+โโโโ ARCHITECTURE โข SECURITY โข AI โโโโ
+โโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโ
+โโโ SYSTEMS FOR THE FUTURE โโโ
-### ๐ **Enterprise-Grade Banking Administration Platform**
-### โญ *Production-Ready FastAPI Application with Modern Admin Dashboard*
+Copiar cรณdigo
+INITIALIZING GLITCH-PROTOCOL...
+SIGNAL STABLE...
+LOADING NEUROBANK ENGINE โโโโโโโโ 99%
-
- ๐ฏ Designed specifically to impress Banking Industry Recruiters
- Showcasing Enterprise-Level Python/FastAPI Development Skills
-
+yaml
+Copiar cรณdigo
----
-
-### ๐ **Technical Excellence Badges**
-
-[](https://www.python.org/downloads/)
-[](https://fastapi.tiangolo.com)
-[](./deploy_production.sh)
-[](./docker-compose.prod.yml)
-
-[](https://opensource.org/licenses/MIT)
-[](./app/)
-[](./app/auth/)
-[](./tests/)
-
----
-
-### ๐ช **Quick Access - Start in 30 Seconds!**
-
-
-
-
-
-๐ฎ **[LIVE DEMO](#-live-access-points)**
-*Interactive Dashboard*
-
- |
-
-
-๐ **[API DOCS](#-api-endpoints)**
-*Swagger Interface*
-
- |
-
-
-๐ **[QUICK DEPLOY](#quick-start)**
-*One-Click Setup*
-
- |
-
-
-๐ฑ **[FEATURES](#key-features)**
-*Technical Showcase*
-
- |
-
-
-
----
-
-### ๐จ **Professional Banking Dashboard Preview**
-
-
-
-```
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-โ ๐ฆ NeuroBank Admin Dashboard โ
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
-โ ๐ METRICS ๐ณ TRANSACTIONS ๐ฅ USERS โ
-โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
-โ โ Total: 156 โ โ Pending: 12 โ โ Active: 89 โ โ
-โ โ Volume: $42Kโ โ Failed: 3 โ โ New: 15 โ โ
-โ โ Success:98.7โ โ Success:141 โ โ Blocked: 2 โ โ
-โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
-โ โ
-โ ๐ REAL-TIME CHARTS ๏ฟฝ TRANSACTION SEARCH ๐ QUICK ACTIONS โ
-โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
-โ โ โโโโโโโโโโโโโโ โ โ [Search....... ]โ โ โก Export Data โ โ
-โ โ โโโโโโ โ โ Status: All โผ โ โ ๐ Generate Rpt โ โ
-โ โ โโโโ โ โ Type: All โผ โ โ ๐ Sync System โ โ
-โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-```
-
-**๏ฟฝ Interactive Features:** Real-time Updates โข Advanced Filtering โข Mobile Responsive โข Chart.js Integration
-
-
-
-
- ๐ Enterprise-Level Features:
- Real-time Analytics โข Transaction Management โข User Administration โข Security Layer โข Production Deploy
-
-
----
-
-### โก **30-Second Demo Setup**
-
-```bash
-# ๐ One command to impress recruiters!
-git clone https://github.com/Neiland85/NeuroBank-FastAPI-Toolkit.git
-cd NeuroBank-FastAPI-Toolkit && git checkout develop
-chmod +x deploy_production.sh && ./deploy_production.sh
-
-# ๐ Open browser: http://localhost:8000/backoffice/
-```
-
-
-๐ฏ Perfect for live coding interviews & technical presentations!
---
-### ๐ **Project Statistics**
-
-
-
-| ๐ **Metric** | ๐ฏ **Value** | ๐ก **Impact** |
-|---|---|---|
-| **Lines of Code** | 2,000+ | Professional codebase |
-| **API Endpoints** | 15+ | Comprehensive backend |
-| **UI Components** | 20+ | Modern dashboard |
-| **Docker Ready** | โ
| Production deployment |
-| **Security Layer** | โ
| Banking-grade auth |
-| **Real-time Features** | โ
| Live data updates |
-| **Mobile Responsive** | โ
| Professional UI/UX |
-| **Documentation** | 100% | Enterprise standard |
+# ๐ง About the Project
-
+**NeuroBank FastAPI Toolkit** is a modular, secure, audit-ready backend framework designed for fintech, banking, and critical infrastructure environments. Built with a security-first mindset and industrial-grade CI/CD.
-
+This toolkit isnโt just an API.
+Itโs a **way of building systems**.
---
-## ๐ **Navigation Menu**
-
-
-
-### ๐ฏ **Core Sections**
-[๐ฏ Project Overview](#project-overview) โข [โจ Key Features](#key-features) โข [๐๏ธ Architecture](#architecture) โข [๐ Quick Start](#quick-start)
-
-### ๐ **Technical Details**
-[๐ Live Access Points](#live-access-points) โข [๐ฑ Dashboard Preview](#dashboard-preview) โข [๐ง Technical Stack](#technical-stack) โข [๐ Project Structure](#project-structure)
-
-### ๐ **Deployment & Operations**
-[๐ API Endpoints](#api-endpoints) โข [๐ Production Deployment](#production-deployment) โข [๐งช Testing & Development](#testing--development)
-
-### ๐ **Advanced Topics**
-[๐ Monitoring & Health](#-monitoring--health) โข [๐ Security Features](#-security-features) โข [๐ Performance](#-performance) โข [๐จ UI/UX Design](#-uiux-design)
-
-### ๐ **Resources**
-[๐ Documentation](#-documentation) โข [๐ค Contributing](#-contributing)
-
-
-
----
-
-## ๐ฏ **Project Overview**
-
-
-
-### ๐ **The Ultimate Banking Tech Showcase**
-
-
-
-**NeuroBank FastAPI Toolkit** es una aplicaciรณn bancaria de **nivel empresarial** diseรฑada especรญficamente para **impresionar a reclutadores tรฉcnicos de la industria bancaria**.
-
-๐ช **Este proyecto demuestra:**
-- โ
**Habilidades Python/FastAPI avanzadas** con patrones async/await
-- โ
**Arquitectura de microservicios** production-ready
-- โ
**Dashboard administrativo completo** con UI moderna
-- โ
**Mejores prรกcticas de seguridad** para fintech
-- โ
**DevOps y deployment** automatizado
-- โ
**Testing y monitoreo** profesional
-
-### ๏ฟฝ **ยฟPor quรฉ elegir este proyecto para impresionar?**
-
-
-
-| ๐ฆ **Banking Focus** | ๐ **Tech Excellence** | ๐ผ **Professional Level** |
-|---|---|---|
-| Real banking workflows | Modern FastAPI stack | Enterprise architecture |
-| Financial data handling | Async/await patterns | Production deployment |
-| Security best practices | API documentation | Monitoring & logging |
-| Transaction management | Docker containerization | CI/CD ready |
-
-
-
-### ๐ช **Technical Journey Map**
-
-```mermaid
-graph TD
- A[๐ฏ Objetivo] --> B[Impresionar Reclutadores Bancarios]
- B --> C[Demostrar Habilidades Enterprise]
- B --> D[Showcase Tรฉcnico Completo]
- B --> E[Aplicaciรณn Production-Ready]
-
- C --> C1[๐ง Backend APIs]
- C --> C2[๐จ Frontend Moderno]
- C --> C3[๐ DevOps & Deploy]
- C --> C4[๐ Security Best Practices]
-
- D --> D1[๐ Real-time Dashboard]
- D --> D2[๐ณ Transaction Management]
- D --> D3[๐ฅ User Administration]
- D --> D4[๐ Data Visualization]
-```
-
----
-
-## โจ **Key Features**
-
-
-
-|
-
-### ๐ฆ **Banking Dashboard**
-- โ
Professional banking UI/UX
-- โ
Real-time metrics & analytics
-- โ
Interactive data visualization
-- โ
Mobile-responsive design
-- โ
Modern Bootstrap 5 theme
-
-### ๐ณ **Transaction Management**
-- โ
Advanced filtering & search
-- โ
Pagination & sorting
-- โ
CSV/Excel export functionality
-- โ
Real-time status updates
-- โ
Bulk operations support
-
- |
-
-
-### ๐ง **Technical Excellence**
-- โ
FastAPI async/await patterns
-- โ
Pydantic data validation
-- โ
OpenAPI/Swagger documentation
-- โ
Production-ready architecture
-- โ
Docker containerization
-
-### ๐ **DevOps Ready**
-- โ
Multi-environment deployment
-- โ
Health checks & monitoring
-- โ
Nginx reverse proxy
-- โ
Systemd service integration
-- โ
CI/CD pipeline ready
-
- |
-
-
-
----
-
-## ๐๏ธ **Architecture**
-
-```mermaid
-graph TB
- subgraph "๐ Client Layer"
- UI[๐จ Modern Web UI
Bootstrap 5 + Chart.js]
- Mobile[๐ฑ Responsive Design
Mobile-First]
- end
-
- subgraph "๐ Load Balancer"
- Nginx[๐ Nginx Reverse Proxy
SSL + Security Headers]
- end
-
- subgraph "๐ Application Layer"
- FastAPI[โก FastAPI Backend
Async/Await + Pydantic]
- Jinja[๐ญ Jinja2 Templates
Server-Side Rendering]
- end
-
- subgraph "๐พ Data Layer"
- SQLite[(๐๏ธ SQLite Database
Transaction Data)]
- Mock[๐ฒ Mock Data Generator
Demo Purposes]
- end
-
- subgraph "๐ Monitoring"
- Health[๐ฅ Health Checks]
- Metrics[๐ Metrics API]
- Logs[๐ Structured Logging]
- end
-
- UI --> Nginx
- Mobile --> Nginx
- Nginx --> FastAPI
- FastAPI --> Jinja
- FastAPI --> SQLite
- FastAPI --> Mock
- FastAPI --> Health
- FastAPI --> Metrics
- FastAPI --> Logs
-
- style FastAPI fill:#1e3a8a,stroke:#fff,color:#fff
- style UI fill:#3b82f6,stroke:#fff,color:#fff
- style Nginx fill:#10b981,stroke:#fff,color:#fff
-```
-
----
-
-## ๐ **Quick Start**
-
-### ๐ฎ **Option 1: One-Click Demo** *(Recommended)*
-
-```bash
-# 1. Clone the repository
-git clone https://github.com/Neiland85/NeuroBank-FastAPI-Toolkit.git
-cd NeuroBank-FastAPI-Toolkit
-
-# 2. Switch to develop branch
-git checkout develop
-
-# 3. One-click production deployment
-chmod +x deploy_production.sh
-./deploy_production.sh
-
-# ๐ Done! Access: http://localhost:8000/backoffice/
-```
-
-### ๐ณ **Option 2: Docker** *(Production)*
-
-```bash
-# Quick Docker deployment
-docker-compose -f docker-compose.prod.yml up -d
-
-# Access dashboard: http://localhost:8000/backoffice/
-```
-
-### ๐ **Option 3: Manual Setup** *(Development)*
-
-```bash
-# 1. Install dependencies
-pip install -r requirements.txt
-
-# 2. Start development server
-uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
-
-# 3. Open browser: http://localhost:8000/backoffice/
-```
-
----
-
-## ๐ **Live Access Points**
-
-Una vez que el servidor estรฉ ejecutรกndose, puedes acceder a:
-
-### ๐ฏ **Dashboard Sections**
-
-| ๐ช **Section** | ๐ **URL** | ๐ **Description** | ๐ฏ **File** |
-|---|---|---|---|
-| ๐ **Main Dashboard** | [localhost:8000/backoffice/](http://localhost:8000/backoffice/) | Panel principal con mรฉtricas | [`app/backoffice/router.py:55`](./app/backoffice/router.py#L55) |
-| ๐ณ **Transactions** | [localhost:8000/backoffice/admin/transactions](http://localhost:8000/backoffice/admin/transactions) | Gestiรณn de transacciones | [`app/backoffice/router.py:155`](./app/backoffice/router.py#L155) |
-| ๐ฅ **Users** | [localhost:8000/backoffice/admin/users](http://localhost:8000/backoffice/admin/users) | Administraciรณn de usuarios | [`app/backoffice/router.py:167`](./app/backoffice/router.py#L167) |
-| ๐ **Reports** | [localhost:8000/backoffice/admin/reports](http://localhost:8000/backoffice/admin/reports) | Reportes financieros | [`app/backoffice/router.py:179`](./app/backoffice/router.py#L179) |
-
-### ๐ง **API Endpoints**
-
-| ๐ช **API** | ๐ **URL** | ๐ **Description** | ๐ฏ **File** |
-|---|---|---|---|
-| ๐ **Metrics API** | [localhost:8000/backoffice/api/metrics](http://localhost:8000/backoffice/api/metrics) | Mรฉtricas en tiempo real | [`app/backoffice/router.py:66`](./app/backoffice/router.py#L66) |
-| ๐ **Search API** | [localhost:8000/backoffice/api/transactions/search](http://localhost:8000/backoffice/api/transactions/search) | Bรบsqueda de transacciones | [`app/backoffice/router.py:84`](./app/backoffice/router.py#L84) |
-| ๐ฅ **Health Check** | [localhost:8000/health](http://localhost:8000/health) | Estado del sistema | [`app/main.py:85`](./app/main.py#L85) |
-| ๐ **API Docs** | [localhost:8000/docs](http://localhost:8000/docs) | Swagger UI | *FastAPI Auto-generated* |
-
----
+# ๐ Tech Stack
-## ๐ฑ **Dashboard Preview**
-
-### ๐จ **Modern Banking Interface**
-
-```mermaid
-graph LR
- subgraph "๐ฅ๏ธ Main Dashboard"
- A[๐ Real-time Metrics
- Transactions: 156
- Volume: $42,350
- Success Rate: 98.7%]
- B[๐ Interactive Charts
- Transaction Trends
- Volume Analysis
- Status Distribution]
- C[๐ System Health
- API Status
- Response Time
- Uptime Monitor]
- end
-
- subgraph "๐ณ Transaction Panel"
- D[๐ Advanced Filters
- Status Filter
- Date Range
- Amount Range
- User Search]
- E[๐ Data Table
- Sortable Columns
- Pagination
- Bulk Actions
- Export Options]
- F[๐ฏ Quick Actions
- View Details
- Edit Transaction
- Status Update
- Generate Report]
- end
-
- A --> D
- B --> E
- C --> F
-
- style A fill:#1e3a8a,stroke:#fff,color:#fff
- style D fill:#10b981,stroke:#fff,color:#fff
- style B fill:#3b82f6,stroke:#fff,color:#fff
-```
-
-### ๐ฏ **Key UI Components**
-
-| ๐จ **Component** | ๐ **Template File** | โจ **Features** |
-|---|---|---|
-| **Main Dashboard** | [`app/backoffice/templates/basic_dashboard.html`](./app/backoffice/templates/basic_dashboard.html) | Real-time metrics, animated counters, charts |
-| **Transaction Table** | [`app/backoffice/templates/admin_transactions.html`](./app/backoffice/templates/admin_transactions.html) | Filtering, pagination, export |
-| **Navigation** | *Included in templates* | Responsive menu, breadcrumbs |
-| **Charts & Graphs** | *Chart.js integration* | Interactive data visualization |
+| Layer | Technology |
+|------|------------|
+| API Framework | FastAPI 0.116.x |
+| Runtime | Python **3.11.8** |
+| Config | Pydantic v2 + SettingsConfigDict |
+| Telemetry | Structured logging, startup/shutdown hooks |
+| CI/CD | GitHub Actions: lint, tests, security, docker |
+| Security | CodeQL, Trivy, GitGuardian |
+| Docker | Multi-stage, slim, non-root |
---
-## ๐ง **Technical Stack**
-
-
-
-### **๐๏ธ Backend Architecture**
-
-[](https://fastapi.tiangolo.com/)
-[](https://python.org)
-[](https://pydantic.dev)
-[](https://sqlite.org)
-
-### **๐จ Frontend & UI**
-
-[](https://getbootstrap.com)
-[](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
-[](https://chartjs.org)
-[](https://jinja.palletsprojects.com)
-
-### **๐ DevOps & Deployment**
-
-[](https://docker.com)
-[](https://nginx.org)
-[](https://gunicorn.org)
-
-
-
-### ๐ **Technical Specifications**
+# ๐ก Security-First Architecture
+### โ CodeQL deep analysis
+### โ Trivy container & dependency scanning
+### โ Secret scanning enforcement
+### โ Explicitly documented host binding
```python
-# Core Dependencies - requirements.txt
-fastapi==0.104.1 # โก Modern web framework
-uvicorn[standard]==0.24.0 # ๐ ASGI server
-jinja2==3.1.3 # ๐ญ Template engine
-python-multipart==0.0.9 # ๐ค File upload support
-pydantic==2.5.0 # โ
Data validation
-```
-
-| **๐ง Component** | **๐ Implementation** | **๐ฏ Purpose** |
-|---|---|---|
-| **Main App** | [`app/main.py`](./app/main.py) | FastAPI application setup, middleware, routing |
-| **Dashboard Router** | [`app/backoffice/router.py`](./app/backoffice/router.py) | Admin panel endpoints and business logic |
-| **Templates** | [`app/backoffice/templates/`](./app/backoffice/templates/) | Jinja2 HTML templates with Bootstrap 5 |
-| **Authentication** | [`app/auth/dependencies.py`](./app/auth/dependencies.py) | API key authentication system |
-| **Utilities** | [`app/utils/`](./app/utils/) | Logging, helpers, and common functions |
-
----
-
-## ๐ **Project Structure**
-
-```
-๐ฆ NeuroBank-FastAPI-Toolkit/
-โ
-โโโ ๐ฑ app/ # Main application
-โ โโโ ๐ main.py # FastAPI app configuration
-โ โโโ ๐ auth/ # Authentication system
-โ โ โโโ dependencies.py # API key verification
-โ โโโ ๐ฏ backoffice/ # Admin dashboard
-โ โ โโโ ๐ router.py # Dashboard routes & APIs
-โ โ โโโ ๐จ templates/ # HTML templates
-โ โ โโโ basic_dashboard.html # Main dashboard
-โ โ โโโ admin_transactions.html # Transaction management
-โ โ โโโ dashboard.html # Advanced dashboard
-โ โโโ ๐ routers/ # API routers
-โ โ โโโ operator.py # Banking operations
-โ โโโ ๐ ๏ธ utils/ # Utilities
-โ โโโ logging.py # Structured logging
-โ
-โโโ ๐ deploy_production.sh # One-click deployment
-โโโ ๐ณ docker-compose.prod.yml # Production Docker setup
-โโโ ๐ง start_production.sh # Production startup script
-โโโ โ๏ธ neurobank-fastapi.service # Systemd service
-โโโ ๐ nginx/nginx.conf # Reverse proxy config
-โ
-โโโ ๐ requirements.txt # Python dependencies
-โโโ ๐ README.md # This amazing documentation
-โโโ ๐ PRODUCTION_README.md # Production deployment guide
-โโโ ๐ข VERSION # Semantic versioning
-โ
-โโโ ๐๏ธ data/ # Database & logs
- โโโ app.log # Application logs
-```
-
-### **๐ฏ Key Files Deep Dive**
-
-| **๐ File** | **๐ช Lines** | **๐ฏ Key Functions** | **๐ก Description** |
-|---|---|---|---|
-| [`app/main.py`](./app/main.py) | 241 lines | `create_app()`, CORS setup | Main FastAPI application with middleware |
-| [`app/backoffice/router.py`](./app/backoffice/router.py) | 200+ lines | Dashboard routes, APIs | Complete admin panel backend |
-| [`deploy_production.sh`](./deploy_production.sh) | 300+ lines | Production deployment | Automated deployment script |
-| [`templates/basic_dashboard.html`](./app/backoffice/templates/basic_dashboard.html) | 400+ lines | Dashboard UI | Professional banking interface |
-
----
-
-## ๐ **API Endpoints**
-
-### ๐ **Backoffice Dashboard APIs**
-
-```mermaid
-graph TD
- subgraph "๐ฏ Dashboard Endpoints"
- A[๐ GET /backoffice/] --> A1[๐ Main Dashboard]
- B[๐ณ GET /backoffice/admin/transactions] --> B1[๐ผ Transaction Management]
- C[๐ฅ GET /backoffice/admin/users] --> C1[๐ค User Administration]
- D[๐ GET /backoffice/admin/reports] --> D1[๐ Financial Reports]
- end
-
- subgraph "๐ง Data APIs"
- E[๐ GET /backoffice/api/metrics] --> E1[๐ Real-time Metrics]
- F[๐ GET /backoffice/api/transactions/search] --> F1[๐ Transaction Search]
- G[๐ฅ GET /backoffice/api/system-health] --> G1[โค๏ธ System Health]
- H[โน๏ธ GET /backoffice/info] --> H1[๐ System Information]
- end
-
- style A fill:#1e3a8a,stroke:#fff,color:#fff
- style E fill:#10b981,stroke:#fff,color:#fff
-```
-
-### **๐ฏ Endpoint Details**
-
-
-๐ Dashboard Endpoints
-
-#### **Main Dashboard**
-```http
-GET /backoffice/
-```
-- **File**: [`app/backoffice/router.py:55`](./app/backoffice/router.py#L55)
-- **Template**: [`basic_dashboard.html`](./app/backoffice/templates/basic_dashboard.html)
-- **Features**: Real-time metrics, animated counters, system health
-
-#### **Transaction Management**
-```http
-GET /backoffice/admin/transactions
-```
-- **File**: [`app/backoffice/router.py:155`](./app/backoffice/router.py#L155)
-- **Features**: Advanced filtering, pagination, export functionality
-
-
-
-
-๐ง API Endpoints
-
-#### **Real-time Metrics**
-```http
-GET /backoffice/api/metrics
-```
-- **Response**:
-```json
-{
- "total_transactions": 156,
- "total_volume": 42350.00,
- "active_accounts": 89,
- "success_rate": 98.7,
- "avg_response_time": 67.3,
- "api_calls_today": 642
-}
-```
-
-#### **Transaction Search**
-```http
-GET /backoffice/api/transactions/search?page=1&page_size=20&status=completed
-```
-- **Parameters**: `query`, `status`, `transaction_type`, `page`, `page_size`
-- **Response**: Paginated transaction list with metadata
-
-
-
----
-
-## ๐ **Production Deployment**
-
-### **๐ฏ Deployment Architecture**
-
-```mermaid
-graph TD
- subgraph "โ๏ธ Production Environment"
- LB[๐ Load Balancer
Nginx + SSL]
-
- subgraph "๐ Application Servers"
- APP1[โก FastAPI Instance 1
Gunicorn + Uvicorn]
- APP2[โก FastAPI Instance 2
Gunicorn + Uvicorn]
- APP3[โก FastAPI Instance 3
Gunicorn + Uvicorn]
- end
-
- subgraph "๐พ Data Layer"
- DB[(๐๏ธ SQLite Database)]
- CACHE[(๐ Redis Cache)]
- end
-
- subgraph "๐ Monitoring"
- HEALTH[๐ฅ Health Checks]
- METRICS[๐ Metrics Collection]
- LOGS[๐ Centralized Logging]
- end
- end
-
- LB --> APP1
- LB --> APP2
- LB --> APP3
- APP1 --> DB
- APP2 --> DB
- APP3 --> DB
- APP1 --> CACHE
- APP2 --> CACHE
- APP3 --> CACHE
-
- APP1 --> HEALTH
- APP2 --> METRICS
- APP3 --> LOGS
-
- style LB fill:#10b981,stroke:#fff,color:#fff
- style APP1 fill:#1e3a8a,stroke:#fff,color:#fff
- style APP2 fill:#1e3a8a,stroke:#fff,color:#fff
- style APP3 fill:#1e3a8a,stroke:#fff,color:#fff
-```
-
-### **๐ช Deployment Options**
-
-| **๐ Method** | **โก Command** | **๐ฏ Best For** | **๐ Config File** |
-|---|---|---|---|
-| **๐ณ Docker** | `docker-compose -f docker-compose.prod.yml up -d` | Production | [`docker-compose.prod.yml`](./docker-compose.prod.yml) |
-| **๐ง Direct** | `./start_production.sh` | Development/Testing | [`start_production.sh`](./start_production.sh) |
-| **โ๏ธ Systemd** | `sudo systemctl start neurobank-fastapi` | Linux Servers | [`neurobank-fastapi.service`](./neurobank-fastapi.service) |
-| **๐ฏ One-Click** | `./deploy_production.sh` | Full Setup | [`deploy_production.sh`](./deploy_production.sh) |
-
-### **๐ง Production Configuration**
-
-
-๐ณ Docker Production Setup
-
-```yaml
-# docker-compose.prod.yml
-version: '3.8'
-services:
- neurobank-api:
- build:
- context: .
- dockerfile: Dockerfile.prod
- ports:
- - "8000:8000"
- environment:
- - APP_ENV=production
- - LOG_LEVEL=info
- restart: unless-stopped
-
- nginx:
- image: nginx:alpine
- ports:
- - "80:80"
- - "443:443"
- depends_on:
- - neurobank-api
-```
-
-
-
-
-โ๏ธ Environment Variables
-
-```bash
-# .env.prod - Production Environment
-APP_NAME=NeuroBank FastAPI Toolkit
-APP_VERSION=1.0.0
-ENVIRONMENT=production
-DEBUG=false
-LOG_LEVEL=info
-HOST=0.0.0.0
-PORT=8000
-WORKERS=4
-```
-
-
-
----
-
-## ๐งช **Testing & Development**
-
-### **๐ฌ Running Tests**
-
-```bash
-# Install test dependencies
-pip install pytest pytest-asyncio httpx
-
-# Run all tests
+# nosec B104
+uvicorn.run(app, host="0.0.0.0")
+๐งฌ Config System (Pydantic v2)
+python
+Copiar cรณdigo
+class Settings(BaseSettings):
+ model_config = SettingsConfigDict(
+ env_file=".env",
+ extra="ignore"
+ )
+ app_name: str = "neurobank"
+ environment: str = "local"
+Load order:
+
+Defaults
+
+.env
+
+.env.test (pytest only)
+
+System env
+
+CI overrides
+
+๐ Telemetry Module
+python
+Copiar cรณdigo
+@app.on_event("startup")
+async def startup_telemetry():
+ logger.info("๐ก Telemetry initialized")
+
+@app.on_event("shutdown")
+async def shutdown_telemetry():
+ logger.info("๐ก Telemetry shutdown complete")
+Migration to modern FastAPI lifespan mode is planned.
+
+๐ณ Docker (Secure Multi-Stage)
+dockerfile
+Copiar cรณdigo
+FROM python:3.11-slim AS builder
+...
+
+FROM python:3.11-slim
+USER appuser
+CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0"]
+๐ CI/CD Summary
+Lint
+black
+
+isort
+
+Test
pytest
-# Run with coverage
-pytest --cov=app --cov-report=html
-
-# Run specific test file
-pytest tests/test_backoffice.py -v
-```
-
-### **๐ ๏ธ Development Setup**
-
-```bash
-# 1. Clone and setup
-git clone https://github.com/Neiland85/NeuroBank-FastAPI-Toolkit.git
-cd NeuroBank-FastAPI-Toolkit
-
-# 2. Create virtual environment
-python -m venv venv
-source venv/bin/activate # Linux/Mac
-# venv\Scripts\activate # Windows
-
-# 3. Install dependencies
-pip install -r requirements.txt
-
-# 4. Start development server
-uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
-
-# 5. Open browser
-open http://localhost:8000/backoffice/
-```
-
-### **๐ฏ Development Workflow**
-
-```mermaid
-graph LR
- A[๐จโ๐ป Code Changes] --> B[๐งช Local Testing]
- B --> C[๐ Git Commit]
- C --> D[๐ค Push to Feature Branch]
- D --> E[๐ Pull Request Review]
- E --> F[โ
Merge to Develop]
- F --> G[๐ Deploy to Production]
-
- style A fill:#3b82f6,stroke:#fff,color:#fff
- style G fill:#10b981,stroke:#fff,color:#fff
-```
-
----
-
-## ๐ **Monitoring & Health**
-
-### **๐ฅ Health Check System**
-
-| **๐ Endpoint** | **๐ Metrics** | **๐ฏ Purpose** |
-|---|---|---|
-| [`/health`](http://localhost:8000/health) | System status, uptime, response time | Load balancer health checks |
-| [`/backoffice/api/system-health`](http://localhost:8000/backoffice/api/system-health) | Database, cache, API gateway status | Detailed system monitoring |
-| [`/backoffice/api/metrics`](http://localhost:8000/backoffice/api/metrics) | Business metrics, transaction stats | Real-time dashboard data |
-
-### **๐ Monitoring Dashboard**
-
-```mermaid
-graph TB
- subgraph "๐ Metrics Collection"
- A[โก API Response Times]
- B[๐ณ Transaction Volumes]
- C[๐ฅ Active Users]
- D[๐พ Database Health]
- E[๐ Cache Performance]
- end
-
- subgraph "๐ฏ Monitoring Tools"
- F[๐ Grafana Dashboards]
- G[๐จ Alerting System]
- H[๐ Log Aggregation]
- I[๐ Performance Profiling]
- end
-
- A --> F
- B --> F
- C --> G
- D --> H
- E --> I
-
- style F fill:#1e3a8a,stroke:#fff,color:#fff
- style G fill:#ef4444,stroke:#fff,color:#fff
-```
-
----
-
-## ๐ **Security Features**
-
-### **๐ก๏ธ Security Implementation**
-
-| **๐ Feature** | **๐ Implementation** | **๐ฏ Protection** |
-|---|---|---|
-| **API Key Authentication** | [`app/auth/dependencies.py`](./app/auth/dependencies.py) | Endpoint protection |
-| **CORS Configuration** | [`app/main.py:45`](./app/main.py#L45) | Cross-origin security |
-| **Input Validation** | Pydantic models | Data integrity |
-| **SQL Injection Prevention** | ORM usage | Database security |
-| **Security Headers** | [`nginx/nginx.conf`](./nginx/nginx.conf) | HTTP security |
-
-### **๐ Authentication Flow**
-
-```mermaid
-sequenceDiagram
- participant C as ๐ค Client
- participant A as ๐ Auth Middleware
- participant B as โก Backend API
- participant D as ๐พ Database
-
- C->>A: Request with API Key
- A->>A: Validate API Key
- alt โ
Valid Key
- A->>B: Forward Request
- B->>D: Database Query
- D->>B: Return Data
- B->>C: โ
Success Response
- else โ Invalid Key
- A->>C: โ 401 Unauthorized
- end
-```
-
----
-
-## ๐ **Performance**
-
-### **โก Performance Metrics**
-
-| **๐ฏ Metric** | **๐ Target** | **๐ Current** | **๐ ๏ธ Optimization** |
-|---|---|---|---|
-| **API Response Time** | < 100ms | ~67ms | โ
Async/await patterns |
-| **Database Queries** | < 50ms | ~23ms | โ
Optimized queries |
-| **Page Load Time** | < 2s | ~1.2s | โ
CDN + caching |
-| **Concurrent Users** | 1000+ | Tested 500+ | โ
Async FastAPI |
-| **Memory Usage** | < 512MB | ~180MB | โ
Efficient data structures |
-
-### **๐ Performance Optimizations**
-
-```mermaid
-graph LR
- subgraph "โก Backend Optimizations"
- A[๐ Async/Await
FastAPI + Uvicorn]
- B[๐ Data Validation
Pydantic Models]
- C[๐พ Connection Pooling
Database Optimization]
- end
-
- subgraph "๐จ Frontend Optimizations"
- D[๐ฆ CDN Assets
Bootstrap + Chart.js]
- E[๐๏ธ Minified Code
CSS + JavaScript]
- F[๐ผ๏ธ Lazy Loading
Images + Components]
- end
-
- subgraph "๐ Infrastructure"
- G[๐ Load Balancing
Nginx Proxy]
- H[๐จ Gzip Compression
Static Assets]
- I[โก HTTP/2 Support
Modern Protocol]
- end
-
- A --> D
- B --> E
- C --> F
- D --> G
- E --> H
- F --> I
-
- style A fill:#10b981,stroke:#fff,color:#fff
- style D fill:#3b82f6,stroke:#fff,color:#fff
- style G fill:#1e3a8a,stroke:#fff,color:#fff
-```
-
----
-
-## ๐จ **UI/UX Design**
-
-### **๐ช Design System**
-
-
-
-#### **๐จ Color Palette**
-
-
-
-| **Primary** | **Secondary** | **Success** | **Warning** | **Danger** |
-|-------------|---------------|-------------|-------------|------------|
-|  |  |  |  |  |
-| `#1e3a8a` | `#3b82f6` | `#10b981` | `#f59e0b` | `#ef4444` |
-
-**Banking Theme** โข **Professional Trust** โข **Accessibility Compliant**
-
-
-
-
-
-| **๐จ Component** | **๐ฏ Purpose** | **๐ฑ Responsive** | **โจ Features** |
-|---|---|---|---|
-| **Navigation Bar** | Site navigation | โ
Mobile-first | Collapsible menu, active states |
-| **Metrics Cards** | Key statistics | โ
Grid layout | Animated counters, hover effects |
-| **Data Tables** | Transaction lists | โ
Horizontal scroll | Sorting, filtering, pagination |
-| **Charts & Graphs** | Data visualization | โ
Responsive canvas | Interactive tooltips, zoom |
-| **Forms** | Data input | โ
Validation states | Real-time validation, error messages |
-
-### **๐ฑ Responsive Design**
-
-```mermaid
-graph TD
- subgraph "๐ฑ Mobile (< 768px)"
- A[๐ Stacked Layout
Single Column]
- B[โฐ Hamburger Menu
Collapsible Navigation]
- C[๐ Simplified Charts
Touch-Friendly]
- end
-
- subgraph "๐ป Tablet (768px - 1024px)"
- D[๐ฆ Grid Layout
2-Column Design]
- E[๐ Side Navigation
Expanded Menu]
- F[๐ Full Charts
Interactive Elements]
- end
-
- subgraph "๐ฅ๏ธ Desktop (> 1024px)"
- G[๐ฏ Full Layout
Multi-Column Grid]
- H[๐ช Rich Navigation
All Features Visible]
- I[๐ Advanced Charts
All Interactions]
- end
-
- A --> D --> G
- B --> E --> H
- C --> F --> I
-
- style A fill:#ef4444,stroke:#fff,color:#fff
- style D fill:#f59e0b,stroke:#fff,color:#fff
- style G fill:#10b981,stroke:#fff,color:#fff
-```
-
----
-
-## ๐ **Documentation**
-
-### **๐ Documentation Structure**
-
-| **๐ Document** | **๐ฏ Purpose** | **๐ฅ Audience** |
-|---|---|---|
-| [`README.md`](./README.md) | Project overview & quick start | Developers, Recruiters |
-| [`PRODUCTION_README.md`](./PRODUCTION_README.md) | Production deployment guide | DevOps, Sysadmins |
-| [API Docs](http://localhost:8000/docs) | Interactive API documentation | API Consumers |
-| [Code Comments](./app/) | Inline code documentation | Developers |
-
-### **๐ฏ API Documentation**
-
-The application provides **comprehensive API documentation** through:
-
-- **๐ FastAPI Auto-generated Docs**: [localhost:8000/docs](http://localhost:8000/docs)
-- **๐ ReDoc Interface**: [localhost:8000/redoc](http://localhost:8000/redoc)
-- **๐ OpenAPI Schema**: [localhost:8000/openapi.json](http://localhost:8000/openapi.json)
-
----
+Python 3.11 & 3.12 matrix
-## ๐ค **Contributing**
+Security
+Trivy
-### **๐ฏ Development Workflow**
+GitGuardian
-```bash
-# 1. Fork the repository
-git fork https://github.com/Neiland85/NeuroBank-FastAPI-Toolkit.git
+CodeQL
-# 2. Create feature branch
-git checkout -b feature/amazing-new-feature
+Deploy
+Railway deploy temporarily disabled due to upstream installer issue.
-# 3. Make changes and commit
-git commit -m "โจ Add amazing new feature"
+๐งช Development
+bash
+Copiar cรณdigo
+pyenv local 3.11.8
+python -m venv .venv
+source .venv/bin/activate
-# 4. Push to your fork
-git push origin feature/amazing-new-feature
-
-# 5. Create Pull Request
-# Use the PR templates provided in the repository
-```
-
-### **๐ Code Standards**
-
-| **๐ฏ Standard** | **๐ ๏ธ Tool** | **๐ Config** |
-|---|---|---|
-| **Python Code Style** | Black, isort | `pyproject.toml` |
-| **Type Checking** | mypy | `mypy.ini` |
-| **Linting** | flake8, pylint | `.flake8` |
-| **Testing** | pytest | `pytest.ini` |
-| **Documentation** | Sphinx | `docs/conf.py` |
-
----
-
-
-
-## ๐ **Ready to Impress Banking Recruiters!**
-
-### **๐ Quick Demo Access**
-
-```bash
-git clone https://github.com/Neiland85/NeuroBank-FastAPI-Toolkit.git
-cd NeuroBank-FastAPI-Toolkit
-./deploy_production.sh
-```
-
-**๐ฏ Dashboard**: [http://localhost:8000/backoffice/](http://localhost:8000/backoffice/)
-
----
-
-### **๐ Contact & Links**
-
-[](https://linkedin.com/in/your-profile)
-[](https://github.com/Neiland85)
-[](https://your-portfolio.com)
-
----
-
-**Built with โค๏ธ for Banking Industry Recruitment**
-
-*Showcasing Enterprise-Level Python/FastAPI Development Skills*
-
----
-
-โญ **Star this repository if it helped you!**
+pip install -r requirements.txt
+uvicorn app.main:app --reload
+Tests:
+
+bash
+Copiar cรณdigo
+pytest -q
+Format:
+
+bash
+Copiar cรณdigo
+black app
+isort app
+๐ Project Structure
+arduino
+Copiar cรณdigo
+app/
+โโโ api/
+โโโ core/
+โโโ config.py
+โโโ telemetry.py
+tests/
+.github/workflows/
+Dockerfile
+requirements.txt
+๐งญ Roadmap
+Reintegration of Railway deploy once fixed upstream
+
+FastAPI lifespan migration
+
+OpenAI dossier integration
+
+Expand config/test coverage
+
+โญ Final Note
+This toolkit is built with surgical precision, obsessive correctness, and a hackerโs discipline.
+It isnโt a backend.
+Itโs a statement.
-
NeuroBank-FastAPI-Toolkit
-Seniorโgrade FastAPI microservice blueprint for AIโdriven banking. Pythonโฏ3.10+, Pydanticโฏv2, Docker & AWS stack (Lambda, AppRunner, CloudWatch, XโRay) with CI/CD via GitHubโฏActions. Incluye clean code, tests completos, observabilidad y mรณdulos listos para estado de pedidos, facturaciรณn y analรญtica.
-# Trigger deployment