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:
2025-09-11 00:23:47 +03:00
parent ed0fc0d010
commit 4f83b8e73c
44 changed files with 6600 additions and 3620 deletions

708
app/static/css/main.css Normal file
View File

@@ -0,0 +1,708 @@
/* INDEX-SISTEM-JOCURI v2.0 - Minimalist Professional Design */
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
line-height: 1.6;
color: #2c3e50;
background-color: #f8f9fa;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Container */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 1rem 0;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.header-title a {
color: white;
text-decoration: none;
font-size: 1.5rem;
font-weight: 600;
}
.header-nav {
display: flex;
gap: 1.5rem;
}
.nav-link {
color: rgba(255, 255, 255, 0.9);
text-decoration: none;
font-weight: 500;
transition: color 0.2s ease;
}
.nav-link:hover {
color: white;
}
/* Main content */
.main {
flex: 1;
padding: 2rem 0;
}
/* Search page styles */
.search-page {
max-width: 800px;
margin: 0 auto;
}
.search-header {
text-align: center;
margin-bottom: 2rem;
}
.search-title {
font-size: 2rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: #2c3e50;
}
.search-subtitle {
color: #6c757d;
font-size: 1.1rem;
}
/* Search form */
.search-form {
background: white;
border-radius: 12px;
padding: 2rem;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
margin-bottom: 2rem;
}
.search-form.compact {
padding: 1rem;
margin-bottom: 1rem;
}
.search-input-group {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
.search-input {
flex: 1;
padding: 0.75rem 1rem;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.2s ease;
}
.search-input:focus {
outline: none;
border-color: #667eea;
}
.search-button {
padding: 0.75rem 1.5rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease;
}
.search-button:hover {
transform: translateY(-1px);
}
/* Filters */
.filters-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-bottom: 1.5rem;
}
.filters-row {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
}
.filter-group {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.filter-label {
font-weight: 600;
color: #495057;
font-size: 0.9rem;
}
.filter-select {
padding: 0.5rem;
border: 2px solid #e9ecef;
border-radius: 6px;
background: white;
font-size: 0.9rem;
transition: border-color 0.2s ease;
}
.filter-select.compact {
padding: 0.4rem;
font-size: 0.85rem;
}
.filter-select:focus {
outline: none;
border-color: #667eea;
}
.search-actions {
display: flex;
gap: 1rem;
justify-content: center;
}
/* Buttons */
.btn {
padding: 0.6rem 1.2rem;
border: none;
border-radius: 6px;
font-weight: 600;
text-decoration: none;
display: inline-block;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.9rem;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-sm {
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Quick stats */
.quick-stats {
background: white;
border-radius: 12px;
padding: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.stats-title {
font-size: 1.1rem;
margin-bottom: 1rem;
color: #2c3e50;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.stat-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem;
background: #f8f9fa;
border-radius: 6px;
}
.stat-label {
font-weight: 500;
color: #495057;
}
.stat-value {
font-weight: 600;
color: #667eea;
}
/* Results page */
.results-header {
margin-bottom: 1.5rem;
}
.results-title {
font-size: 1.5rem;
margin-bottom: 0.5rem;
color: #2c3e50;
}
.results-count {
color: #6c757d;
margin-bottom: 1rem;
}
.applied-filters {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
}
.applied-filters-label {
font-weight: 600;
color: #495057;
margin-right: 0.5rem;
}
.applied-filter {
background: #e9ecef;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.8rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.remove-filter {
color: #dc3545;
text-decoration: none;
font-weight: bold;
}
/* Activity cards */
.results-list {
display: grid;
gap: 1rem;
}
.activity-card {
background: white;
border-radius: 10px;
padding: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.activity-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.activity-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1rem;
}
.activity-title a {
color: #2c3e50;
text-decoration: none;
font-weight: 600;
font-size: 1.1rem;
}
.activity-title a:hover {
color: #667eea;
}
.activity-category {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 15px;
font-size: 0.8rem;
font-weight: 600;
}
.activity-description {
margin-bottom: 1rem;
color: #495057;
line-height: 1.5;
}
.activity-metadata {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
}
.metadata-item {
font-size: 0.85rem;
color: #6c757d;
}
.activity-source {
margin-bottom: 1rem;
}
.activity-source small {
color: #adb5bd;
}
.activity-footer {
border-top: 1px solid #e9ecef;
padding-top: 1rem;
}
/* Activity detail page */
.activity-detail-page {
max-width: 800px;
margin: 0 auto;
}
.breadcrumb {
margin-bottom: 1rem;
color: #6c757d;
}
.breadcrumb a {
color: #667eea;
text-decoration: none;
}
.breadcrumb-separator {
margin: 0 0.5rem;
}
.activity-detail-header {
background: white;
border-radius: 12px;
padding: 2rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.activity-title-section {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.5rem;
}
.activity-detail-title {
font-size: 2rem;
color: #2c3e50;
margin-right: 1rem;
}
.activity-category-badge {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
white-space: nowrap;
}
.activity-subcategory {
color: #6c757d;
font-style: italic;
}
.activity-detail-content {
background: white;
border-radius: 12px;
padding: 2rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.activity-section {
margin-bottom: 2rem;
}
.activity-section:last-child {
margin-bottom: 0;
}
.section-title {
font-size: 1.3rem;
color: #2c3e50;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #f8f9fa;
}
.metadata-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.metadata-card {
background: #f8f9fa;
padding: 1rem;
border-radius: 8px;
}
.metadata-title {
font-size: 0.9rem;
font-weight: 600;
color: #495057;
margin-bottom: 0.5rem;
}
.metadata-value {
color: #2c3e50;
font-weight: 500;
}
.keywords {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.keyword-tag {
background: #e9ecef;
padding: 0.25rem 0.75rem;
border-radius: 15px;
font-size: 0.8rem;
color: #495057;
}
/* Similar activities */
.similar-activities {
background: white;
border-radius: 12px;
padding: 2rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.similar-activities-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.similar-activity-card {
background: #f8f9fa;
padding: 1rem;
border-radius: 8px;
transition: background-color 0.2s ease;
}
.similar-activity-card:hover {
background: #e9ecef;
}
.similar-activity-title a {
color: #2c3e50;
text-decoration: none;
font-weight: 600;
}
.similar-activity-title a:hover {
color: #667eea;
}
.similar-activity-description {
color: #6c757d;
font-size: 0.9rem;
margin: 0.5rem 0;
}
.similar-activity-meta {
display: flex;
gap: 1rem;
}
.meta-item {
font-size: 0.8rem;
color: #adb5bd;
}
.activity-actions {
display: flex;
gap: 1rem;
justify-content: center;
}
/* Error pages */
.error-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 60vh;
}
.error-content {
text-align: center;
max-width: 500px;
}
.error-title {
font-size: 4rem;
font-weight: 700;
color: #667eea;
margin-bottom: 1rem;
}
.error-subtitle {
font-size: 1.5rem;
margin-bottom: 1rem;
color: #2c3e50;
}
.error-message {
color: #6c757d;
margin-bottom: 2rem;
line-height: 1.6;
}
.error-actions {
display: flex;
gap: 1rem;
justify-content: center;
}
.no-results {
background: white;
border-radius: 12px;
padding: 2rem;
text-align: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.no-results h3 {
color: #2c3e50;
margin-bottom: 1rem;
}
.no-results ul {
text-align: left;
display: inline-block;
margin: 1rem 0;
}
.no-results li {
color: #6c757d;
margin-bottom: 0.5rem;
}
/* Footer */
.footer {
background: #2c3e50;
color: white;
padding: 1rem 0;
margin-top: auto;
}
.footer-text {
text-align: center;
color: rgba(255, 255, 255, 0.8);
}
/* Error message */
.error-message {
background: #f8d7da;
color: #721c24;
padding: 1rem;
border-radius: 6px;
margin: 1rem 0;
}
/* Responsive design */
@media (max-width: 768px) {
.header .container {
flex-direction: column;
gap: 1rem;
}
.search-input-group {
flex-direction: column;
}
.filters-grid {
grid-template-columns: 1fr;
}
.filters-row {
flex-direction: column;
align-items: stretch;
}
.activity-header {
flex-direction: column;
gap: 0.5rem;
}
.activity-title-section {
flex-direction: column;
gap: 1rem;
}
.metadata-grid {
grid-template-columns: 1fr;
}
.similar-activities-grid {
grid-template-columns: 1fr;
}
.activity-actions {
flex-direction: column;
}
.error-actions {
flex-direction: column;
}
}
/* Print styles */
@media print {
.header, .footer, .breadcrumb, .activity-actions, .similar-activities {
display: none;
}
.activity-detail-page {
max-width: none;
}
.activity-detail-content {
box-shadow: none;
border: 1px solid #ddd;
}
}