Powerful, configurable and modular federated server using the Versia Protocol
Find a file
2024-05-02 14:05:14 -10:00
.github test(api): Give JWT key to GitHub Actions test build 2024-04-17 22:55:37 -10:00
.vscode fix(federation): 🐛 Fix wrong URI being generated in federated posts 2024-04-16 11:20:18 -10:00
assets Add screenshots of Lysand's web client for desktop and mobile 2024-03-13 18:04:49 -10:00
benchmarks Refactors, bugfixing 2024-04-07 17:28:18 -10:00
config feat(api): Make Lysand a full OAuth2/OpenID Connect provider as well as still Mastodon compatible 2024-04-17 22:42:12 -10:00
database refactor(api): 🎨 Move createLocalUser to a static method of User 2024-04-24 17:48:39 -10:00
docs docs: 📝 Update docs 2024-05-01 18:45:27 -10:00
drizzle fix(api): 🚑 Fix using an incorrect email or password giving weird errors 2024-04-28 13:47:14 -10:00
packages fix(api): 🚑 Fix using an incorrect email or password giving weird errors 2024-04-28 13:47:14 -10:00
server/api feat(api): Reimplement HTML sanitization 2024-05-02 13:25:32 -10:00
tests test(api): Fix failing OAuth test (bug) 2024-05-01 18:58:07 -10:00
types Delete old type files 2024-04-14 01:22:02 -10:00
utils fix(frontend): 🐛 Add unsafe-inline to CSP for frontend 2024-05-02 14:05:14 -10:00
.dockerignore chore: Update Docker build push action version + try to fix build 2023-12-08 15:00:02 -10:00
.gitignore feat: Allow specifying custom TLS certificate, key and CA 2024-04-17 15:53:42 -10:00
API.md Add more moderation systems, document new APIs 2024-03-03 18:33:25 -10:00
beemovie.txt Remove old pages/ directory 2024-04-09 01:55:03 -10:00
biome.json refactor(database): 🎨 Refactor note handling into its own class instead of separate functions 2024-04-16 18:09:21 -10:00
build.ts fix(build): 🚑 Fix Lysand not starting due to missing sed command 2024-04-24 18:43:53 -10:00
bun.lockb fix: 🎨 Switch from happy-dom to jsdom for HTML sanitization 2024-05-02 13:53:10 -10:00
bunfig.toml Fix media code, clean up old types 2024-03-10 13:57:26 -10:00
cli.ts refactor(api): 🎨 Move createLocalUser to a static method of User 2024-04-24 17:48:39 -10:00
CODE_OF_CONDUCT.md [fix] add contributor contact info to COC 2024-04-14 23:29:33 +02:00
CONTRIBUTING.md docs: 📝 Updated documentation for Lysand 0.4 2024-04-14 13:33:02 -10:00
docker-compose.yml docs: 📝 Update docs 2024-05-01 18:45:27 -10:00
Dockerfile chore(build): 📦 Revert bun-node version to 1.1.5 2024-05-01 19:04:22 -10:00
drizzle.config.ts feat: Allow specifying custom TLS certificate, key and CA 2024-04-17 15:53:42 -10:00
entrypoint.sh feat(api): Implement /v1/instance/rules and /v1/instance/extended_description 2024-04-14 19:08:16 -10:00
index.ts feat(federation): Add avatar attribute to WebFinger 2024-04-19 07:55:32 -10:00
LICENSE Add better README 2023-09-14 15:42:56 -10:00
package.json fix: 🎨 Switch from happy-dom to jsdom for HTML sanitization 2024-05-02 13:53:10 -10:00
README.md docs: 📝 Update docs 2024-05-01 18:45:27 -10:00
routes.ts feat(api): Make Lysand a full OAuth2/OpenID Connect provider as well as still Mastodon compatible 2024-04-17 22:42:12 -10:00
SECURITY.md Add security policy 2023-11-19 16:34:59 -10:00
server.ts refactor(api): 🎨 Add better headers when serving API requests and client requests 2024-05-02 12:46:21 -10:00
tsconfig.json Begin work on sending emails 2024-04-11 11:50:05 -10:00
types.d.ts refactor(api): 🎨 Improve Markdown parsing with markdown-it instead of marked 2024-04-22 11:02:09 -10:00

