How jyotraval/contest_unify works
Project type and purpose
• From the file tree and minimal README, this is a backend‐only “contest unifier” service. Its goal is to fetch programming contest data from multiple external platforms (AtCoder, CodeChef, Codeforces, HackEarth, LeetCode), normalize that data, and store it in a local SQLite database (contest.db).
• There is no frontend—this is essentially a data‐ingestion and consolidation microservice or scheduled job suite.
File structure
• Top‐level:
• README.md
• backend_contest_unify/ (all Python modules and data files)
• Inside backend_contest_unify/:
• backend_index.py – likely the entry point / orchestrator
• *_api_data.py modules – each handles one platform’s API or web scraping
• atcoder_web_scrap.py – AtCoder requires HTML parsing
• database_CRUD.py – general database operations (insert, update, query)
• contest.db – the SQLite database file
• contest_fetcher.log – log output for fetch operations
README
• Only a title (# contest_unify). No extra sections. All context must come from file names and conventions.
a. Main components
• External Contest Platforms: AtCoder, CodeChef, Codeforces, HackEarth, LeetCode
• Contest Unifier Service:
– Orchestrator (backend_index.py)
– Platform Fetchers (codechef_api_data.py, codeforce_api_data.py, etc.)
– Database Access Layer (database_CRUD.py)
– Logging subsystem (contest_fetcher.log)
• Local Database: contest.db (SQLite)
b. Relationships & interactions
– Orchestrator triggers each Platform Fetcher on a schedule or via CLI
– Each Fetcher calls external REST APIs or scrapes HTML, returns raw contest info
– Database Access Layer receives normalized data objects and writes/updates contest.db
– Logging subsystem records successes, failures, and fetch metrics
c. Architectural patterns & design principles
– Modular design: one module per platform
– Single responsibility: each fetcher handles exactly one source
– Layered approach: orchestration layer → fetch layer → persistence layer
d. Key technologies
– Python 3.x
– Requests / BeautifulSoup (implied for web scraping)
– SQLite via sqlite3 or an ORM in database_CRUD.py
– Standard logging module for contest_fetcher.log