個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
A modern, multilingual, full‑stack ecosystem for humanitarian data management, analytics, and public reporting. Complete Ecosystem: This repository includes the full ecosystem of applications: • 🖥️ Backoffice/Admin Panel: Flask-based backend with comprehensive admin interface for data management • 🌐 Website: Next.js public-facing website for data visualization and reporting • 📱 Mobile App: Native Flutter application for iOS and Android with offline support Together, these components form a complete data ecosystem and data management solution for humanitarian organizations.檢視完整 README ↗
A modern, multilingual, full‑stack ecosystem for humanitarian data management, analytics, and public reporting.
Complete Ecosystem: This repository includes the full ecosystem of applications:
Together, these components form a complete data ecosystem and data management solution for humanitarian organizations.
Test on: https://backoffice-databank.fly.dev/ https://website-databank.fly.dev/
🚀 POWERED BY VIBE CODING 🚀
This project proudly embraces vibe coding — a modern development philosophy that prioritizes rapid iteration, AI-assisted development, and pragmatic problem-solving. Approximately 90% of this codebase was built using this approach, and it's production-ready, battle-tested, and fully functional.
Why vibe coding works:
- ⚡ Speed: Rapid development cycles that deliver working solutions fast
- 🤖 AI-Assisted: Leveraging cutting-edge AI tools for intelligent code generation
- 🎯 Pragmatic: Focus on what works, not just what's conventional
- 🔄 Iterative: Continuous improvement through real-world testing
- 💪 Production-Ready: This isn't a prototype — it's a fully deployed, working system
What you'll find:
- Code that solves real problems efficiently
- Patterns that prioritize functionality and maintainability
- A codebase that proves modern development approaches work at scale
- Documentation that reflects the actual development journey
Join the vibe coding movement — where pragmatism meets innovation, and results speak louder than conventions. 🎨✨
Humanitarian Databank/
├─ Backoffice/
│ ├─ docs/ # Documentation (API, features, setup, migration, translation, indicators)
│ ├─ config/ # Configuration files and setup scripts
│ ├─ docker/ # Docker Compose and related config
│ ├─ scripts/ # Utility and maintenance scripts
│ ├─ tools/ # Dev/debug tools
│ ├─ app/ # Flask application
│ ├─ migrations/ # Database migrations
│ ├─ instance/ # Instance-specific data
│ ├─ (optional) LibreTranslate data via Docker volume
│ └─ uploads/ # File uploads
├─ Website/
│ ├─ pages/ # Next.js pages (router)
│ ├─ components/ # UI components
│ ├─ lib/ # API utilities & helpers
│ ├─ public/ # Static assets & locales
│ ├─ styles/ # Tailwind and global CSS
│ └─ scripts/ # Dev utilities
└─ MobileApp/
├─ lib/ # Flutter application code
│ ├─ config/ # App configuration and routes
│ ├─ models/ # Data models
│ ├─ services/ # API and storage services
│ ├─ providers/ # State management providers
│ ├─ screens/ # UI screens
│ ├─ widgets/ # Reusable widgets
│ └─ utils/ # Utilities and constants
├─ android/ # Android-specific configuration
├─ ios/ # iOS-specific configuration
└─ assets/ # Images, fonts, and other assets
Backoffice/docs/README.mdBackoffice/docs/setup/Backoffice/docs/api/Backoffice/docs/features/Backoffice/docs/indicators/Backoffice/docs/data-migration/Backoffice/docs/translation/MobileApp/README.mdgraph LR
%% User Interface Layer
subgraph "🌐 User Interface Layer"
subgraph "Web Website"
A[Next.js 15 / React 18]
A1[Tailwind CSS]
A2[i18next]
A3[Leaflet Maps]
A4[PDF Generation]
end
subgraph "Mobile App"
A5[Flutter 3.0+]
A6[Native iOS/Android]
A7[Offline Support]
A8[Push Notifications]
end
end
%% API Gateway Layer
subgraph "🔌 API Gateway Layer"
subgraph "Backoffice Services"
B[Flask REST API]
B1[Authentication]
B2[Rate Limiting]
B3[CSRF Protection]
B4[Request Validation]
end
end
%% Data Storage Layer
subgraph "💾 Data Storage Layer"
subgraph "Primary Database"
C[(PostgreSQL)]
C1[User Management]
C2[Form Templates]
C3[Analytics Data]
C4[Multilingual Content]
end
subgraph "Cache Layer"
D1[Session Storage]
D2[API Cache]
D3[Translation Cache]
end
end
%% External Services Layer
subgraph "🌍 External Services Layer"
subgraph "Translation Service"
E[LibreTranslate]
E1[Auto-translation]
E2[Human Review]
end
subgraph "Communication"
F[Email Service]
F1[User Notifications]
F2[System Alerts]
end
end
%% File Management Layer
subgraph "📁 File Management Layer"
subgraph "Storage System"
G[Local Storage]
G1[Documents]
G2[Reports]
G3[Static Assets]
end
end
%% Data Flow Connections
A -->|REST API| B
A -->|Static Assets| G
A5 -->|REST API| B
B -->|ORM Queries| C
B -->|Cache Ops| D
B -->|Translation| E
B -->|Email| F
B -->|File Ops| G
%% Internal Layer Connections
A1 -.->|Styling| A
A2 -.->|Localization| A
A3 -.->|Maps| A
A4 -.->|Reports| A
A6 -.->|Native UI| A5
A7 -.->|Caching| A5
A8 -.->|Firebase| A5
B1 -.->|Security| B
B2 -.->|Performance| B
B3 -.->|Protection| B
B4 -.->|Validation| B
C1 -.->|Users| C
C2 -.->|Forms| C
C3 -.->|Analytics| C
C4 -.->|Translations| C
D1 -.->|Sessions| D
D2 -.->|API Cache| D
D3 -.->|Translation Cache| D
E1 -.->|Auto-translate| E
E2 -.->|Manual Review| E
F1 -.->|User Emails| F
F2 -.->|System Emails| F
G1 -.->|Documents| G
G2 -.->|Reports| G
G3 -.->|Assets| G
%% Styling
classDef frontend fill:#61dafb,stroke:#333,stroke-width:2px,color:#000
classDef backend fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
classDef database fill:#4ecdc4,stroke:#333,stroke-width:2px,color:#000
classDef service fill:#45b7d1,stroke:#333,stroke-width:2px,color:#fff
classDef storage fill:#96ceb4,stroke:#333,stroke-width:2px,color:#000
class A,A1,A2,A3,A4,A5,A6,A7,A8 frontend
class B,B1,B2,B3,B4 backend
class C,C1,C2,C3,C4,D,D1,D2,D3 database
class E,E1,E2,F,F1,F2 service
class G,G1,G2,G3 storage
Web Website (Next.js 15)
Mobile App (Flutter 3.0+)
Backoffice (Flask)
Data Layer
External Integrations
Key Features
The fastest way to get started is using Docker Compose:
# 1. Clone the repository
git clone <repository-url>
cd "Humanitarian Databank"
# 2. Start all services with automatic database initialization
docker-compose up -d
# 3. Verify everything is running
docker-compose ps
# 4. Access the application
# Backoffice API: http://localhost:5000
# Health check: http://localhost:5000/health
The Docker setup automatically:
Backoffice/README.md for setup)See the Docker Setup section for detailed instructions.
Backoffice/README.md for setup)cd Backoffice
pip install -r requirements.txt
# Environment — copy the quickstart example and you're ready to go
# Windows (PowerShell)
Copy-Item env.quickstart.example .env
# macOS/Linux
cp env.quickstart.example .env
# Database setup (REQUIRED)
# Make sure PostgreSQL is running and create the database:
# psql -U postgres -c "CREATE DATABASE hum_databank;"
# psql -U postgres -c "CREATE USER app WITH PASSWORD 'app';"
# psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE hum_databank TO app;"
# Run database migrations
# Windows: $env:FLASK_APP = "run.py"
flask db upgrade
# Seed RBAC roles
flask rbac seed
# Seed test users (creates System Manager, Admin, and Focal Point)
flask seed-test-data
# Run dev server (default http://127.0.0.1:5000)
python run.py
After starting the server, open http://127.0.0.1:5000 and use the quick-login buttons to sign in as System Manager, Admin, or Focal Point (no typing required).
Default test credentials (set in .env via env.quickstart.example):
[email protected] / test123[email protected] / test123[email protected] / test123Helpful npm scripts in Backoffice/package.json (for CSS):
npm run watch:css # watch Tailwind CSS
npm run build:css # build Tailwind CSS
cd Website
npm install
# Website needs the backend URL
# Create .env.local and set:
# For Docker setup:
# NEXT_PUBLIC_API_URL=http://localhost:5000
# For manual setup:
# NEXT_PUBLIC_API_URL=http://127.0.0.1:5000
npm run dev # http://localhost:3000
# or choose another port: npm run dev -- -p 3001
Key scripts in Website/package.json:
npm run dev # start dev server (copies PDF worker automatically)
npm run build # production build
npm run start # start built app
npm run lint # lint
npm run dev:reset # clear cache, reinstall, and restart dev
cd MobileApp
# Install dependencies
flutter pub get
# Configure backend URL (if needed)
# Edit lib/config/app_config.dart and update backendUrl
# Run on connected device or emulator
flutter run
# For iOS (macOS only)
cd ios
pod install
cd ..
flutter run
Prerequisites for Mobile App:
Key Features:
See MobileApp/README.md for detailed mobile app setup instructions.
.env and files in Backoffice/config/POSTGRES_* and SQLAlchemy URIBackoffice/docs/NEXT_PUBLIC_API_URL: base URL of the backend API (defaults to http://127.0.0.1:5000 if unset)DISABLE_FAST_REFRESH=true for certain dev scenarioslib/config/app_config.dart (defaults to http://localhost:5000)MobileApp/README.md)See Backoffice/docs/setup/ and Backoffice/config/README.md for detailed guidance.
Backoffice .env (example):
FLASK_ENV=development
SECRET_KEY=change-me
SQLALCHEMY_DATABASE_URI=postgresql://app:[email protected]:5432/databank
# Optional integrations
LIBRETRANSLATE_URL=http://127.0.0.1:5001
Website .env.local:
NEXT_PUBLIC_API_URL=http://127.0.0.1:5000
DISABLE_FAST_REFRESH=true
The easiest way to get started is using Docker Compose, which sets up the complete stack with automatic database initialization.
# Clone and navigate to the project
cd "Humanitarian Databank"
# Start all services (database, migrations, backoffice, translation service)
docker-compose up -d
# Check service status
docker-compose ps
# View logs
docker-compose logs -f backoffice
# Rebuild and start with clean logs
docker-compose build --no-cache backoffice
Default Postgres database and container names are generic (hum_databank, hum-databank-postgres). Override POSTGRES_DB in compose or your .env if you must keep a legacy database name (e.g. after an existing volume migration).
The docker-compose.yml includes:
PostgreSQL Database (hum-databank-postgres)
hum_databank (override with POSTGRES_DB)app / Password: appFlask Backoffice (databank-backoffice)
# 1. Start the services
docker-compose up -d
# 2. Verify backoffice is running (check logs)
docker-compose logs backoffice
# 4. Access the application
# Backoffice API: http://localhost:5000
# Health check: http://localhost:5000/health
On first startup, the ecosystem automatically creates:
[email protected] (password: test123)[email protected] (password: test123)[email protected] (password: test123)Quick-login buttons appear on the login page in development mode when TEST_ADMIN_PASSWORD, TEST_FOCAL_PASSWORD, and TEST_SYS_MANAGER_PASSWORD are set (Docker Compose sets these to test123 by default).
Note: The default users are created with test password hashes. For production use, you should change the passwords after first login.
Create a .env file in the Backoffice directory to customize:
# Database
POSTGRES_USER=app
POSTGRES_PASSWORD=app
POSTGRES_DB=hum_databank
# Flask
FLASK_CONFIG=production
SECRET_KEY=your-secret-key-here
# Check service status
docker-compose ps
# View specific service logs
docker-compose logs backoffice
# Restart a service
docker-compose restart backoffice
# Rebuild and restart everything
docker-compose down
docker-compose up -d --build
# Reset database (WARNING: deletes all data)
docker-compose down -v
docker-compose up -d
# Run database migrations manually
docker-compose exec backoffice flask db upgrade
# Check migration status
docker-compose exec backoffice flask db current
# Access database directly
docker-compose exec db psql -U app -d hum_databank
Base URL: http://localhost:5000 (Docker) or http://127.0.0.1:5000 (Manual setup)
GET /api/v1/data?api_key=...&template_id=2&per_page=...&period_name=...&indicator_bank_id=...GET /api/v1/resources?api_key=...&page=...&per_page=...&search=...&resource_type=...&language=...GET /api/v1/countrymap?api_key=...GET /api/v1/indicator-bank?api_key=...&search=...&type=...§or=...&sub_sector=...&emergency=...&archived=...GET /api/v1/sectors-subsectors?api_key=...The Humanitarian Databank mobile app provides native iOS and Android access to the ecosystem with comprehensive offline support, real-time notifications, and seamless integration with the backend.
Authentication & Security
Core Functionality
WebView Integration
Offline Support
Performance & Reliability
Internationalization
The mobile app follows a modular architecture:
lib/
├── config/ # App configuration and routes
├── models/ # Data models (User, Assignment, etc.)
├── services/ # API, auth, storage, offline services
├── providers/ # State management (Provider pattern)
├── screens/ # UI screens (public, shared, admin)
├── widgets/ # Reusable widgets
├── utils/ # Utilities and constants
└── l10n/ # Localization strings
State Management: Provider pattern with lazy-loaded admin providers Storage: SQLite for offline cache, Secure Storage for credentials HTTP Client: Custom service with retry logic and interceptors Connectivity: Real-time network monitoring with automatic sync
Android:
# Production APK (connects to fly.dev)
flutter build apk --release --dart-define=PRODUCTION=true
# App Bundle (Google Play Store)
flutter build appbundle --release --dart-define=PRODUCTION=true
iOS:
flutter build ios --release --dart-define=PRODUCTION=true
Environment Configuration:
http://localhost:5000 (backend), http://localhost:3000 (frontend)https://backoffice-databank.fly.dev (backoffice), https://website-databank.fly.dev (website)Quick Start:
cd MobileApp
flutter pub get
# iOS setup (macOS only)
cd ios && pod install && cd ..
# Run app
flutter run # Development (localhost)
flutter run --dart-define=PRODUCTION=true # Production (fly.dev)
Test Credentials:
[email protected] / test123[email protected] / test123[email protected] / test123For detailed setup instructions, architecture documentation, and troubleshooting, see MobileApp/README.md.
We welcome contributions that embrace the vibe coding philosophy — rapid iteration, pragmatic solutions, and AI-assisted development are all encouraged!
For branching, pull requests, branch protection (GitHub / gh), and collaboration conventions, see CONTRIBUTING.md. For security reports see SECURITY.md.
npm run dev:reset in Website/ (see Website/TROUBLESHOOTING.md)..next/ if needed.Proprietary
This ecosystem (backoffice, website, and mobile app components) is proprietary software. Authorized use, redistribution, and modification are defined in LICENSE and any separate agreements with the copyright holder.
Unauthorized use, copying, modification, distribution, or disclosure may be prohibited.
See LICENSE for complete license terms and restrictions.
For licensing inquiries, permissions, or questions about authorized use, please contact: Haytham ALSOUFI: [email protected]