MCPcopy Index your code
hub / github.com/diskuto/diskuto-api

github.com/diskuto/diskuto-api @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
184 symbols 346 edges 16 files 46 documented · 25%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Diskuto API

Diskuto is a P2P distributed social networking system designed to protect you as a user. Diskuto does this based on some core principles:

  1. Your data should not be held hostage by a single service. (ex: Facebook, Twitter).
    If you decide you don't like a service, you should be able to easily copy and reuse your data elsewhere. Likewise, your user ID should be able to migrate with your data so that your followers know you're the same user in both places.

  2. Your data should be resilient to censorship and server outages.

  3. Your data should not be modifiable by third parties.
    People reading your posts should be confident that it has not been altered. e.g.: Servers or other middlemen should not be able to insert ads into your data.

  4. You should be able to create/use clients to view your data as you wish.
    This is unlike platforms like Facebook and Twitter that make it difficult to access your social network's data.

  5. As a server administrator, you should be able to block content as required by law for your jurisdiction.

For more information on how Diskuto accomplishes this, see: How Does It Work?

Benefits

  • UserIDs are globally unique, and can be used among many servers.
  • Multiple servers act as redundant backups of users' content.
  • You can run a server locally to download your own posts, and those of people you follow.
  • Good for backups
  • Allows you to read/post while offline.

Getting Started

  • https://blog.nfnitloop.com/ is my personal instance of Diskuto. You can browse that to see what it looks like.
  • Full Stack - contains configuration files and instructions for testing out Diskuto locally.
  • If you want to build the Diskuto API from source, or modify it, see the Development documentation.
  • Or you can download a binary from the releases page.
  • See docs/ for even more information.

Extension points exported contracts — how you extend this code

ProtoValid (Interface)
Since proto3 does not allow specifying required fields, we must do that in our own validation here. [2 implementers]
src/protos.rs
Upgrader (Interface)
(no doc) [4 implementers]
src/backend/sqlite/upgraders.rs
AsHex (Interface)
Lets you get a Display that will print some bytes as hex. [1 implementers]
src/util.rs
Backend (Interface)
Represents a connection to the backend, and logic we want to perform with it. [1 implementers]
src/backend.rs
FactoryBuilder (Interface)
This trait knows how to build a Factory, which in turn can open Backend connections. It also provides functionality for
src/backend.rs
Factory (Interface)
Knows how to open Backend "connections".
src/backend.rs

Core symbols most depended-on inside this repo

run
called by 30
src/backend/sqlite.rs
clone
called by 22
src/backend.rs
open
called by 15
src/backend/sqlite.rs
cors_ok_headers
called by 13
src/server.rs
bytes
called by 11
src/backend.rs
into
called by 8
src/server.rs
factory_builder
called by 7
src/main.rs
proto_ok
called by 6
src/server/rest.rs

Shape

Method 81
Function 47
Class 45
Interface 6
Enum 5

Languages

Rust100%

Modules by API surface

src/backend/sqlite.rs52 symbols
src/backend.rs37 symbols
src/main.rs16 symbols
src/server.rs14 symbols
src/backend/sqlite/upgraders.rs13 symbols
src/server/pagination.rs10 symbols
src/server/rest.rs9 symbols
crates/sizedisplay/src/lib.rs6 symbols
src/util.rs5 symbols
src/server/attachments.rs5 symbols
src/protos.rs5 symbols
src/server/html.rs4 symbols

For agents

$ claude mcp add diskuto-api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact