How abhishek-sharma182005/codequest-100-days-dsa works
Project Type and Purpose
• This is an open-source “challenge platform” repository (CodeQuest) that hosts a 100-day DSA coding challenge.
• It is primarily a static frontend (HTML/CSS/JS) plus a Python script and JSON file for scoring, all orchestrated via GitHub Actions workflows.
File Structure
• Top-level:
• index.html, style.css, script.js – static UI
• daily_pr_points.py (or daily_pr_points.py) – Python scoring logic
• points.json – persistent leaderboard data
• .github/workflows/… – CI/CD pipelines (automated scoring, merges, score updates)
• submissions/… – per-participant code submissions (PR source)
• README.md describes folder structure and submission guidelines.
• No traditional “backend” server: scoring is done in CI runners and results stored in JSON.
README Insights
• Explains submission flow (fork → PR), scoring rules, weekly/daily points.
• Mentions a leaderboard updated weekly.
Main Components
a. GitHub Repository
• Hosts code, static site, submissions folder, scoring script, JSON.
b. GitHub Actions CI/CD
• Multiple workflows:
• daily scoring (update_score.yml)
• manual triggers (manual.yml, Manual_with_points.yml)
• auto-merge PRs (auto_merge.yml)
c. Scoring Engine (Python)
• daily_pr_points.py runs in CI runner
• Reads submissions, computes points according to rules, writes to points.json
d. Data Store (JSON)
• points.json stores current leaderboard data
e. Static Frontend
• index.html + style.css + script.js served via GitHub Pages
• script.js fetches points.json to render leaderboard
f. External Services
• GitHub API (for PR events, file updates, commits)
• GitHub Pages hosting
Relationships and Data Flow
1. User forks repo & submits solution via PR → PR event triggers GitHub Actions.
2. CI Workflow (Manual_with_points or auto_merge) reviews/merges PR.
3. Scheduled CI Workflow (update_score.yml) runs daily:
• Checks out repo
• Executes daily_pr_points.py
• Updates points.json
• Commits & pushes updated JSON
4. GitHub Pages picks up updated index.html + points.json → user views refreshed leaderboard.
5. script.js fetches points.json at runtime to display charts/tables.
Key Architectural Patterns
• Event-driven (GitHub Event → Actions workflows)
• CI/CD as “backend” compute layer
• GitOps approach: all data + state (leaderboard) versioned in JSON in the repo
• Static site generation / hosting via GitHub Pages
Technologies & Libraries
• Static: HTML5, CSS3, Vanilla JS (fetch API)
• Compute: Python 3 script (daily_pr_points.py)
• Storage: points.json (flat file)
• Orchestration: GitHub Actions
• Hosting: GitHub Pages
• Version control & API: Git, GitHub PR hooks
Detailed Capture of Essential Elements
• Workflows directory as a component under CI/CD
• Points.json as version-controlled state
• Distinguish between “developer/participant” actor and “mentor/reviewer” if desired
• Use of GitHub API for automated merges and commits