Complete v2.0 transformation: Production-ready Flask application
Major Changes: - Migrated from prototype to production architecture - Implemented modular Flask app with models/services/web layers - Added Docker containerization with docker-compose - Switched to Pipenv for dependency management - Built advanced parser extracting 63 real activities from INDEX_MASTER - Implemented SQLite FTS5 full-text search - Created minimalist, responsive web interface - Added comprehensive documentation and deployment guides Technical Improvements: - Clean separation of concerns (models, services, web) - Enhanced database schema with FTS5 indexing - Dynamic filters populated from real data - Production-ready configuration management - Security best practices implementation - Health monitoring and API endpoints Removed Legacy Files: - Old src/ directory structure - Static requirements.txt (replaced by Pipfile) - Test and debug files - Temporary cache files Current Status: - 63 activities indexed across 8 categories - Full-text search operational - Docker deployment ready - Production documentation complete 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
43
app/config.py
Normal file
43
app/config.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""
|
||||
Configuration settings for INDEX-SISTEM-JOCURI v2.0
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
class Config:
|
||||
"""Base configuration"""
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production'
|
||||
DATABASE_URL = os.environ.get('DATABASE_URL') or 'sqlite:///data/activities.db'
|
||||
|
||||
# Application settings
|
||||
FLASK_ENV = os.environ.get('FLASK_ENV') or 'development'
|
||||
DEBUG = os.environ.get('DEBUG', 'false').lower() == 'true'
|
||||
|
||||
# Data directories
|
||||
BASE_DIR = Path(__file__).parent.parent
|
||||
DATA_DIR = BASE_DIR / 'data'
|
||||
INDEX_MASTER_FILE = DATA_DIR / 'INDEX_MASTER_JOCURI_ACTIVITATI.md'
|
||||
|
||||
# Search settings
|
||||
SEARCH_RESULTS_LIMIT = int(os.environ.get('SEARCH_RESULTS_LIMIT', '100'))
|
||||
FTS_ENABLED = True
|
||||
|
||||
@staticmethod
|
||||
def ensure_directories():
|
||||
"""Ensure required directories exist"""
|
||||
Config.DATA_DIR.mkdir(exist_ok=True)
|
||||
|
||||
class ProductionConfig(Config):
|
||||
"""Production configuration"""
|
||||
DEBUG = False
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY') or 'default-production-key-change-me'
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
"""Development configuration"""
|
||||
DEBUG = True
|
||||
|
||||
class TestingConfig(Config):
|
||||
"""Testing configuration"""
|
||||
TESTING = True
|
||||
DATABASE_URL = 'sqlite:///:memory:'
|
||||
Reference in New Issue
Block a user