Giter Club home page Giter Club logo

wafrn's Introduction

WAFRN

Wafrn is an opensource social network that connects with the fediverse. The frontend is tumblr-inspired. The "main" wafrn server is app.wafrn.net but you can host your own if you're unhappy with my moderation style or simply and more probable, you would like to host your own stuff.

What will you need

Before trying to host your own wafrn, we advice you to please, very please, join our matrix channel to get support

First of all, you will need a DEBIAN 12 vps. The cheap contabo one can do the trick with no problem. Maybe even the ovh one that costs 3 euros too. But I advice as a minimum the contabo one. You also need a domain. You will also need a way of sending emails to the people registering.. An SMTP server or a free brevo account with smtp enabled can do the trick.

First steps

First, point the domain to your debian vps. Once that is done, we download the installer and execute it, as root. The installer will install all required packages, create the user and clone the repo and configure apache.

DO NOT PRESS ENTER BLINDLY DURING THE INSTALL PROCESS, as it will ask some stuff and my bash-fu is not that good

Remember, run this as root!

wget https://raw.githubusercontent.com/gabboman/wafrn/main/install/installer.sh
bash installer.sh

This script will download all requirements and will create an user in your system.

Follow the instructions of the script. It will leave the system ready with wafrn installed, the frontend deployed and the server ready to start. You're almost there!

Populate database

Ok, we have the stuff ready. Log in as the user we just created (it has asked it during the previous script)

Now we will edit the backend environment file In this file, we edit the line forceSync and we set it to true to force it to create the database

cd wafrn
nano packages/backend/environment.ts
#forceSync: false -> forceSync: true

There is also an option called adminPassword. You can edit it too and set the admin password. In this state, it should be a random password.

Once we have edited the environment file, we can do the first start of the backend!

#We execute this command in the root of the project, in the wafrn folder.
pm2 start --name wafrn start.sh

After this, we need to set the forcesync to false in the previous file, and to delete the password from the environment.ts file

This step is VERY IMPORTANT. Without it, it will DESTROY YOUR DATABASE every time wafrn starts!

nano packages/backend/environment.ts
#forceSync: true -> forceSync: false

Now that we have the database ready and the environment ready, we register the workers with pm2

pm2 start --name workers -i max script_workers.sh
pm2 save
pm2 startup

This last command asks you to run something as root. Do it, so when the server restarts wafrn will also start.

You're ready!

Remember, remove the admin password from the environment.ts in the backend package!

Update wafrn

To update wafrn, you just do the command npm run full:upgrade in the wafrn folder.

This will do a pull the latest changes and keep the waffle up to date

Written with StackEdit.

wafrn's People

Contributors

alurienflame avatar birddude1230 avatar dependabot[bot] avatar elevchyt avatar fireisgood avatar gabboman avatar gingeh avatar gomezwannaz-santiago avatar juandjara avatar mindcool25 avatar saidamir-sh avatar schavi avatar stelin41 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wafrn's Issues

login registration

while trying to register it asks for a birthdate which forces a datepicker which starts on July 1 2009. Attempts to change the year are a monkey test of frustration, one month at a time. can't type a date or paste a date. crap datepicker or screw this... Go ahead, try to register for your own instance. fix please! Like the looks of what I've seen

own profile dropdown see pic

option to unfollow/mute/block self. afraid to try any but seems wrong. just in the mood to report bugs today. this has been around a while.
wafrnprofileunfollowmuteblock

Can't update the theme correctly

Hi, I tried updating the theme on my end by adding the following CSS, but it only worked on the dashboard and not on profiles:


.p-card { 
background: #fff;
color: #000;
}
a { 
color: #3366cc;
}
.ql-snow>.ql-editor {
color: #000;
}

[Bug] Mobile interface on Android keeps adding newlines before the start of my post

Platform: Android, wafrn mobile website pinned to homescreen via Firefox.
Expected behavior: No alterations are made to my post as I am typing it.
Unexpected behavior: When I go to make a new post on mobile, several newlines are added before my very eyes to the start of my posts. This does not happen when I access wafrn's desktop interface on a desktop computer. This behavior is inconsistent and does not always happen.

