{"id":13558382,"url":"https://github.com/matrix-org/seshat","last_synced_at":"2025-05-16T09:00:24.535Z","repository":{"id":35534748,"uuid":"204723232","full_name":"matrix-org/seshat","owner":"matrix-org","description":"A Matrix message database/indexer","archived":false,"fork":false,"pushed_at":"2025-03-03T15:22:14.000Z","size":1958,"stargazers_count":99,"open_issues_count":22,"forks_count":18,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-05-11T06:47:00.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matrix-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-08-27T14:38:03.000Z","updated_at":"2025-04-04T04:24:13.000Z","dependencies_parsed_at":"2024-11-04T09:30:58.503Z","dependency_job_id":"278071ab-8db8-4a9c-8d77-413a437abf6d","html_url":"https://github.com/matrix-org/seshat","commit_stats":{"total_commits":516,"total_committers":9,"mean_commits":"57.333333333333336","dds":0.08333333333333337,"last_synced_commit":"02d9e4775be897afe7af42f0fb6126dff44db335"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fseshat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fseshat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fseshat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fseshat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrix-org","download_url":"https://codeload.github.com/matrix-org/seshat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501548,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T12:04:55.318Z","updated_at":"2025-05-16T09:00:24.469Z","avatar_url":"https://github.com/matrix-org.png","language":"Rust","funding_links":[],"categories":["Rust","others"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/matrix-org/seshat.svg?branch=master)](https://travis-ci.org/matrix-org/seshat)\n[![Crates.io](https://img.shields.io/crates/v/seshat.svg)](https://crates.io/crates/seshat)\n[![Documentation](https://docs.rs/seshat/badge.svg)](https://docs.rs/seshat)\n[![#seshat](https://img.shields.io/badge/matrix-%23seshat:matrix.org-blue.svg)](https://matrix.to/#/!VYQqtuzngcvIzsyyOV:matrix.org?via=matrix.org\u0026via=t2l.io\u0026via=t2bot.io)\n\n\n# Seshat\n\nSeshat is a database and indexer for Matrix events.\n\nIts main use is to be used as a full text search backend for Matrix clients.\n\n## JavaScript bindings\n\nSeshat provides JavaScript bindings which can be found in the\n[seshat-node](seshat-node) subdir.\n\n## Usage\n\nThere are two modes of operation for Seshat, adding live events as they\ncome in:\n\n```rust\nuse seshat::{Database, Event, Profile};\nuse tempfile::tempdir;\n\nlet tmpdir = tempdir().unwrap();\nlet mut db = Database::new(tmpdir.path()).unwrap();\n\n/// Method to call for every live event that gets received during a sync.\nfn add_live_event(event: Event, profile: Profile, database: \u0026Database) {\n    database.add_event(event, profile);\n}\n/// Method to call on every successful sync after live events were added.\nfn on_sync(database: \u0026mut Database) {\n    database.commit().unwrap();\n}\n```\n\nThe other mode is to add events from the room history using the\n`/room/{room_id}/messages` Matrix API endpoint. This method supports\nstoring checkpoints which remember the arguments to continue fetching events\nfrom the `/room/{room_id}/messages` API:\n\n```\ndatabase.add_historic_events(events, old_checkpoint, new_checkpoint)?;\n```\n\nOnce events have been added a search can be done:\n```\nlet result = database.search(\"test\", \u0026SearchConfig::new()).unwrap();\n```\n\n## Development\n\nSeshat uses standard cargo commands `build` and `test`.\n\nYou can install [pre-commit](https://pre-commit.com/) and then `pre-commit install` \nto ensure your work is linted on commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fseshat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix-org%2Fseshat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fseshat/lists"}