| """ | |
| ContextFlow Research - Flask Application Factory | |
| """ | |
| from flask import Flask | |
| from flask_cors import CORS | |
| def create_app(): | |
| """Create and configure the Flask application.""" | |
| app = Flask(__name__) | |
| CORS(app) | |
| app.config['SECRET_KEY'] = 'contextflow-research-secret-2024' | |
| app.config['JSON_SORT_KEYS'] = False | |
| from app.api.main import api as api_blueprint | |
| app.register_blueprint(api_blueprint, url_prefix='/api') | |
| def index(): | |
| return { | |
| 'name': 'ContextFlow Research API', | |
| 'version': '1.0.0', | |
| 'status': 'running', | |
| 'endpoints': { | |
| 'health': '/api/health', | |
| 'session': '/api/session/*', | |
| 'predict': '/api/predict/*', | |
| 'behavior': '/api/behavior/*', | |
| 'graph': '/api/graph/*', | |
| 'review': '/api/review/*', | |
| 'peer': '/api/peer/*', | |
| 'gesture': '/api/gesture/*' | |
| } | |
| } | |
| return app | |
| __version__ = "1.0.0" | |