{"id":48606882,"url":"https://github.com/psychonautwiki/bifrost","last_synced_at":"2026-04-09T00:09:33.964Z","repository":{"id":16704659,"uuid":"73320555","full_name":"psychonautwiki/bifrost","owner":"psychonautwiki","description":"The PsychonautWiki API.","archived":false,"fork":false,"pushed_at":"2026-02-25T04:02:37.000Z","size":1160,"stargazers_count":77,"open_issues_count":6,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-02-25T04:05:18.867Z","etag":null,"topics":["api","graphql","psychonautwiki"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psychonautwiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-11-09T20:55:39.000Z","updated_at":"2026-02-24T23:33:34.000Z","dependencies_parsed_at":"2024-06-22T13:54:13.584Z","dependency_job_id":"6727c32c-8c49-4f9d-8d79-b9122ba4be87","html_url":"https://github.com/psychonautwiki/bifrost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/psychonautwiki/bifrost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychonautwiki%2Fbifrost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychonautwiki%2Fbifrost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychonautwiki%2Fbifrost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychonautwiki%2Fbifrost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psychonautwiki","download_url":"https://codeload.github.com/psychonautwiki/bifrost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychonautwiki%2Fbifrost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","graphql","psychonautwiki"],"created_at":"2026-04-09T00:09:30.642Z","updated_at":"2026-04-09T00:09:33.958Z","avatar_url":"https://github.com/psychonautwiki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bifrost\n\n```\n          /\\,%_\\\n          \\%/,\\          Old age should burn\n       _.-\"%%|//%    and rave at close of day\n      .'  .-\"  /%%%\n  _.-'_.-\" 0)   \\%%%     Rage, rage against\n /.\\.'          \\%%%  the dying of the light\n \\ /      _,      %%%\n  `\"--\"~`\\   _,*'\\%'   _,--\"\"\"\"-,%%,\n         )*^     `\"\"~~`           \\%%%,\n         _/                          \\%%%\n     _.-`/                           |%%,___\n _.-\"   /      ,              ,     ,|%%   .`\\\n/\\     /      /                `\\     \\%'   \\ /\n\\ \\ _,/      /`~.-._          _,`\\     \\`\"\"~~`\n `\"` /-.`_, /'      `~----\"~     `\\     \\\n     \\___,'                        \\.-\"`/\n                                    `--'\n```\n\nGraphQL API server for [PsychonautWiki](https://psychonautwiki.org). Fetches substance data from the wiki's MediaWiki API and exposes it through a typed GraphQL interface with stale-while-revalidate caching.\n\n## Quick Start\n\n```bash\n# Run with cargo\ncargo run\n\n# Or with Docker\ndocker build -t bifrost .\ndocker run -p 3000:3000 bifrost\n```\n\nOpen http://localhost:3000 for the GraphiQL playground.\n\n## Example Queries\n\n```graphql\n# Search substances\n{\n  substances(query: \"psilocybin\", limit: 5) {\n    name\n    summary\n    class { psychoactive chemical }\n    rpioa { oral { dose { threshold light common strong heavy } } }\n    dangerousInteractions { name }\n  }\n}\n\n# Get effects for a substance\n{\n  effectsBySubstance(substance: \"LSD\") {\n    name\n    url\n  }\n}\n\n# Find substances by effect\n{\n  substancesByEffect(effect: [\"Euphoria\", \"Time distortion\"]) {\n    name\n  }\n}\n```\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PORT` | `3000` | Server port |\n| `CACHE_TTL_MS` | `86400000` (24h) | Cache TTL in milliseconds |\n| `PLEBISCITE` | (unset) | Enable Erowid experience reports (requires MongoDB) |\n| `MONGO_URL` | - | MongoDB connection string (required if `PLEBISCITE` set) |\n| `MONGO_DB` | `bifrost` | MongoDB database name |\n| `MONGO_COLLECTION` | `plebiscite` | MongoDB collection name |\n\n### CLI Options\n\n```\nbifrost [OPTIONS]\n\nOptions:\n  -l, --log-level \u003cLEVEL\u003e  Log level [default: info]\n  -p, --port \u003cPORT\u003e        Override PORT env var\n      --json-logs          JSON log format\n      --debug-requests     Log upstream API requests\n```\n\n## Architecture\n\n- **axum** + **async-graphql** for the HTTP/GraphQL layer\n- **Stale-while-revalidate cache** with request coalescing - returns stale data immediately while refreshing in the background\n- Upstream data from PsychonautWiki's MediaWiki API (parsed from wikitext)\n- Optional MongoDB integration for Erowid experience reports via the `erowid` query\n\n## License\n\nMIT - Copyright (c) 2016-2025 Kenan Sulayman / PsychonautWiki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychonautwiki%2Fbifrost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsychonautwiki%2Fbifrost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychonautwiki%2Fbifrost/lists"}