emissary

command module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

README

Go Reference Build Status Go Report Card Codecov

Emissary is an open-source project to make a different kind of distributed social medium that is friendly, safe, and welcoming to everyone.

Emissary will give each person a customizable, private space in the Fediverse where they can create, share, and collaborate with the groups of people who matter most to them, both big and small.

Why Emissary?

Human-centric Design

Above all, Emissary is built to be easy enough for regular people to use. End-users deserve a simple, streamlined way to find, post, share, and respond to everything on the web.

So, Grandma should be able to open her iPad, look through the latest baby photos that her kids have posted, and reply with a thought, a smiley, or a picture from her garden.

Designer/Developer Nirvana

While Emissary works "out of the box" every application template can be customized to fit your specific needs.

For designers and developers, Emissary is a low-code environment that offers a rich array of pre-built tools like state machines, validators, and draft versioning, and more. Just wire together the pre-tested steps you need to make your templates shine.

And, there's no central database, so anyone can post a new feature and anyone can import customized templates straight into their Emissary instance.

Safely Customizable

But wide-ranging customization leads to the WordPress pitfall. To avoid this, customized templates in Emissary are not written in a general-purpose language like PHP.

Instead, Emissary templates wire together a wide range of well-tested actions, such as "display this object using this HTML template" or "save a version of this object to the database."

Each template is isolated from others, so bugs in one template won't bleed out into the rest of your site. This should prevent the incompatibility, feature bloat, and bugginess that have plagued the WordPress plugin ecosystem.

Most importantly, because of Emissary's low-code architecture, you'll be able to trust that new features will work alongside existing ones without the hassle.

Baked-In DevOps

Anyone should be able to stand up their own Emissary server. But few people will. Grandma probably won't. For Emissary to be successful, hosting companies must be able to offer new Emissary accounts at the click of a button.

This means that Emissary must be an exemplary citizen in any DevOps workflow. It should be as easy for an individual hobbyist to turn on a test server on a big hosting provider as it is for that big hosting provider to offer hundreds of thousands (or millions) of accounts to the general public at scale.

High Performance

Emissary is built to be fast on any hardware. Lightweight, cacheable templates work with the latest web performance techniques from htmx.org for a web application that always loads quickly and runs smoothly.

Get Started

To get started, visit the Emissary Developer Website. This resource is growing every day, and includes a quickstart guide along with detailed documentation on how to configure Emissary for your own environment.

Feature Checklist

There's a lot of work to do. Check out the project status page and the Emissary kanban for a peek at where we are right now.

Tech Stack

Emissary is intended to be as easy to run and as scalable as possible. Therefore, it is built on solid open-source foundations.

Emissary also relies on a stack of custom libraries that make it go:

  • Hannibal - A robust, idiomatic ActivityPub interfaces in Go
  • Sherlock - Inspect data in ActivityPub/RSS/MicroFormats and more
  • Rosetta - Data mapping and manipulations: schemas, conversions, etc

A complete list can be found in the Go module file.

The Elephant in the Room Internet

It's not really a secret anymore. At its core, our current social media platforms are breaking the Internet and breaking society at large. Online services that survive on advertising revenue foster extremism in exchange for "engagement" in the same way that news networks turn to click-bait and rage-based "commentary" instead of actual journalism.

Unfortunately, moderation is a band-aid at best, and more often an excuse to further fan the flames of hateful rhetoric. Even the most well-intentioned moderation (from humans or AIs) can only cover up this problem instead of addressing its root cause, which is the misaligned goals of advertising revenue (engagement) vs. quality of life and social discourse. There must be a better way.

Enter the Fediverse

This, of course, is not new. The Fediverse and IndieWeb are filled with fantastic and robust open-source solutions to this problem.

But they haven't taken off.

The real reasons will be debated for generations. Emissary is built on the theory that (like much open-source software) existing distributed social media apps are aimed too narrowly at techies and not at the non-techie majority of people. The technical barriers to entry are too high for average people and the network lock-in effects of existing social media are enough to keep the majority of people in place.

Identity and Trust (OpSec)

Of course, bad actors will find ways to abuse any system we create. So the system needs to at least level the playing field against trolls, disinformation warriors, and the like. Emissary will address this by 1) not rewarding viral and "engaging" content, and 2) by making blocks more powerful than likes, allowing your trusted friends to help prevent the spread of hateful content.

Of course, closed groups will still develop their own information silos. There's no way around that. But blocks can act like a vaccine to innoculate the news feeds of people on the extremist fringes, helping to prevent them from falling into (or pull people out of) extremist ideologies.

All About The Money

There's one more thorn in the side of open source social media, which is that there's no easy way to make money on the Fediverse that doesn't fall back on advertising, ultimately falling back into the same trap as centralized social media.

Fortunately, a few closed-source services have already figured this out. Wildly successful companies like Discord and Dropbox use "freemium" pricing to make their services available to everyone for free, then rake in huge profits from the subset of people who will pay more for extra features and capacity.

