#api #backend #wiki #wikijump

app deepwell

DEEPWELL - Wikijump API provider and database manager

2 unstable releases

0.7.0 May 21, 2022
0.6.2 May 5, 2022
0.0.9 Jan 27, 2020
0.0.8 Jan 27, 2020
0.0.7 Jan 6, 2020

#422 in Database interfaces

24 downloads per month
Used in deepwell-rpc


24K SLoC


Build status

DEEPWELL is an experimental backend system to provide core wiki operations via an API for Wikijump. This is intended as an internal API consumed by the web server as part of its logical tasks.

The lint #![forbid(unsafe_code)] is set, and therefore this crate has only safe code.

Available under the terms of the GNU Affero General Public License. See LICENSE.md.


If you have sea-orm-cli, and have a local instance of Wikijump running, you can use the following script to autogenerate SeaORM model files:

$ scripts/generate-models.sh


The primary organization of the crate is as follows:

  • api/ — Web server definition, such as its routes and related structures.
    • Each API is namespaced based on its version. The primary version of interest is the "internal" API, which is consumed by PHP and not meant for outside consumption due to it providing unguarded access.
  • methods/ — Implementations for individual routes provision above.
  • services/ — "Services", or logical encapsulations of different concepts or operations.
    • For instance, the ParentService allows retrieving and storing data related to parent-child page relationships. You can think of it as "wrapping" the page_parent table.
    • Similarly, the PageService encapsulates the page table, but also wraps all the other operations contained with the logical concept of the "page", such as creating new revisions using the RevisionService as part of the "edit" method.
  • locales/ — Provides localization methods, interpreting the Fluent translation files.
  • models/ — Primarily auto-generated by Sea-ORM, these files allow for interfacing with the database.
  • Other files are utilities, and are generally understandable by looking at their contents..

The routes are defined in api/, with their implementations in methods/, and the structures they rely on in services/<name>/structs.rs. The services invoked to encapsulate logical operations are at services/<name>.rs or services/<name>/service.rs.


This executable targets the latest stable Rust. At time of writing, that is 1.61.0.

$ cargo build --release


Tests have not yet been implemented, but when they are, run:

$ cargo test

Add -- --nocapture to the end if you want to see test output.


$ cargo fmt     # Ensure code is formatted
$ cargo clippy  # Check code for lints


~1M SLoC