31 releases (16 breaking)
|new 0.26.3||Oct 18, 2021|
|0.26.0||Sep 22, 2021|
|0.24.2||Jul 13, 2021|
|0.23.1||Mar 27, 2021|
|0.17.0||Nov 22, 2020|
#134 in Database implementations
103 downloads per month
Status: Alpha. Not ready for production time. Prone to changes and corrupt databases when upgrading. Changelog
- No runtime dependencies, fast, runs on all platforms
- Embedded HTTP / HTTPS / HTTP2.0 server. Built-in LetsEncrypt handshake.
- Serialization to JSON, JSON-AD, and various Linked Data / RDF formats (RDF/XML, N-Triples / Turtle / JSON-LD).
- Dynamic schema validation / type checking using Atomic Schema
- Event-sourced versioning / history powered by Atomic Commits
- Pagination, sorting and filtering using Atomic Collections
- Authorization (read / write permissions) and Hierarchical structures powered by Atomic Hierarchy
- Invite / sharing system with Atomic Invites
- Supports querying, sorting and filtering using Atomic Collections
- Uses atomic-data-browser as a GUI / front-end, which offers dynamic forms, tables, authentication and more.
- You want to make (high-value) datasets as easily accessible as possible
- You want to specify and share a common vocabulary / ontology / schema for some specific domain or dataset. Example classes here.
- You want to use and share linked data, but don't want to deal with most of the complexities of RDF, SPARQL, Triple Stores, Named Graphs and Blank Nodes.
- You are interested in re-decentralizing the web or want want to work with tech that improves data ownership and interoperability.
- You like living on the edge (this application is not production ready)
FLAGS: -h, --help Prints help information -i, --init Recreates the `/setup` Invite for creating a new Root User. Also re-runs various populate commands, and re-builds the index. -r, --reindex Rebuilds the index (can take a while for large stores). -V, --version Prints version information SUBCOMMANDS: export Create a JSON-AD backup of the store. help Prints this message or the help of the given subcommand(s) import Import a JSON-AD backup to the store. Overwrites Resources with same @id.
- If you need stability or reliability, look further (for now).
- You're dealing with non-public / private data. As of now, this server does not have methods to prevent access to content.
- Complex query requirements. Check out NEO4j, Apache Jena or maybe TerminusDB.
You can run
atomic-server in four ways:
- From a published binary (probably the quickest)
- Using docker
- Using Cargo from crates.io:
cargo install atomic-server
- Manually from source
When you're running
atomic-server, go to Initial setup and configuration
dockerfile is located in the project root, above this
docker run -p 80:80 -p 443:443 -v atomic-storage:/atomic-storage joepmeneer/atomic-server
- If you want to update, run
docker pull joepmeneer/atomic-serverand docker should fetch the latest version.
# Clone this repoo git clone firstname.lastname@example.org:joepio/atomic-data-rust.git cd atomic-data-rust/server # Optional, but recommended: Create a new .env using the template. cp default.env .env # Run the server. It creates a store in ~/.config/atomic/db by default cargo run # Or tun the extra-cool desktop version with a presence in your app tray cargo run --features desktop
Troubleshooting compiling from source:
# If pkg-config or libssl-dev is not installed, make sure to install them sudo apt-get install -y pkg-config libssl-dev --fix-missing
- The server loads the
.envfrom the current path by default. Use the
default.envfrom this repo as a template and for reference.
- If you want to run Atomic Server on your own domain, you'll probably want to set
.env(see HTTPS setup below).
- After running the server, check the logs and take note of the
Private key. You should use these in the
atomic-cliand atomic-data-browser clients for authorization.
- A directory is made:
~/.config/atomic, which stores your newly created Agent keys, your data, the HTTPS certificates and a folder for public static files.
http://localhost/setupto register your first (admin) user. You can use an existing Agent, or create a new one.
You'll probably want to make your Atomic Data available through HTTPS.
You can use the embedded HTTPS / TLS setup powered by LetsEncrypt, acme_lib and rustls.
To setup HTTPS, we'll need to set some environment variables.
.env and set:
ATOMIC_EMAILemail@example.com ATOMIC_DOMAIN=example.com ATOMIC_HTTPS=true
Run the server:
Make sure the server is accessible at
ATOMIC_DOMAIN at port 80, because Let's Encrypt will send an HTTP request to this server's
/.well-known directory to check the keys.
It will now initialize the certificate.
Read the logs, watch for errors.
HTTPS certificates are automatically renewed when the server is restarted, and the certs are 4 weeks or older.
There are three ways to interact with this server:
- GUI: Use the
atomic-data-browserJS frontend by visiting
- API: Check out ./example_requests.http for various HTTP requests to the server. Also, read the docs. You can also try the react boilerplate to build your own front-end app using @tomic/lib and @tomic/react.
- CLI: The
atomic-cli is a useful terminal tool for interacting with
It makes it easy to query and edit Atomic Data from the command line.
Check it out.
You can fetch individual items by sending a GET request to their URL.
# Fetch as JSON-AD (de facto standard for Atomic Data) curl -i -H "Accept: application/ad+json" https://atomicdata.dev/properties/shortname # Fetch as JSON-LD curl -i -H "Accept: application/ld+json" https://atomicdata.dev/properties/shortname # Fetch as JSON curl -i -H "Accept: application/json" https://atomicdata.dev/properties/shortname # Fetch as Turtle / N3 curl -i -H "Accept: text/turtle" https://atomicdata.dev/properties/shortname
Check out ./example_requests.http for more things that you can do.
# This also makes sure that cli and server work, plus it test the db feature cargo test --all
# Install drill cargo install drill drill -b benchmark.yml --stats
You can run
atomic-server --init to recreate the
/setup invite. It will be reset to
There are no helper functions for this, but you could
atomic-server export your JSON-AD, and find + replace your old domain with the new one.
This could especially be helpful if you're running at
localhost and want to move to a live server.
db folder in your
rm -rf ~/.config/atomic/db.
This is not yet possible. See #13.
You might have a problem with your index. Try reindexing using