So, any solution to the distributed social-media dilemma must make space for somebody (probably hosting and design companies) to earn enough money to convince their shareholders to enter and continue in the business.

The WordPress Pitfall

This, too, is not new. WordPress is a hugely successful piece of software that powers something like 37% of all websites on the Internet. A phenomenal achievement.

But there is so much complexity baked into the WordPress ecosystem that launching a website requires a professional designer at best and a pact with a Lovecraftian deity at worst.

A real solution should be as easy to turn on as signing up for Facebook or Twitter, and as easy to customize as picking a feature set from a restaurant menu.

For Site Owners: Any feature or template can be added to an Emissary instance simply by adding its Git address into the configuration tool. When you pick something from the worldwide menu of Emissary features, it's instantly added to all of your sites.

For Designers: Emissary is a low-code environment, where template designers can wire together pre-built actions to create custom templates with sophisticated behaviors.

Redemption Arc

This is all a lot, to say that my best take on social media is to make a solution that:

  1. is free and open-source for everyone to use
  2. plugs into existing federated APIs in an easy, human-centric way
  3. is free from surveillance capitalism and all its horrors
  4. supports freemium business models where honest people can earn honest money.
  5. strikes a balance between customization and stability

Everyone Welcome

While this is as far as I've gotten, I'm certain I've missed something. I welcome your thoughts, ideas, feedback, criticisms, and mockery if it will help create a more realistic and workable solution to "The Elephant in the Internet."

Please try it out, get in touch, file a suggestion, report bugs "@" me, block me, whatever. Just get involved and help make a difference.

Documentation

Overview

Package main is the entry point for the application. It reads the server configuration info, initializes the server.Factory, wires up routes to the appropriate handlers, then starts the HTTP/HTTPS server.

Directories

Path Synopsis
Package build contains build objects, which are passed to HTML templates to generate HTML pages.
Package build contains build objects, which are passed to HTML templates to generate HTML pages.
Package config includes definitions for the Emissary configuration file, along with adapters for reading/writing from the filesystem or a mongodb database.
Package config includes definitions for the Emissary configuration file, along with adapters for reading/writing from the filesystem or a mongodb database.
Package domain contains the domain-level Factory, along with the realtime client/server for SSE connections.
Package domain contains the domain-level Factory, along with the realtime client/server for SSE connections.
Package handler contains all of the HTTP handlers for Emissary.
Package handler contains all of the HTTP handlers for Emissary.
Package middleware contains HTTP middleware that is specific to Emissary.
Package middleware contains HTTP middleware that is specific to Emissary.
Package model contains all of the domain model objects that are used in the system.
Package model contains all of the domain model objects that are used in the system.
step
Package Step encapsulates the DATA required for each pipeline step in the builder.
Package Step encapsulates the DATA required for each pipeline step in the builder.
Package queries contains all of the custom queries required by this application that DO NOT run through the standard `data` package.
Package queries contains all of the custom queries required by this application that DO NOT run through the standard `data` package.
Package server contains the server.Factory, which is the root level factory for the system.
Package server contains the server.Factory, which is the root level factory for the system.
Package service includes all of the services used in Emissary.
Package service includes all of the services used in Emissary.
Package tools contains..
Package tools contains..
cacheheader
Package cacheheader provides a simple parser and serializer for http `Cache-Control` headers
Package cacheheader provides a simple parser and serializer for http `Cache-Control` headers
channels
Package channels includes some nifty tools for manipulating channels
Package channels includes some nifty tools for manipulating channels
convert
Package convert contains Emissary-specific conversions to and from various export formats.
Package convert contains Emissary-specific conversions to and from various export formats.
dataset
Package dataset contains some sets of static data that are embedded into Emissary.
Package dataset contains some sets of static data that are embedded into Emissary.
hmac
Package hmac contains some nifty tools for manipulating HMAC signatures.
Package hmac contains some nifty tools for manipulating HMAC signatures.
id
Package id provides some nifty tools for manipulating mongodb objectIDs.
Package id provides some nifty tools for manipulating mongodb objectIDs.
random
Package random contains some nifty tools for generating rantom numbers.
Package random contains some nifty tools for generating rantom numbers.
s3uri
Package s3uri parses and generates URI strings for Amazon S3 resources.
Package s3uri parses and generates URI strings for Amazon S3 resources.
set
Package set contains some nifty tools for manipulating sets of data, including implementations for slices AND maps.
Package set contains some nifty tools for manipulating sets of data, including implementations for slices AND maps.
tinyDate
Package tinyDate provides a nifty way to format dates, just like those fancy tech-bro's do in Silicon Valley.
Package tinyDate provides a nifty way to format dates, just like those fancy tech-bro's do in Silicon Valley.
val
Package val is a light and cheap collection of validators.
Package val is a light and cheap collection of validators.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL