{"id":46886299,"url":"https://github.com/chive-pub/chive","last_synced_at":"2026-03-10T22:01:04.929Z","repository":{"id":332167046,"uuid":"1129011960","full_name":"chive-pub/chive","owner":"chive-pub","description":"Decentralized eprints on ATProto","archived":false,"fork":false,"pushed_at":"2026-03-09T18:01:46.000Z","size":7912,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-09T18:13:54.802Z","etag":null,"topics":["atprotocol","eprints","open-science","preprints"],"latest_commit_sha":null,"homepage":"https://chive.pub","language":"TypeScript","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/chive-pub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":"docs/governance/authority-control.md","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":"2026-01-06T13:34:12.000Z","updated_at":"2026-03-07T08:47:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chive-pub/chive","commit_stats":null,"previous_names":["chive-pub/chive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chive-pub/chive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chive-pub%2Fchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chive-pub%2Fchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chive-pub%2Fchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chive-pub%2Fchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chive-pub","download_url":"https://codeload.github.com/chive-pub/chive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chive-pub%2Fchive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30357614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"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":["atprotocol","eprints","open-science","preprints"],"created_at":"2026-03-10T22:00:51.397Z","updated_at":"2026-03-10T22:01:04.919Z","avatar_url":"https://github.com/chive-pub.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chive\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"chive-logo.svg\" alt=\"Chive Logo\" width=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eDecentralized eprints on ATProto\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/chive-pub/chive/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/chive-pub/chive/ci.yml?branch=main\u0026style=flat-square\u0026logo=github\u0026label=CI\" alt=\"CI Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/chive-pub/chive/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/chive-pub/chive?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://nodejs.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen?style=flat-square\u0026logo=node.js\" alt=\"Node Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.typescriptlang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/TypeScript-5.9-blue?style=flat-square\u0026logo=typescript\" alt=\"TypeScript\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://atproto.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/AT%20Protocol-native-blue?style=flat-square\" alt=\"AT Protocol\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.chive.pub\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"https://chive.pub\"\u003eLive Demo\u003c/a\u003e •\n  \u003ca href=\"https://github.com/chive-pub/chive/discussions\"\u003eDiscussions\u003c/a\u003e •\n  \u003ca href=\"https://bsky.app/profile/chive.pub\"\u003eBluesky\u003c/a\u003e\n\u003c/p\u003e\n\n## What is Chive?\n\nChive is a scholarly eprint platform where researchers own their work. It is built on [AT Protocol](https://atproto.com/), so all user content lives in user-controlled Personal Data Servers (PDSes), not on Chive's servers.\n\n**Key principle**: If Chive's entire database disappears tomorrow, you lose nothing. Your eprints, reviews, and endorsements remain in your PDS, accessible via any ATProto-compatible AppView.\n\n### Features\n\n- **Decentralized ownership**: Your research stays in your PDS under your control\n- **Open peer review**: Transparent review process with threaded discussions\n- **Knowledge graph**: Community-curated field taxonomy with Wikipedia-style moderation\n- **Faceted search**: Find papers by field, author, methodology, time period, and more\n- **Citation tracking**: Follow how research builds on prior work\n- **ATProto native**: Portable identity, cryptographic verification, federated architecture\n\n## Architecture overview\n\nChive operates as an **AppView** in the AT Protocol ecosystem:\n\n```\nUser → User's PDS (creates record) → Relay (firehose) → Chive AppView (indexes)\n```\n\n- Users publish eprints to their own PDSes\n- Chive indexes content from the ATProto firehose\n- All search and discovery happens through Chive\n- Users can switch AppViews without losing data\n\n## Technology stack\n\n| Layer          | Technology                                           |\n| -------------- | ---------------------------------------------------- |\n| Runtime        | Node.js 22+, TypeScript 5.9+                         |\n| API            | Hono (XRPC + REST)                                   |\n| Databases      | PostgreSQL 16+, Elasticsearch 8+, Neo4j 5+, Redis 7+ |\n| Frontend       | Next.js 15, React 19, Radix UI, Tailwind CSS         |\n| Testing        | Vitest, Playwright, k6                               |\n| Infrastructure | Kubernetes, Docker, OpenTelemetry                    |\n\n## Getting started\n\n### Prerequisites\n\n- Node.js 22+\n- pnpm 8+\n- Docker and Docker Compose (for databases)\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/chive-pub/chive.git\ncd chive\n\n# Install dependencies\npnpm install\n\n# Start the development database stack\n./scripts/start-test-stack.sh\n\n# Initialize databases\npnpm db:init\n\n# Start the development server\npnpm dev\n```\n\nThe API runs at `http://localhost:3001` and the web app at `http://localhost:3000`.\n\n### Running tests\n\n```bash\n# Run all tests\npnpm test\n\n# Unit tests only\npnpm test:unit\n\n# End-to-end tests\npnpm test:e2e\n\n# ATProto compliance tests\npnpm test:compliance\n\n# With coverage\npnpm test:coverage\n```\n\n## Project structure\n\n```\nchive/\n├── src/                    # Backend source code\n│   ├── api/               # Hono XRPC + REST handlers\n│   ├── atproto/           # ATProto client, firehose consumer\n│   ├── auth/              # Authentication, OAuth, zero-trust\n│   ├── plugins/           # Plugin system and builtins\n│   ├── services/          # Business logic\n│   └── storage/           # Database adapters\n├── web/                    # Next.js frontend\n│   ├── app/               # App router pages\n│   ├── components/        # React components (140+)\n│   └── lib/               # Hooks, API client, utilities\n├── docs/                   # Docusaurus documentation\n├── tests/                  # Test suites\n│   ├── unit/              # Vitest unit tests\n│   ├── integration/       # Integration tests\n│   ├── e2e/               # Playwright E2E tests\n│   └── compliance/        # ATProto compliance tests\n├── lexicons/               # ATProto lexicon schemas (pub.chive.*)\n├── scripts/                # Development and admin scripts\n├── docker/                 # Docker configurations\n└── k8s/                    # Kubernetes manifests\n```\n\n## ATProto compliance\n\nChive follows strict ATProto compliance rules:\n\n| Rule                | Description                                               |\n| ------------------- | --------------------------------------------------------- |\n| Read only           | Chive reads from the firehose, never writes to user PDSes |\n| BlobRefs only       | Store CID pointers to blobs, never blob data              |\n| Rebuildable indexes | All indexes can be reconstructed from the firehose        |\n| PDS tracking        | Track source PDS for staleness detection                  |\n\nRun `pnpm test:compliance` to verify compliance.\n\n## Development\n\n### Code style\n\n- TypeScript with strict mode\n- ESLint + Prettier for formatting\n- TSDoc for documentation (not JSDoc)\n- Active voice preferred\n\n### API type generation\n\nAfter modifying backend endpoints:\n\n```bash\n# Start dev server\npnpm dev\n\n# Regenerate frontend types\npnpm openapi:generate\n\n# Verify types compile\npnpm typecheck\n```\n\n### Database migrations\n\n```bash\n# Create a new migration\npnpm db:migrate:create migration_name\n\n# Run migrations\npnpm db:migrate:up\n\n# Rollback migrations\npnpm db:migrate:down\n```\n\n## Plugin system\n\nChive uses a hybrid plugin architecture with dependency injection (TSyringe) and event hooks (EventEmitter2).\n\nPlugins run in isolated sandboxes with declared permissions. Built-in plugins include:\n\n- GitHub integration\n- ORCID linking\n- DOI registration\n- Wikidata field import\n\nSee [docs.chive.pub](https://docs.chive.pub) for plugin development details.\n\n## Contributing\n\nWe welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) before submitting PRs.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/your-feature`)\n3. Make your changes\n4. Run tests (`pnpm test`)\n5. Submit a pull request\n\n## Security\n\nChive implements Zero Trust Architecture (NIST SP 800-207):\n\n- Every request authenticated and authorized\n- Mutual TLS for inter-service communication\n- DID-based cryptographic identity\n- Audit logging with tamper detection\n\nReport security vulnerabilities to admin@chive.pub. See [SECURITY.md](SECURITY.md).\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n## Acknowledgments\n\nChive was architected and implemented with the help of Claude Code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchive-pub%2Fchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchive-pub%2Fchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchive-pub%2Fchive/lists"}