To reproduce:

  1. While on wafrn on mobile Firefox, open the menu and hit either "Install" or "Add to home screen."
  2. Open the shortcut this creates.
  3. Hit the button to create a new post and start typing.
  4. If the bug decides to show up (I tried and failed to reproduce and record it for the sake of this bug report), several newlines will be placed in your post while you are still typing.

Queuing delivery

I'm seeing that

async function postPetitionSigned(message: object, user: any, target: string): Promise<any> {
is basically sending the AP object in the same HTTP call as some activities (such as accepting follow requests), and i think it would be more useful to put that kind of stuff in queuing, or at least, to make sure it retries if it fails.

This'll make wafrn more resilient, especially against offline instances.

Collapse threads in the middle, not the end

Just a suggestion, but when viewing threads in someone's page, it currently looks like this:

  • A (OP)
  • B
  • C
  • A
  • D
  • "Read more"

instead of that, why not collapse it like this?

  • A (OP)
  • "Expand"
  • D
  • A
  • B
  • A (latest)

[Feature request] Antennas like Misskey and Firefish

Antennas, as implemented by Misskey and Firefish, allow users to aggregate the latest posts from either (or both) multiple keywords, users and/or instances without having to publicly follow anyone. It would help users specify what they wish to read in their private alt-timelines.

Allow resolving actor uris via webfinger

Heya, I'm working on a different ActivityPub implementation (Iceshrimp.NET) and would like to ask if you could support querying users by their AP actor URI in your WebFinger implementation. All the major AP implementers support it, and it'd allow you to federate with Iceshrimp.NET until we've added support for this edge case.

Thanks in advance, Laura

Hide consecutive reply-threads in profile

So lets say someone is replying a bunch in a thread, and having a conversation:

  1. A
  2. B
  3. A
  4. B
  5. A
  6. B
  7. A

This longest post would appear first in their profile

However, scrolling down, their previous replies would show up as independent threads below that:

  1. A
  2. B
  3. A
  4. B
  5. A

(And)

  1. A
  2. B
  3. A

(etc.)


What if instead, the frontend (or the backend) will hide these additional duplicates from the feed, allowing only a single consistent one to appear at the top?

This is easily doable:

  • Remember every thread seen, note down all replies from A (the viewed profile)
  • When loading an additional thread, if the latest reply is in the above noted list, skip over it, because then the user has already seen that the entire thread before when loading it.

Invalid attributedTo property from GET requests

When fetching a status, the attributedTo property is set with an invalid URI.

Can be reproduced with this example:

curl -H 'accept: application/ld+json'  https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308|jq
{                    
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {                     
      "ostatus": "http://ostatus.org#", 
      "atomUri": "ostatus:atomUri",                                               
      "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
      "conversation": "ostatus:conversation",
      "sensitive": "as:sensitive",
      "toot": "http://joinmastodon.org/ns#",
      "votersCount": "toot:votersCount",                                          
      "blurhash": "toot:blurhash",
      "focalPoint": {
        "@container": "@list",
        "@id": "toot:focalPoint"                                                                                                                                    
      }                    
    }           
  ], 
  "id": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308",                          
  "type": "Create",                                                                                                                                                 
  "actor": "https://app.wafrn.net/fediverse/blog/gabboman",
  "published": "2023-02-23T00:00:00.000Z",
  "to": [
    [
      "https://www.w3.org/ns/activitystreams#Public"
    ]                                                                                                                                                               
  ],
  "cc": [
    "https://app.wafrn.net/fediverse/bloggabboman/followers",
    "https://octodon.social/users/cwebber/inbox",
    "https://fosstodon.org/users/Graycot/inbox"
  ],
  "object": {
    "id": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308",
    "type": "Note",
    "summary": "",
    "inReplyTo": "https://fosstodon.org/users/Graycot/statuses/109910827137560274",
    "published": "2023-02-23T00:00:00.000Z",
    "url": "https://app.wafrn.net/post/13d9e38b-c360-484f-8e1f-532c2584a308",
    "attributedTo": "undefined/fediverse/blog/gabboman",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "cc": [
      "https://app.wafrn.net/fediverse/bloggabboman/followers",
      "https://octodon.social/users/cwebber/inbox",
      "https://fosstodon.org/users/Graycot/inbox"
    ],
    "sensitive": false,
    "atomUri": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308",
    "inReplyToAtomUri": "https://fosstodon.org/users/Graycot/statuses/109910827137560274",
    "conversation": "",
    "content": "<p><a href=\"https://fosstodon.org/users/Graycot\" >@[email protected]</a><a href=\"https://octodon.social/users/cwebber\" >@[email protected]</a> in their defense this happened to me on my beta.</p><p><br></p><p>private messages were not a feature here hee hee</p>",
    "attachment": [],
    "tag": [
      {
        "type": "Mention",
        "name": "[email protected]",
        "href": "https://fosstodon.org/users/Graycot"
      },
      {
        "type": "Mention",
        "name": "[email protected]",
        "href": "https://octodon.social/users/cwebber"
      }
    ],
    "replies": {
      "id": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308/replies",
      "type": "Collection",
      "first": {
        "type": "CollectionPage",
        "next": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308/replies&page=true",
        "partOf": "https://app.wafrn.net/fediverse/post/13d9e38b-c360-484f-8e1f-532c2584a308/replies",
        "items": []
      }
    }
  }
}

