{"id":31498954,"url":"https://github.com/1999azzar/frea_curation","last_synced_at":"2025-10-02T16:16:02.098Z","repository":{"id":309245216,"uuid":"1034985001","full_name":"1999AZZAR/frea_curation","owner":"1999AZZAR","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-12T11:55:43.000Z","size":270,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-12T13:39:24.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-09T12:08:28.000Z","updated_at":"2025-09-12T11:55:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"25036c9f-0f63-4374-8ace-f4fe716e0b3e","html_url":"https://github.com/1999AZZAR/frea_curation","commit_stats":null,"previous_names":["1999azzar/frea_curation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1999AZZAR/frea_curation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Ffrea_curation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Ffrea_curation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Ffrea_curation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Ffrea_curation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/frea_curation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Ffrea_curation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278031727,"owners_count":25918419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-02T16:15:58.875Z","updated_at":"2025-10-02T16:16:02.093Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Content Curator\n\nAn AI-powered content curation web application built with Flask. It fetches articles, analyzes them across multiple quality dimensions, and ranks results with a configurable composite score. The UI is optimized for a clean, professional (Medium-like) reading experience.\n\n## Features\n- Manual article analysis (single URL) with detailed scorecard\n- Topic-based curation (fetch from NewsAPI, parse, analyze, rank)\n- Scoring engine components: readability, NER density, sentiment (neutrality), TF‑IDF relevance, recency\n- Configurable weights and minimum word count\n- Modern UI: light theme, responsive layout, loading/error states, sorting/filtering/search/pagination\n\n## Project Structure\n\n```\nfrea_curation/\n  app.py                     # Flask app entry\n  curator/                   # Application package\n    core/                    # Core domain modules\n      models.py              # Article, Entity, ScoreCard, ScoringConfig\n      config.py              # Configuration loader (env-based)\n      validation.py          # Validation utilities\n      nlp.py                 # NLP helpers (spaCy/VADER)\n      utils.py               # Shared utilities\n    services/                # Service layer\n      _analyzer.py           # Scoring engine implementation\n      analyzer.py            # Thin API over _analyzer\n      _parser.py             # Parser implementation\n      parser.py              # Thin API\n      _news_source.py        # News source implementation\n      news_source.py         # Thin API\n    web/                     # Web-specific utilities (reserved)\n  templates/                 # Jinja templates\n  static/                    # Static assets\n  assets/                    # Precompiled sources (e.g., Tailwind)\n  tests/                     # Test suite\n  config.py                  # Back-compat loader (delegates to curator.core)\n  models.py                  # Back-compat re-exports\n  validation.py              # Legacy location (kept for BC; move usage to curator.core.validation)\n```\n\nNotes:\n- Prefer importing from `curator.core.*` and `curator.services.*`.\n- Root-level `models.py`, `config.py`, and `validation.py` exist for backward compatibility in tests and legacy scripts.\n\n```\nai-content-curator/\n├── app.py                 # Flask app+routes (JSON or server-rendered views)\n├── config.py              # Scoring configuration loading\n├── requirements.txt       # Python dependencies (unpinned)\n├── README.md              # Project documentation\n├── curator/               # Application package\n│   ├── core/              # Models, validation, nlp helpers\n│   └── services/          # Analyzer, parser (newspaper3k), news source (NewsAPI)\n├── templates/             # Jinja2 templates (base, index, results, curation_results, errors)\n├── static/                # Compiled assets\n│   ├── css/\n│   └── js/\n├── assets/                # Tailwind input CSS (source)\n├── package.json           # Tailwind/PostCSS build scripts\n├── tailwind.config.js     # Tailwind configuration\n└── postcss.config.js      # PostCSS configuration\n```\n\n## Prerequisites\n- Python 3.10+\n- Node.js (optional, for building Tailwind CSS locally)\n- Environment variables:\n  - `NEWS_API_KEY` (required for topic curation via NewsAPI)\n  - Optional scoring settings (see `config.py`)\n\n## Setup\n1) Create and activate a virtual environment, install deps\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n2) Optional: install NLP resources\n```bash\n# spaCy English model (if you want NER enabled locally)\npython -m spacy download en_core_web_sm\n\n# NLTK VADER lexicon (for sentiment); skip if running in restricted envs\npython -c \"import nltk; nltk.download('vader_lexicon')\"\n```\n\n3) Build the UI (Tailwind, optional at runtime if already built)\n```bash\nnpm install\nnpm run build:css\n```\n\n## Running\n```bash\nsource .venv/bin/activate\npython app.py\n```\nApp runs at `http://localhost:5000`.\n\n## API Endpoints\n- POST `/analyze`\n  - Body: `{ \"url\": string, \"query\"?: string }`\n  - Returns: scorecard JSON (if `Content-Type: application/json`), otherwise renders `results.html`.\n\n- POST `/curate-topic`\n  - Body: `{ \"topic\": string, \"max_articles\"?: number }`\n  - Returns: ranked list JSON (if JSON request), otherwise renders `curation_results.html`.\n\n## Using the UI\n- Analyze: Enter an article URL (+ optional query), click Analyze → view breakdown and overall score.\n- Curate: Enter a topic (+ optional max), click Curate → filter/sort/search/paginate ranked cards.\n\n## Testing\n```bash\nsource .venv/bin/activate\npytest -q\n```\n\n## Troubleshooting\n- Newspaper3k parsing\n  - Some sources may block scraping; retries and user-agent rotation are enabled.\n  - If you encounter parsing issues, ensure network access and consider raising timeouts.\n- NLP resource availability\n  - The app degrades gracefully if spaCy model / VADER lexicon are unavailable (NER disabled, neutral sentiment),\n    but installing them improves scoring quality (see Setup step 2).\n- Tailwind CSS\n  - If Node is unavailable, the app can still run using the last compiled CSS in `static/css/tailwind.css`.\n\n## Roadmap (next)\n- Embedding-based relevance scoring (SentenceTransformers) with TF‑IDF fallback\n- Duplicate detection and domain diversity caps\n- Topic-aware recency calibration\n- Parser resilience (readability-lxml fallback)\n- Source reputation and topic coverage metrics\n- Caching, background jobs, persistence, feedback loop, observability\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Ffrea_curation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Ffrea_curation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Ffrea_curation/lists"}