Lysand Logo

Postgres Bun VS Code Insiders TypeScript Linux Docker Contributor Covenant

What is this?

This is a project to create a federated social network based on the Lysand protocol. It is currently in beta phase, with basic federation and almost complete Mastodon API support.

This project aims to be a fully featured social network, with a focus on privacy, security, and performance. It implements the Mastodon API for support with clients that already support Mastodon or Pleroma.

Note

This project is not affiliated with Mastodon or Pleroma, and is not a fork of either project. It is a new project built from the ground up.

Features

  • Federation (partial)
  • Hyper fast (thousands of HTTP requests per second)
  • S3 or local media storage
  • Deduplication of uploaded files
  • Federation limits
  • Configurable defaults
  • Full regex-based filters for posts, users and media
  • Custom emoji support
  • Automatic image conversion to WebP or other formats
  • Scripting-compatible CLI with JSON and CSV outputs
  • Moderation tools
  • Mastodon API support (partial)

Screenshots

You can visit https://social.lysand.org to see a live instance of Lysand with Lysand-FE.

Benchmarks

Note

These benchmarks are not representative of real-world performance, and are only meant to be used as a rough guide. Load, and therefore performance, will vary depending on the server's hardware and software configuration, as well as user activity.

Timeline Benchmarks

You may run the following command to benchmark the /api/v1/timelines/home endpoint:

TOKEN=token_here bun benchmark:timeline <request_count>

The request_count variable is optional and defaults to 100. TOKEN is your personal user token, used to login to the API.

On a quad-core laptop:

$ bun run benchmarks/timelines.ts 100
✓ All requests succeeded
✓ 100 requests fulfilled in 0.12611s
$ bun run benchmarks/timelines.ts 1000
✓ All requests succeeded
✓ 1000 requests fulfilled in 0.90925s
$ bun run benchmarks/timelines.ts 10000
✓ All requests succeeded
✓ 10000 requests fulfilled in 12.44852s

Lysand is extremely fast and can handle thousands of HTTP requests per second on a good server.

How do I run it?

Please see the installation guide for more information on how to install Lysand.

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file for more information.

Planned Extra Features

  • Send notifications to moderators when a report is received
  • Email notifications on certain actions

Federation

The following extensions are currently supported or being worked on:

  • org.lysand:custom_emojis: Custom emojis

API

Lysand implements the Mastodon API (as well as Glitch-Soc extensions). The API is currently almost fully complete, with some fringe functionality still being worked on.

