A comprehensive real-time economic monitoring system built on Austrian School economic theory principles.
The Austrian Business Cycle Monitor is now fully operational with modern React + TypeScript frontend!
- β Professional Dashboard: 6 chart types, 8 real-time KPI cards, interactive tooltips
- β Immersive Features: AI situation analysis, Austrian theory integration, source verification
- β Production Stack: Flask backend + React 19 frontend, fully tested
- β Comprehensive Docs: Complete guides, Austrian economics education, API reference
π Quick Start | Project History | Documentation Index
New to the project? Check out our Quick Start Guide for detailed setup instructions!
- Python 3.11+
- Node.js 18+ and npm
- A FRED API key (free): https://fred.stlouisfed.org/
The current stack is Flask (backend/API) + React/Vite (frontend). The Flask app serves the built frontend directly from packages/frontend/dist.
-
Install Python dependencies
pip install -r requirements.txt
-
Build the frontend
cd packages/frontend npm install npm run build cd ../..
-
Set your FRED API key (PowerShell example)
$env:FRED_API_KEY = "YOUR_FRED_API_KEY"
-
Run the dashboard (Flask)
python apps/dashboard/webapp.py
-
Open the app
- Dashboard: http://127.0.0.1:5002
- Health: http://127.0.0.1:5002/api/health
- Status: http://127.0.0.1:5002/api/status
- NEW: Data manifest (verifiability): http://127.0.0.1:5002/api/data-manifest
Every metric comes with provenance records linking to primary sources (FRED series, BIS stats, etc.). Check the following endpoints:
/api/explanationsβ Detailed explanations and clickable sources for each metric/api/analysisβ Analysis results with embeddedprovenancefields mapping metrics to source series/api/three-pillarsβ Three-pillars data withprovenancefor monetary, credit, and real economy metrics/api/data-manifestβ Schema and provenance summary for all endpoints
-
Clone the repository
git clone https://github.com/yourusername/austrian-business-cycle-monitor.git cd austrian-business-cycle-monitor -
Set up virtual environment
python -m venv .venv # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env and add your FRED API key from https://fred.stlouisfed.org/ -
Run the application (current entry point)
# Build frontend (one time or when UI changes) cd packages/frontend && npm install && npm run build && cd ../.. # Run Flask dashboard python apps/dashboard/webapp.py
-
Open your browser Navigate to http://127.0.0.1:5002
Note: The Docker section in older docs was removed during cleanup. If you want a containerized deploy (e.g., Google Cloud Run), we can add a minimal Dockerfile on request.
You have three good deployment pathsβchoose based on your needs:
- Host the built frontend (
packages/frontend/dist) on GitHub Pages, Netlify, or Vercel - Host the Flask API on a platform like Render, Railway, Fly.io, or a small VPS
- Set the frontend to call your API by configuring
VITE_API_URL
Steps:
- Deploy frontend (static):
- GitHub Pages: publish
packages/frontend/dist(may needbasein Vite if using a repo path) - Netlify: drag-and-drop
dist/or connect repo, build:npm run build, publish:packages/frontend/dist
- GitHub Pages: publish
- Deploy backend:
- Render/Railway: new Python web service
- Start command example:
gunicorn -k gevent -w 1 -b 0.0.0.0:$PORT 'apps.dashboard.webapp:create_app()'
- Set env vars:
FRED_API_KEY,SECRET_KEY
- Point the frontend to backend:
- Build with:
VITE_API_URL=https://your-api.example.com npm run build
- Build with:
- Frontend on Firebase Hosting (
.web.app) - Backend on Google Cloud Run (container or buildpack)
- Use Firebase Hosting rewrites to proxy
/apito Cloud Run, so your app is entirely under.web.app
Sample firebase.json:
{
"hosting": {
"public": "packages/frontend/dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{ "source": "/api/**", "run": { "serviceId": "abcm-backend", "region": "us-central1" } },
{ "source": "**", "destination": "/index.html" }
]
}
}Cloud Run start command example (websockets optional):
gunicorn -k gevent -w 1 -b 0.0.0.0:$PORT 'apps.dashboard.webapp:create_app()'- Any VM (AWS Lightsail/EC2, DigitalOcean, etc.)
- Install Python + Node, build frontend, run Flask systemd service
- Or run via Docker/Cloud Run (we can add a Dockerfile if you prefer)
WebSockets/SocketIO: The app uses Flask-SocketIO with
threadingby default. Most platforms work fine for REST polling. For true websockets at scale, prefergevent/eventletworkers.
- Austrian Business Cycle Theory implementation
- FRED API integration for official U.S. economic data
- Three Pillars Risk Framework for comprehensive risk assessment
- Malinvestment detection algorithms
- Bitcoin price tracking with Austrian monetary theory analysis
- Gold price monitoring as traditional store of value
- Inflation and monetary policy impact assessment
- Real-time updates via WebSocket technology
- Professional Bootstrap interface with responsive design
- Interactive charts and risk indicators
- Austrian economics education integrated throughout
- Business cycle theory explanations
- Credit expansion analysis
- Sound money principles
- Economic indicator interpretations from Austrian perspective
This monitor implements core Austrian School economic principles:
- Praxeology: Human action as the foundation of economic analysis
- Subjective Theory of Value: Individual preferences drive economic decisions
- Austrian Business Cycle Theory: Credit expansion creates artificial booms and inevitable busts
- Sound Money: Gold and Bitcoin as alternatives to fiat currency
- Free Market Capitalism: Voluntary exchange and minimal government intervention
- Austrian Economics: 0 to Hero Guide - Complete learning path from beginner to expert
- Austrian Quick Reference - Quick lookup for key concepts
- Web Dashboard Guide - Dashboard features and usage
- Quick Start Guide - Get up and running in 5 minutes
- Project History - Complete feature timeline and achievements
- Documentation Index - Full documentation catalog
- Frontend README - React + TypeScript architecture
- Features Guide - Component library and visual design system
- Data Fetching Strategy - API integration patterns
- Verifiability Layer - Provenance and source tracking
- Security Guidelines - Secrets management and best practices
- Flask - Web framework
- Flask-SocketIO - Real-time communication
- FRED API - Federal Reserve economic data
- Pandas/NumPy - Data processing
- Bootstrap 5 - Professional UI framework
- Chart.js - Interactive charts
- WebSocket - Real-time updates
- Responsive design - Mobile-friendly
- Federal Reserve Economic Data (FRED) - Official U.S. economic statistics
- Cryptocurrency APIs - Bitcoin price and network data
- Precious metals APIs - Gold and silver prices
- Credit Risk Indicators - Corporate spreads and risk premiums
- Market Volatility - VIX and bond market stress
- Structural Indicators - Economic distortions and imbalances
- Bitcoin - Digital sound money with Austrian analysis
- Gold - Traditional store of value and inflation hedge
- Real-time updates with confidence intervals
- Business cycle phase detection (Expansion, Peak, Contraction, Trough)
- Risk assessment based on Austrian indicators
- Educational insights explaining current economic conditions
Set up a local virtual environment and install both runtime and development dependencies. The repo includes a .vscode/settings.json that points VS Code to this venv and enables pytest.
- Create and select the workspace venv
python -m venv .venv ; .\.venv\Scripts\python.exe -m pip install --upgrade pip- Install dependencies (runtime + dev tools)
.\.venv\Scripts\python.exe -m pip install -r requirements.txt ; \
.\.venv\Scripts\python.exe -m pip install -r dev-requirements.txt- Run tests
.\.venv\Scripts\python.exe -m pytest -qNotes:
- VS Code should auto-detect
.venvvia the workspace settings. If not, use the interpreter picker and select.venv. - Dev tools include
pytest,black, andruffaligned withpyproject.toml. - If you use PowerShell profiles, you can add an alias to shorten
.venvcommands.
austrian-business-cycle-monitor/
βββ launchers/ # Application entry points
βββ apps/ # Core application modules
β βββ dashboard/ # Web dashboard
β βββ core/ # Austrian economics engine
βββ config/ # Configuration management
βββ templates/ # HTML templates
βββ static/ # CSS, JS, images
βββ src/ # Utility modules
β βββ utils/ # Data utilities
β βββ indicators/ # Economic indicators
βββ data/ # Cache and logs
Use pytest (the test suite lives in the tests/ directory):
pytest -qKey tested surfaces:
- Core Austrian cycle monitor logic
- REST API endpoints (
/api/status,/api/current-data,/api/analysis,/api/market-data,/api/three-pillars,/api/bitcoin-price) - Metadata & schema (
/api/meta,/api/openapi.json) - Package / template integrity
- Service metadata:
GET /api/meta - Minimal OpenAPI-style spec:
GET /api/openapi.json(Use this to bootstrap client integrations.)
Generate an up-to-date manifest of every file & folder (counts, sizes, language breakdown):
python tools/file_manifest.pyOutputs:
docs/REPO_MANIFEST.md(human-readable summary)docs/manifest.json(machine-readable for automation)
The canonical version lives in apps/version.py (exported also as apps.__version__).
Automated drift test: tests/test_version.py.
Use the helper:
python tools/bump_version.py patchValid bump parts: major | minor | patch (supports --dry-run).
FRED_API_KEY- Your FRED API key (required for real data)LOG_LEVEL- Logging level (default: INFO)HOST- Server host (default: 127.0.0.1)PORT- Server port (default: 5002)
The system monitors dozens of economic indicators including:
- Federal funds rate and yield curves
- Credit spreads and risk premiums
- Money supply growth (M1, M2)
- Government debt levels
- Commodity prices
- Stock market valuations
- Real estate metrics
Built-in Austrian economics education includes:
- Interactive explanations of business cycle theory
- Historical examples of Austrian predictions
- Recommended reading from Austrian economists
- Real-time application of Austrian principles
We welcome contributions! Please read our contributing guidelines and:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Ludwig von Mises Institute - Austrian economics research and education
- Federal Reserve Bank of St. Louis - FRED API for economic data
- Austrian School economists - Theoretical foundation
- Open source community - Tools and libraries
- Issues: Use GitHub Issues for bug reports and feature requests
- Discussions: Join our discussions for questions and ideas
- Documentation: See our wiki for detailed documentation
Built with β€οΈ for Austrian School economics education and sound economic analysis