How premai-io/state-of-open-source-ai works
Main Components
a. Content Sources
• Markdown files (.md): index.md, sdk.md, models.md, etc.
• Bibliography/References (references.bib, references.md).
b. Build Logic (Python Layer)
• badges.py, bibliography.py, committers.py: generate badges, bibliography, committers list, etc.
c. Theme & Templates
• prem_theme/ (Python package for theme)
• _templates/page.html
• _config.yml & _toc.yml (configuration for SSG)
d. Static Assets
• _static/ (CSS, JS files)
• assets/ (additional images, if any)
e. Static-Site Generator
• MkDocs or a Jekyll-style SSG invoked via a build script (not explicitly named)
f. Continuous Integration & Deployment
• GitHub workflows (.github/workflows/pages.yml)
• GitHub Pages (serving the gh-pages branch)
g. Developer Environment
• .devcontainer.json, .vscode/ and .idea/ (VS Code/IDE configs)
Relationships & Data Flow
1. Authored Content → Python Build Scripts
• Raw .md and .bib files feed into badges.py, bibliography.py, committers.py to produce enriched markdown or JSON.
2. Enriched Markdown + SSG Config + Theme & Templates
• The SSG reads _config.yml, _toc.yml, the prem_theme package, templates, static assets, and the processed markdown to render HTML.
3. HTML Output → GitHub Pages Deployment
• A GitHub Action (pages.yml) triggers on push to main, runs the build pipeline (install Python deps from requirements.txt, run scripts, run SSG), and publishes the generated site to GitHub Pages.
4. End-User
• Browsers fetch static assets and HTML from the GitHub Pages CDN under the custom CNAME.
Architectural Patterns & Design Principles
• Separation of Concerns:
• Content (Markdown) vs. Presentation (Templates/CSS) vs. Logic (Python scripts) vs. Deployment (CI).
• Infrastructure as Code:
• .devcontainer.json, .github/workflows encode environment & deployment.
• Modular Theme:
• prem_theme Python package can be reused or swapped.