3 unstable releases
Uses new Rust 2024
| new 0.1.1 | Apr 13, 2026 |
|---|---|
| 0.1.0 | Feb 10, 2026 |
| 0.0.1-name-reservation | Feb 9, 2026 |
#1703 in Database interfaces
Used in 5 crates
50KB
1K
SLoC
OpenTimeline
- Dataset: harryhudson/open-timeline-data
- Open to - and in need of - contributions
- Website: www.open-timeline.org
- For a good example of a rendered timeline see United States
- Crates:
- Desktop GUI screenshots: see bottom
About
This repo contains a suite of software for creating, managing, exploring, viewing and sharing timelines and the entities they contain. It is entirely written in Rust, and nearly all of it has been broken into 8 library crates for re-use by external projects. These are bundled together into:
- A native desktop GUI application
- Create & manage entities & timelines
- Advanced searching using boolean expressions of tags
- View & explore timelines
- Play games
- Backup/merge/restore to & from local JSON files
- Restore/merge from the www.open-timeline.org public API
- A JSON web API server
- A timeline rendering engine and 2 frontends
- HTML canvas for web rendering - compiled to WASM
eguipainter for native desktop viewing
This project exists for 2 reasons:
- To aid learning and thinking about the past: Humans are bad at perfect recall; when reading history there are too many events and people. This project aims to leverage the abilities of computers to try and alleviate this problem.
- To add context to writings, in particular to online news: Often when reading the news we forget or don't know the relevant history. Sometimes a timeline is presented but is very limited, fixed, and not interactive. I hope this project will plug that gap.
Usage
Requirements/dependencies:
sqlite3cargo
Clone the repo:
git clone https://github.com/harryhudson/open-timeline.git
cd open-timeline
Desktop GUI
Run the app:
cargo run --release --bin gui
Build the app bundle:
cargo-bundle --release --bin gui
JSON Web API Server
Before being able to run the JSON web API server, you'll need a database. The easiest way to do this is by using the GUI application (see above).
Run the server:
cargo r --bin www-api -- --database="/path/to/timeline.sqlite" --read-only=true --dynamic=false
WASM OpenTimeline Renderer
Compile open-timeline-renderer for the WASM target for rendering timelines on the web:
cd crates/renderer
wasm-pack build --target web
Other
Should the database schema in the CRUD crate need changing, one can use SQLx to setup a dev database:
# Create the SQLite database file
mkdir crates/crud/db
touch crates/crud/db/timeline.sqlite
# Create the .env file
echo "DATABASE_URL=sqlite:$PWD/crates/crud/db/timeline.sqlite" > .env
# Install `sqlx`
cargo install sqlx-cli
# Setup the database
cd crates/crud
sqlx database setup
cd -
GUI Screenshots

lib.rs:
Part of the wider OpenTimeline project
This crate defines the basic datatypes used across the OpenTimeline project (web API, desktop application, renderer).
This crate is designed to be used by the rest of the OpenTimeline project, as well as by other 3rd party projects that want to interact with OpenTimeline (e.g. via it's JSON web API).
This crate aims to provide APIs for each type so that if a type is instantiated, the developer can be sure it's valid.
Dependencies
~2–19MB
~194K SLoC