Working endpoints are:

  • /api/v1/accounts/:id/block
  • /api/v1/accounts/:id/follow
  • /api/v1/accounts/:id/followers
  • /api/v1/accounts/:id/following
  • /api/v1/accounts/:id/lists
  • /api/v1/accounts/:id/mute
  • /api/v1/accounts/:id/note
  • /api/v1/accounts/:id/pin
  • /api/v1/accounts/:id/remove_from_followers
  • /api/v1/accounts/:id/statuses
  • /api/v1/accounts/:id/unblock
  • /api/v1/accounts/:id/unfollow
  • /api/v1/accounts/:id/unmute
  • /api/v1/accounts/:id/unpin
  • /api/v1/accounts/:id
  • /api/v1/accounts/familiar_followers
  • /api/v1/accounts/relationships
  • /api/v1/accounts/update_credentials
  • /api/v1/accounts/verify_credentials
  • /api/v1/accounts
  • /api/v1/announcements/:id/dismiss
  • /api/v1/announcements/:id/reactions/:name (PUT, DELETE)
  • /api/v1/announcements
  • /api/v1/apps/verify_credentials
  • /api/v1/apps
  • /api/v1/blocks
  • /api/v1/conversations/:id/read
  • /api/v1/conversations/:id
  • /api/v1/conversations
  • /api/v1/custom_emojis
  • /api/v1/directory
  • /api/v1/domain_blocks (GET, POST, DELETE)
  • /api/v1/endorsements
  • /api/v1/favourites
  • /api/v1/featured_tags/:id (DELETE)
  • /api/v1/featured_tags/suggestions
  • /api/v1/featured_tags (GET, POST)
  • /api/v1/follow_requests/:account_id/authorize
  • /api/v1/follow_requests/:account_id/reject
  • /api/v1/follow_requests
  • /api/v1/follow_suggestions
  • /api/v1/followed_tags
  • /api/v1/instance/activity
  • /api/v1/instance/domain_blocks
  • /api/v1/instance/extended_description
  • /api/v1/instance/peers
  • /api/v1/instance/rules
  • /api/v1/instance
  • /api/v1/lists/:id/accounts (GET, POST, DELETE)
  • /api/v1/lists/:id (GET, PUT, DELETE)
  • /api/v1/lists (GET, POST)
  • /api/v1/markers (GET, POST)
  • /api/v1/media/:id
  • /api/v1/mutes
  • /api/v1/notifications/:id/dismiss
  • /api/v1/notifications/:id
  • /api/v1/notifications/clear
  • /api/v1/notifications
  • /api/v1/polls/:id/votes
  • /api/v1/polls/:id
  • /api/v1/preferences
  • /api/v1/profile/avatar (DELETE)
  • /api/v1/profile/header (DELETE)
  • /api/v1/reports
  • /api/v1/scheduled_statuses/:id (GET, PUT, DELETE)
  • /api/v1/scheduled_statuses
  • /api/v1/statuses/:id/bookmark
  • /api/v1/statuses/:id/context
  • /api/v1/statuses/:id/favourite
  • /api/v1/statuses/:id/favourited_by
  • /api/v1/statuses/:id/history
  • /api/v1/statuses/:id/mute
  • /api/v1/statuses/:id/pin
  • /api/v1/statuses/:id/reblog
  • /api/v1/statuses/:id/reblogged_by
  • /api/v1/statuses/:id/source
  • /api/v1/statuses/:id/translate
  • /api/v1/statuses/:id/unbookmark
  • /api/v1/statuses/:id/unfavourite
  • /api/v1/statuses/:id/unmute
  • /api/v1/statuses/:id/unpin
  • /api/v1/statuses/:id/unreblog
  • /api/v1/statuses/:id (GET, DELETE)
  • /api/v1/statuses/:id (PUT)
  • /api/v1/statuses
  • /api/v1/suggestions/:account_id (DELETE)
  • /api/v1/tags/:id/follow
  • /api/v1/tags/:id/unfollow
  • /api/v1/tags/:id
  • /api/v1/timelines/home
  • /api/v1/timelines/list/:list_id
  • /api/v1/timelines/public
  • /api/v1/timelines/tag/:hashtag
  • /api/v1/trends/links
  • /api/v1/trends/statuses
  • /api/v1/trends/tags
  • /api/v2/filters/:filter_id/keywords (GET, POST)
  • /api/v2/filters/:filter_id/statuses (GET, POST)
  • /api/v2/filters/:id (GET, PUT, DELETE)
  • /api/v2/filters/keywords/:id (GET, PUT, DELETE)
  • /api/v2/filters/statuses/:id (GET, DELETE)
  • /api/v2/filters (GET, POST)
  • /api/v2/instance
  • /api/v2/media
  • /api/v2/search
  • /api/v2/suggestions
  • /oauth/authorize
  • /oauth/token
  • Admin API

Main work to do

  • Announcements
  • Polls
  • Tags
  • Lists
  • Scheduled statuses
  • WebSockets
  • Push notifications
  • Trends
  • Suggestions
  • Bookmarks
  • Translation
  • Reports
  • Admin API

License

This project is licensed under the AGPL-3.0.