Where "attributedTo": "undefined/fediverse/blog/gabboman" can't obviously be used to fetch the author's profile.

Wafrn sending messages to all instances?

I run a small microblog.pub instance at https://blog.joaocosta.eu, and today I started to receive multiple messages in my inbox from wafrn users.

I don't follow nor am followed by anyone from Wafrn, so I assume my instance was somehow discovered by Wafrn and it sends messages to all known instances? Looking at friendica/friendica#13152 (comment), I think this already happened in the past.

Either way, here's an example message:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "ostatus": "http://ostatus.org#",
      "atomUri": "ostatus:atomUri",
      "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
      "conversation": "ostatus:conversation",
      "sensitive": "as:sensitive",
      "toot": "http://joinmastodon.org/ns#",
      "votersCount": "toot:votersCount",
      "blurhash": "toot:blurhash",
      "focalPoint": {
        "@container": "@list",
        "@id": "toot:focalPoint"
      }
    }
  ],
  "id": "https://app.wafrn.net/fediverse/activity/post/bab28b15-8df7-47c6-b0fe-a8de481b2fcb",
  "type": "Create",
  "actor": "https://app.wafrn.net/fediverse/blog/gabboman",
  "published": "2023-07-04T21:00:30.000Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "https://app.wafrn.net/fediverse/blog/gabboman/followers"
  ],
  "cc": [],
  "object": {
    "id": "https://app.wafrn.net/fediverse/post/bab28b15-8df7-47c6-b0fe-a8de481b2fcb",
    "type": "Note",
    "summary": "",
    "inReplyTo": "https://app.wafrn.net/fediverse/post/627f1e9f-6ab8-48bf-bba2-5243203a105a",
    "published": "2023-07-04T21:00:30.000Z",
    "url": "https://app.wafrn.net/fediverse/post/bab28b15-8df7-47c6-b0fe-a8de481b2fcb",
    "attributedTo": "https://app.wafrn.net/fediverse/blog/gabboman",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "https://app.wafrn.net/fediverse/blog/gabboman/followers"
    ],
    "cc": [],
    "sensitive": false,
    "atomUri": "https://app.wafrn.net/fediverse/post/bab28b15-8df7-47c6-b0fe-a8de481b2fcb",
    "inReplyToAtomUri": "https://app.wafrn.net/fediverse/post/627f1e9f-6ab8-48bf-bba2-5243203a105a",
    "content": "<p>update no i wont, they dont wana comply with gdpr</p><br>",
    "attachment": [],
    "tag": []
  },
  "signature": {
    "type": "RsaSignature2017",
    "creator": "https://app.wafrn.net/fediverse/blog/gabboman",
    "domain": "app.wafrn.net",
    "nonce": "dd2e984d76aaa0ec798f6661526917d5",
    "created": "2023-07-04T21:00:30.000Z",
    "signatureValue": "KlP1L7wnsd0yv35LvBo07MVG8KgTHExBiV75e5IJUjKi1LZcOEei0+PkUMZK44KSmOUv15BN7h8VuMPV3E1vbytgtFUE0TsN+6usSg3LrxZLvYJJXZOkyOzZ/o3QRaBQlgIfDBlKhb5Yjg5JhVBfU8jnuDEKB3QjxxzUEwnd4MSedtmysA3cpZS2sh0fM9pX7ZGbtohfuUrF5n/nLZkN0GSZDZvzdGL0tfNgyHvkXVvmxi/oE7tp7SlZ/0wpFtA5cHJK30+6CajdhAp5hUa0X9uSSlXRrbS98Vyn3fTkNkrpzvz4VTYS2IF5iq5oUKgqUFF6NFyX4VLZDZXpLjIjc6ewuSHvjXIe+8D+l6gNbIZ8ZWh7E/XbNjwXGjVubocyFUyZOV5sN+zf83O4s1H8hAWnBFB2ftz0pfRkgiZEnmKrDD8j1Cy/xOxX+KeWOFkmyAuKo+rTrI0jn82edOZKIvveq8YZCa+mnxXRfAT6RZ/beMQgYMg7sfl4gmA5oBPc9hHfCkqK4AWKmj5HwN8X/cdbeD4jG6TZyBy+S4TltiRM18vaKbcEZ/cWqdLewcPzsusyOdTe1D178Vy71tJwFENWKSI1AEpPRnQiRp6rNqnmSdvc4saUJQSyvaeFfXAvtXoxtWfvA9b1PdDOfc/kMGO1jRWlD6kPj56ulxXdkF4="
  }
}

