Implements Task A1.1 - Config Sharing JSON API
Features:
- FastAPI backend with 6 endpoints
- Config analyzer with auto-categorization
- Full metadata extraction (24 fields per config)
- Category/tag/type filtering
- Direct config download endpoint
- Render deployment configuration
Endpoints:
- GET / - API information
- GET /api/configs - List all configs (filterable)
- GET /api/configs/{name} - Get specific config
- GET /api/categories - List categories with counts
- GET /api/download/{config_name} - Download config file
- GET /health - Health check
Metadata:
- name, description, type (single-source/unified)
- category (8 auto-detected categories)
- tags (language, domain, tech)
- primary_source (URL/repo)
- max_pages, file_size, last_updated
- download_url (skillseekersweb.com)
Categories:
- web-frameworks (12 configs)
- game-engines (4 configs)
- devops (2 configs)
- css-frameworks (1 config)
- development-tools (1 config)
- gaming (1 config)
- testing (2 configs)
- uncategorized (1 config)
Deployment:
- Configured for Render via render.yaml
- Domain: skillseekersweb.com
- Auto-deploys from main branch
Tests:
- ✅ All endpoints tested locally
- ✅ 24 configs discovered and analyzed
- ✅ Filtering works (category/tag/type)
- ✅ Download works for all configs
Issue: #9
Roadmap: FLEXIBLE_ROADMAP.md Task A1.1
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""Quick test of the config analyzer"""
|
|
import sys
|
|
sys.path.insert(0, 'api')
|
|
|
|
from pathlib import Path
|
|
from api.config_analyzer import ConfigAnalyzer
|
|
|
|
# Initialize analyzer
|
|
config_dir = Path('configs')
|
|
analyzer = ConfigAnalyzer(config_dir, base_url="https://skillseekersweb.com")
|
|
|
|
# Test analyzing all configs
|
|
print("Testing config analyzer...")
|
|
print("-" * 60)
|
|
|
|
configs = analyzer.analyze_all_configs()
|
|
print(f"\n✅ Found {len(configs)} configs")
|
|
|
|
# Show first 3 configs
|
|
print("\n📋 Sample Configs:")
|
|
for config in configs[:3]:
|
|
print(f"\n Name: {config['name']}")
|
|
print(f" Type: {config['type']}")
|
|
print(f" Category: {config['category']}")
|
|
print(f" Tags: {', '.join(config['tags'])}")
|
|
print(f" Source: {config['primary_source'][:50]}...")
|
|
print(f" File Size: {config['file_size']} bytes")
|
|
|
|
# Test category counts
|
|
print("\n\n📊 Categories:")
|
|
categories = {}
|
|
for config in configs:
|
|
cat = config['category']
|
|
categories[cat] = categories.get(cat, 0) + 1
|
|
|
|
for cat, count in sorted(categories.items()):
|
|
print(f" {cat}: {count} configs")
|
|
|
|
print("\n✅ All tests passed!")
|