The Effection website shows documentation and packages that it pulls from GIT repositories on GitHub.
Every argument and environment variable the site accepts is declared in one
place, cli.ts, using
Configliere. Inputs are validated
before main() starts, so a bad value fails immediately with a message instead
of surfacing as a confusing runtime error later in the boot.
Run deno run -A main.tsx --help for the current list. Each parameter is
addressable two ways — as a --kebab-case flag or as a SCREAMING_SNAKE_CASE
environment variable — and the command line wins when both are supplied.
| Flag | Environment | Default | Purpose |
|---|---|---|---|
--port |
PORT |
8000 |
Port the HTTP server listens on. 0 picks a free one |
--github-token |
GITHUB_TOKEN |
unauthenticated | GitHub access token for the API |
--jsr-api |
JSR_API |
none | JSR API token; the score card is skipped without it |
--deno-deployment-id |
DENO_DEPLOYMENT_ID |
fresh id per boot | Deployment identity behind the ETag |
--effectionx-dir |
EFFECTIONX_DIR |
none | Local effectionx checkout to read instead of cloning |
--clones-dir |
CLONES_DIR |
build/clones |
Git clones of the documented repositories |
--worktrees-dir |
WORKTREES_DIR |
build/worktrees |
A git worktree per documented series |
--pagefind-dir |
PAGEFIND_DIR |
pagefind |
Generated Pagefind search bundle |
--tailwind-input |
TAILWIND_INPUT |
main.css |
Tailwind entry stylesheet |
--tailwind-outdir |
TAILWIND_OUTDIR |
tailwind |
Where the compiled stylesheet is written |
--verbose |
VERBOSE |
false |
Emit debug and warning logs, not just info and error |
The defaults reproduce what used to be hardcoded, so deno task dev and the
deployment workflow need no flags.
deno task dev
The website clones
thefrontside/effectionx into
build/clones and reads its packages from main. To see a checkout you are
working in instead — its branch, its uncommitted changes and all — point
EFFECTIONX_DIR at it:
EFFECTIONX_DIR=../effectionx deno task dev
--effectionx-dir ../effectionx does the same thing, as with every other
parameter in the table above.
The directory is used exactly as it is on disk. It is never fetched or reset, so the site cannot disturb work in progress, and a path that does not exist fails at startup rather than on the first request that needs it.
The Effection website uses sophisticated GitHub integration to dynamically load and display documentation and packages from Effection repositories. This integration works through multiple layers:
- Dual Provider System: Uses both Git commands (
git-provider.ts) and GitHub's Octokit API (octokit-provider.ts) for redundant access to repository data - Dynamic Remote Management: Automatically adds and fetches GitHub remotes for repositories, enabling access to branches, tags, and file contents
- Branch & Tag Detection: Intelligently determines whether references are branches or tags and normalizes them to proper Git reference formats
- Guides: Pulls structured documentation from
docs/structure.jsonand loads MDX files from thedocs/directory in the thefrontside/effection repository - API Documentation: Generates API documentation using Deno's documentation
generator from TypeScript source files in the
thefrontside/effection
repository (supports both v3 and v4 via tags like
effection-v3.*andeffection-v4.*) - README Integration: Loads and renders README.md files from package directories using MDX processing
- Workspace Integration: Reads
deno.jsonfiles to discover packages and their configurations within:- thefrontside/effection - Core Effection library packages
- thefrontside/effectionx - Extended Effection ecosystem packages
- Multi-Version Support: Handles different versions of packages by working with Git tags and branches from both repositories
- Export Mapping: Maps package exports to their corresponding source files for direct GitHub links
- Live Repository Data: Fetches star counts, default branches, and repository metadata directly from GitHub
- Content Versioning: Supports loading content from specific Git references (branches, tags, commits)
- Badge Integration: Generates badges for JSR packages, npm packages, bundle sizes, and other metrics
This integration ensures that the website always reflects the current state of the Effection ecosystem by pulling data directly from the source repositories on GitHub.
The website is deployed to Deno Deploy using a static site generation process powered by the Staticalize utility:
- Trigger: Runs automatically every 8 hours via scheduled GitHub Action, on
pushes to
mainbranch, and can be manually triggered - Static Generation: The live website is crawled and converted to static files using Staticalize
- Search Integration: Pagefind indexes the static content to enable client-side search functionality
- Deno Deploy: Static files are uploaded to Deno Deploy and served via their edge network
- Server Startup: Spins up the dynamic website locally using
deno task dev - Content Crawling: Staticalize crawls
http://127.0.0.1:8000to generate static HTML/CSS/JS - Search Indexing: Pagefind processes the static files to create search indexes
- Upload: Deploys the built static site to the
effection-wwwproject on Deno Deploy
This ensures the website stays current with repository changes while providing fast global delivery through static hosting.
If you encounter an HttpError: Bad credentials error when running the website:
- Verify your GITHUB_TOKEN: Ensure the
GITHUB_TOKENenvironment variable is set with a valid GitHub personal access token - Clear the cache: Old cached data may contain requests made with an
expired or invalid token. Run the clear-cache task:
deno task clear-cache
- Restart the server: After clearing the cache, restart the development server
This error typically occurs when the cache contains authenticated requests from a previous token that is no longer valid.