P.S.: I'm not sure if this is the expected behavior, but unfortunately I (and I imagine other admins from small instances) can't risk having a huge spike of traffic from wafrn and will have no choice but to defederate.

Broken ActivityPub interop

I receive that several times each day:
{"@context":["https://www.w3.org/ns/activitystreams","https://app.wafrn.net/contexts/litepub-0.1.jsonld"],"actor":"https://app.wafrn.net/fediverse/blog/wubsbian","to":["https://www.w3.org/ns/activitystreams#Public","https://app.wafrn.net/fediverse/blog/wubsbian/followers"],"cc":[null],"id":"https://app.wafrn.net/fediverse/likes/96b4020d-5d44-4e2e-b595-e6b76cd0351f/1438884d-cbbe-4228-8e61-1013f7a14df1","object":null,"type":"Like"}

  1. Why I get this in my ActivityPub server inbox? I'm not in cc
  2. Why object is null? cc is null?

Implement FEP-dc88: Formatting Mathematics #2410

FEP-dc88 has been put forward as an attempt to standardize mathematical typesetting on the fediverse. Please see the tracking issue and forum discussion for more information. Glitch-soc already implements rich-text formatting, and mathematical formatting is a desired feature for it to implement (see glitch-soc/mastodon#1432 glitch-soc/mastodon#1934)
Motivation

Mathematical typesetting is an important tool on the fediverse, and several instances have mechanisms in place to do so. However, mathematical formatting is currently nonstandard and leads to incompatible rendering of posts between instances. FEP-dc88 aims to create a standard for this formatting, and implementation of it would lead to a wide, compatible ecosystem of mathematical typesetting on the fediverse.

Mobile web: Swipe up on full screen media to open media from another post

  • After opening media (images, video, galleries) in the full screen lightbox display, a user should be able to swipe up to open another media in full screen from users, hashtags or lists one follows.
  • Media in full screen would, at the bottom, show the user, a follow button, first line from any text in the container post, a "more" link to open the main post, and post action buttons (fave, reshare/quote, bookmark, reply).
  • Alt text would display above the post summary text
  • Swiping up may either pull from the latest posts or random posts from the aforementioned sources.

This can work like how Tumblr's app currently works. This should also be an optional setting which can be turned on/off in settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.