mirror of
1
Fork 0
Fast, fun, ActivityPub server, powered by Go.
Go to file
kim 7d193de25f
Improve GetRemoteStatus and db.GetStatus() logic (#174)
* only fetch status parents / children if explicity requested when dereferencing

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* Remove recursive DB GetStatus logic, don't fetch parent unless requested

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* StatusCache copies status so there are no thread-safety issues with modified status objects

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* remove sqlite test files

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* fix bugs introduced by previous commit

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* fix not continue on error in loop

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* use our own RunInTx implementation (possible fix for nested tx error)

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* fix cast statement to work with SQLite

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* be less strict about valid status in cache

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* add cache=shared ALWAYS for SQLite db instances

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* Fix EnrichRemoteAccount when updating account fails

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* add nolint tag

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* ensure file: prefixes the filename in sqlite addr

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* add an account cache, add status author account from db

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* Fix incompatible SQLite query

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* *actually* use the new getAccount() function in accountsDB

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* update cache tests to use test suite

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* add RelationshipTestSuite, add tests for methods with changed SQL

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2021-09-01 11:08:21 +02:00
.github Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
cmd/gotosocial Swagger (#124) 2021-07-31 17:49:59 +02:00
docs Database updates (#144) 2021-08-20 12:26:56 +02:00
example add trusted proxy for parsing client IPs (#115) 2021-07-26 16:15:36 +02:00
internal Improve GetRemoteStatus and db.GetStatus() logic (#174) 2021-09-01 11:08:21 +02:00
scripts Api/v1/statuses (#11) 2021-04-19 19:42:19 +02:00
testrig Mention fixup (#167) 2021-08-29 12:03:08 +02:00
vendor Add SQLite support, fix un-thread-safe DB caches, small performance f… (#172) 2021-08-29 16:41:41 +02:00
web frontpage template tweaks (#99) 2021-07-13 18:40:47 +02:00
.drone.yml update drone yml (#153) 2021-08-26 12:36:08 +02:00
.gitignore Oidc (#109) 2021-07-23 10:36:28 +02:00
.readthedocs.yaml requirements.txt for RtD 2021-07-31 17:54:50 +02:00
CONTRIBUTING.md Text/status parsing fixes (#141) 2021-08-16 19:17:56 +02:00
Dockerfile Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
LICENSE add docs and a bunch of other stuff 2021-02-28 15:17:18 +01:00
PROGRESS.md Frodo swaggins (#126) 2021-08-02 19:06:44 +02:00
README.md Add SQLite support, fix un-thread-safe DB caches, small performance f… (#172) 2021-08-29 16:41:41 +02:00
build.sh Improved build script (#152) 2021-08-26 12:19:52 +02:00
dockerbuild.sh Text/status parsing fixes (#141) 2021-08-16 19:17:56 +02:00
dockerpush.sh Text/status parsing fixes (#141) 2021-08-16 19:17:56 +02:00
generateswagger.sh Swagger (#124) 2021-07-31 17:49:59 +02:00
go.mod Add SQLite support, fix un-thread-safe DB caches, small performance f… (#172) 2021-08-29 16:41:41 +02:00
go.sum Add SQLite support, fix un-thread-safe DB caches, small performance f… (#172) 2021-08-29 16:41:41 +02:00
lint.sh Swagger (#124) 2021-07-31 17:49:59 +02:00
mkdocs.yml Swagger (#124) 2021-07-31 17:49:59 +02:00
version put version in binary properly (#73) 2021-06-28 12:17:20 +02:00

README.md

GoToSocial

patrons receives

GoToSocial is an ActivityPub social network server, written in Golang.

GoToSocial provides a lightweight, customizable, and safety-focused entryway into the Fediverse, and is comparable to (but distinct from) existing projects such as Mastodon, Pleroma, Friendica, and PixelFed.

With GoToSocial, you can keep in touch with your friends, post, read, and share images and articles, without being tracked or advertised to.

Documentation is at docs.gotosocial.org. You can skip straight to the API documentation here.

Features

Federation

Because GoToSocial uses the ActivityPub protocol, you can hang out not just with people on your home server, but with people all over the Fediverse, seamlessly.

Mastodon API compatible

Full support for modern, elegant apps like Tusky and Pinafore.

Tusky Pinafore
An image of GoToSocial in Tusky An image of GoToSocial in Pinafore

Granular post settings

You should be able to choose how your posts can be interacted with:

  • Local-only posts.
  • Rebloggable/boostable toggle.
  • 'Likeable' toggle.
  • 'Replyable' toggle.

Easy customizability for admins

  • Adjustable post length.
  • Media upload size settings.

LetsEncrypt

Built-in, automatic support for secure HTTPS with LetsEncrypt.

Light footprint and good performance

Plays nice with lower-powered machines like Raspberry Pi, old laptops and tiny VPSes.

Easy to deploy

No external dependencies apart from a database. Just download the binary + assets (or Docker container), and run.

HTTP signature authentication

Protect your data.

User Safety

Strict privacy enforcement for posts and strict blocking logic.

Subscribeable and shareable allow/denylists for federation

Import and export allowlists and denylists. Subscribe to community-created blocklists (think Adblocker, but for federation!).

Various federation modes

  • 'Normal' federation; discover new servers.
  • Allowlist-only federation; choose which servers you talk to.
  • Zero federation; keep your server private.

Wishlist

These cool things will be implemented if time allows (because we really want them):

  • Groups and group posting!
  • Reputation-based 'slow' federation.
  • Community decision making for federation and moderation actions.
  • User-selectable custom templates for rendering public posts:
    • Twitter-style
    • Blogpost
    • Gallery
    • Etc.

Design Ethos

One of the key differences between GoToSocial and other federated server projects is that GoToSocial doesn't include an integrated client front-end (ie., a webapp).

Instead, like Matrix.org's Synapse project, it provides only a server implementation, some static pages, and a well-documented API. On top of this API, developers are free to build any front-end implementation or mobile application that they wish.

Because the server implementation is as generic and flexible/configurable as possible, GoToSocial provides the basis for many different types of social media experience, whether Tumblr-like, Facebook-like, or Twitter-like.

Status

Work began on the project around February 2021, and the project is still in prerelease.

At this point, GoToSocial is already deployable and very useable, and it federates cleanly with most other Fediverse servers (not yet all).

For a detailed view on what's implemented and what's not, and progress made towards a first v0.1.0 (beta) release, see here.

Getting Started

Proper documentation for running and maintaining GoToSocial will be forthcoming in the first release.

For now (if you want to run it pre-alpha, like a beast), check out the quick and dirty getting started guide.

Contributing

You wanna contribute to GtS? Great! ❤️❤️❤️ Check out the issues page to see if there's anything you wanna jump in on, and read the CONTRIBUTING.md file for guidelines and setting up your dev environment.

Contact

For questions and comments, you can join our Matrix channel at #gotosocial:superseriousbusiness.org. This is the quickest way to reach the devs. You can also mail admin@gotosocial.org.

For bugs and feature requests, please check to see if there's already an issue, and if not, open one or use one of the above channels to make a request (if you don't have a Github account).

Credits

The following libraries and frameworks are used by GoToSocial, with gratitude 💕

Image Attribution

Sloth logo made by Freepik from www.flaticon.com.

Sponsorship + Funding

Currently, this project is funded using Liberapay, to put bread on the table while work continues on it.

If you want to sponsor this project, you can do so here! <3

License

GoToSocial is licensed under the GNU AGPL v3 LICENSE.

Copyright (C) 2021 the GoToSocial Authors.