• Stars
    star
    358
  • Rank 118,855 (Top 3 %)
  • Language
    Crystal
  • License
    GNU Affero Genera...
  • Created over 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Single user ActivityPub (https://www.w3.org/TR/activitypub/) server.

Ktistec

Ktistec is an ActivityPub (https://www.w3.org/TR/activitypub/) server. It is intended for individual users, not farms of users, although support for additional users will be added in the future. It is designed to have few runtime dependencies -- for example, it uses SQLite as its database, instead of PostgreSQL + Redis + etc. It is licensed under the AGPLv3.

Ktistec powers Epiktistes, my low-volume home in the Fediverse. If you want to talk to me, I'm @[email protected].

Features

Text and images

Ktistec is intended for writing and currently supports the minimum viable set of tools for that purpose.

Text formatting options include bold, italic, strikethrough, code (inline and block), superscript/subscript, headers, blockquotes with nested indentation, and both bullet and numeric lists.

Ktistec supports inline placement of images, with ActivityPub image attachments used for compatibility with non-Ktistec servers.

Drafts posts

Meaningful writing is an iterative process so Ktistec supports draft posts. Draft posts aren't visible in your timeline until you publish them.

Threaded replies

Threaded replies make it easier to follow discussions with lots of posts.

In a distributed, federated system, it's not uncommon for threads to be incomplete. Someone you follow shares a reply to a postโ€”you see the shared reply but not the original post. Threads with incomplete history are now noted as such, and you can fetch the missing posts from the top of the thread.

@-mention and #-hashtag autocomplete

Ktistec automatically converts @-mentions and #-hashtags into links, and to encourage hands-on-the-keyboard composition, Ktistec supports autocompletion.

Control over comment visibility

Ktistec promotes healthy dialog. Ktistec allows you to control which replies to your posts are public, and visible to anonymous users, and which are private.

Pretty URLs

Assign pretty (canonical) URLs to posts, both for SEO and as helpful mnemonics for users (and yourself).

Followers/following

The Fediverse is a distributed social network. You can follow other users on other servers from your timeline or by searching for them by name. Ktistec is also compatible with the "remote follow" protocol used by Mastodon and others.

Content discovery

In addition to following other users, you can follow threads, hashtags and even mentions. When posts arrive for content you follow, a notification is added to your notifications. To make navigation and discovery easier, post details pages now have labels with links to internal hashtag and mention index pages.

Content filtering

Content filters prevent undesirable content from appearing in your timeline and notifications. Filter terms match on the text of a post (ignoring any markup). Wildcards are supported.

Blocking

Ktistec gives you control over what you see. Blocking authors and posts removes them and their content from your timeline.

Metrics

Ktistec tracks metrics about how the instance is performing. Right now, the only metric is inbox and outbox volume per account, but the machinery is in place to do much more.

Prerequisites

To run an instance of Ktistec as part of the Fediverse, you'll need a server with a fixed hostname. In the Fediverse, users are identified by (and content is addressed to) a hostname and a username.

Installation

You must compile the Ktistec server executable from its source code. You will need to install a recent release of the Crystal programming language.

To obtain the source code, clone the Ktistec Github repo.

If you intend to do development on the server, check out the main branch. In addition to Crystal, you'll also need Node.js and Webpack to build the JS and CSS assets from source.

If you just want to build and run the server, check out the dist branch.

To compile the server:

$ crystal build src/ktistec/server.cr

If you're developing on the main branch, build the assets next (skip this step if you're on the dist branch--the latest JS and CSS assets are already built for you):

$ npm run build

Run the compiled executable:

$ LOG_LEVEL=INFO ./server

The first time the server runs it will run the database migrations necessary to create the database. This should only take a few seconds, maximum. When the server is ready to accept connections you will see something like:

Ktistec is ready to lead at http://0.0.0.0:3000

You can now connect to and configure the server.

Running Tests

If you change the code, you should run the tests:

$ crystal spec

Usage

The server runs on port 3000. If you're planning on running it in production, you should put Nginx or Apache in front of it. Don't forget your SSL certificate!

When you run Ktistec for the first time, you'll need to name the server and create the primary user.

Ktistec needs to know the host name of its home on the internet. The server host name is a part of every users's identity in the Fediverse. My identity is "[email protected]". The host name is "epiktistes.com" and other federated servers, and users, know to send posts and other content to me there.

Give the server a site name, too.

After you name the server, you create the primary user. Ktistec currently supports only one user. This is intentional -- one of Ktistec's design goals is to promote a more fully distributed Fediverse.

At a minimum, you need to specify the user's username, password and timezone. You can use a single character for the username if you want, but you'll need six characters, including letters, numbers and symbols, for the password. timezone is any valid IANA time zone database string (e.g. "America/New_York").

Display name and summary are optional.

Once these steps are done, you're running!

Contributors

Copyright and License

Ktistec ActivityPub Server Copyright (C) 2021, 2022, 2023 Todd Sundsted

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see (https://www.gnu.org/licenses/).

More Repositories

1

stunt

LambdaMOO with multiple inheritance, anonymous objects, HTTP, JSON <-> MOO translation, better crypto, a map datatype and a RESTful interface.
C++
72
star
2

ishi

Graph plotting package with a small API and sensible defaults powered by gnuplot.
Crystal
48
star
3

mxnet.cr

MXNet (AI/ML) bindings for the Crystal language.
Crystal
22
star
4

improvise

Starter kit for Stunt.
JavaScript
18
star
5

Public-Suffix-List

Ruby code for working with the Public Suffix List
Ruby
12
star
6

rmoo

A major mode for interacting with MOOs.
Emacs Lisp
12
star
7

deep-learning

Exercises in deep learning -- Crystal language edition
Crystal
10
star
8

web_finger

A WebFinger (https://tools.ietf.org/html/rfc7033) client for Crystal.
Crystal
9
star
9

jquery.tweetcapture

Capture Twitter search tweets in real time and stick them in a web-page.
JavaScript
7
star
10

iterm2

Display images within the terminal using the ITerm2 Inline Images Protocol.
Crystal
6
star
11

slang

Slim-inspired templating language for Crystal
Crystal
5
star
12

host_meta

A Web Host Metadata (https://tools.ietf.org/html/rfc6415) client for Crystal.
Crystal
3
star
13

shiken

Basic Rails and Git skills test for candidates.
Ruby
3
star
14

javascript-as3-socket

Git clone of http://code.google.com/p/javascript-as3-socket/ with improvements.
JavaScript
3
star
15

heroku-buildpack-stunt

Heroku buildpack for Stunt.
Shell
2
star
16

openssl_ext

Crystal bindings for OpenSSL RSA
Crystal
2
star
17

ki

A simple mobile agent framework, described in a series of articles for JavaWorld c. 1998.
Java
2
star
18

pwnserver

It's my data and I wants it back!
2
star
19

public_suffix

A small Crystal library designed to make the Public Suffix List (https://publicsuffix.org/) easier to use.
Crystal
2
star
20

compare-cores

Compares two LambdaMOO databases (with extensions).
Perl
2
star
21

moocode-mode

A fork of Rob Myers' Emacs major mode providing syntax highlighting and indentation for MOO code.
Emacs Lisp
2
star
22

rubyweb

Rubyweb - a literate programming system for Ruby
Ruby
1
star
23

zzz

Hypermedia controls.
1
star
24

Scala-for-Scripting

Scala
1
star
25

libxml_ext

Extensions to XML in Crystal.
Crystal
1
star
26

iui

Custom version of the IUI iPhone webapp library.
JavaScript
1
star