Skip to content

Repository files navigation

harborlogo

Docs - Code

Harbor is an open-source, distributed social network

Harbor is an open-source, distributed social network that lets you publish content to multiple servers. If you're censored on one server, your content remains accessible from other servers.

Getting started

⚠️We're working on this.

You will need:

The following commands will get you up and running:

# Use node version manager to install the pinned version of node
nvm install
# Check you have the correct dependencies
apt-get install \
protobuf-compiler \
cmake \
g++ \
pkg-config \
libssl-dev \
libsasl2-dev
# Add the WASM target to the rust toolchain
rustup target add wasm32-unknown-unknown
# Build the frontend and core binaries
pnpm install
pnpm build
# Setup the git pre-commit hooks
pnpm prepare
# Start the server process
docker compose up -d --build
# Apply the database schema if it has changed.
docker compose exec -T server /app/migration fresh
# Start the frontend dev server
pnpm dev

If you're using Podman, ensure docker compose resolves to Compose v2.

To run the server from source instead, see services/server/README.md.

Clearing stale build caches

Builds are cached by Turbo. The cache key does not track changes to installed dependencies, so after switching branches or updating deps (e.g. a uniffi-bindgen-react-native / @ubjs/core bump) pnpm build can restore a stale cached output and fail with mismatched generated bindings — for example a TypeScript error that two Query / UniffiEnum types "are unrelated".

If that happens, clear the build cache and rebuild:

pnpm clean:cache
pnpm build

If the generated uniffi bindings themselves are stale (not just their cache), also regenerate them with pnpm ubrn:clean followed by pnpm build.

Project Structure

Packages

PackageDescription
packages/js-coreCore JavaScript library containing the main Polycentric protocol logic
packages/js-browserBrowser SDK using SQLite WASM for local storage
packages/js-nodeNode.js SDK using sqlite3 for local storage
packages/js-storage-sqliteShared SQLite (Drizzle ORM) storage layer for the JS SDKs
packages/react-nativeReact Native SDK for mobile applications
packages/rs-commonShared Rust code used by rs-core
packages/rs-coreRust core library - the underlying protocol implementation
packages/rs-core-uniffi-webrs-core on WASM with uniffi-bindgen-react-native bindings

Apps

AppDescription
apps/harborThe main social network application (Expo/React Native)

Services

ServiceDescription
services/serverPolycentric server
legacy/services/polycentric-serverLegacy server
legacy/services/verifiers-serverLegacy Server for verifying claims and signatures in the protocol

About

Decentralized social media. This is a read-only mirror of gitlab.futo.org/polycentric/polycentric.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages