GithubHelp home page GithubHelp logo

cloudflare / wildebeest Goto Github PK

View Code? Open in Web Editor NEW
2.0K 25.0 399.0 2.53 MB

Wildebeest is an ActivityPub and Mastodon-compatible server

License: Other

TypeScript 97.31% JavaScript 1.02% SCSS 0.58% HCL 0.61% HTML 0.47%

wildebeest's Introduction

⚠️ This project has been archived and is no longer actively maintained or supported. Feel free to fork this repository, explore the codebase, and adapt it to your needs. Wildebeest was an opportunity to showcase our technology stack's power and versatility and prove how anyone can use Cloudflare to build larger applications that involve multiple systems and complex requirements.

Wildebeest

wildebeest illustration

Wildebeest is an ActivityPub and Mastodon-compatible server whose goal is to allow anyone to operate their Fediverse server and identity on their domain without needing to keep infrastructure, with minimal setup and maintenance, and running in minutes.

Wildebeest runs on top Cloudflare's Supercloud, uses Workers, Pages, Durable Objects, Queues, the D1 database to store metadata and configurations, Zero Trust Access to handle authentication and Images for media handling.

Currently, Wildebeest supports the following features:

  • ActivityPub, WebFinger, NodeInfo, WebPush and Mastodon-compatible APIs. Wildebeest can connect to or receive connections from other Fediverse servers.
  • Compatible with the most popular Mastodon web (like Pinafore), desktop, and mobile clients. We also provide a simple read-only web interface to explore the timelines and user profiles.
  • You can publish, edit, boost, or delete posts, sorry, toots. We support text, images, and (soon) video.
  • Anyone can follow you; you can follow anyone.
  • You can search for content.
  • You can register one or multiple accounts under your instance. Authentication can be email-based on or using any Cloudflare Access compatible IdP, like GitHub or Google.
  • You can edit your profile information, avatar, and header image.
  • You can do account migrations from Mastodon to Wildebeest servers.

Cloudflare will continue to evolve this open-source project with additional features over time and listen to the community feedback to steer our priorities. Pull requests and issues are welcome too.

Please read our announcement blog for more details on how we built Wildebeest.

Tutorial

Follow this tutorial to deploy Wildebeest:

wildebeest's People

Contributors

celso avatar cherry avatar chroju avatar cyberflamego avatar dario-piotrowicz avatar datadrivenmd avatar dependabot[bot] avatar edevil avatar eltociear avatar imgbot[bot] avatar jculvey avatar kelvin27315 avatar koehn avatar kphrx avatar outpostryan avatar petebacondarwin avatar xmflsct avatar xtuc avatar yug1224 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

wildebeest's Issues

Publish DO failed with Authentication error

log

$ Running: wrangler publish --config do/wrangler.toml
 ⛅️ wrangler 2.8.0 
-------------------
✘ [ERROR] ParseError: A request to the Cloudflare API (/accounts/***/workers/services/wildebeest-do) failed.

      at throwFetchError (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:1[23](https://github.com/codehz/wildebeest/actions/runs/3972551377/jobs/6810556763#step:19:24)033:17)
      at fetchResult (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:123002:5)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async publish (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:126733:31)
      at async Object.publishHandler [as handler] (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:141579:3) {
    text: 'A request to the Cloudflare API (/accounts/***/workers/services/wildebeest-do) failed.',
    notes: [ { text: 'Authentication error [code: 10000]' } ],
    location: undefined,
    kind: 'error',
    code: 10000
  }



✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts) failed.

  Authentication error [code: 10000]
  
  If you think this is a bug, please open an issue at: https://github.com/cloudflare/wrangler2/issues/new/choose

note: I use the generated token from deploy to workers button

Deploy process does not create a Cloudflare Pages project

The step Add Queue to Producer Pages in Deploy.yml makes a call to the PATCH endpoint of the cloudflare pages API. This will update the project if it exists, but will fail on first run if the project doesn't exist. I was able to work around this by executing this command from my terminal then running the workflow again.

Ideally the workflow should check if the workflow exists and create it if it's missing OR update an existing project:

curl https://api.cloudflare.com/client/v4/accounts/***/pages/projects/ \                                            
      -X POST \
      -H 'Authorization: Bearer ***' \
      -d  '{ "name": "wildebeest-<username>", "production_branch": "main",
          "deployment_configs": {
            "production": {
              "queue_producers": {
                "QUEUE": {
                  "name": "wildebeest"
                }
              }
            }
          }
        }'

Unable to log in

After much mucking about, I was able to install the application, created a login policy, and I can see the main page.

When I try to log in using an app (I tried pinafore, the Mastodon iOS app, and Ivory):

  1. I enter my email address, corresponding to the policy I created
  2. I enter the validation code that gets sent to my email

At this point, I get a blank page with a URL like https://dogfood.social/oauth/authorize?client_id=[redacted]&redirect_uri=https%3A%2F%2Fpinafore.social%2Fsettings%2Finstances%2Fadd&response_type=code&scope=read%20write%20follow%20push.

If I View Source from a browser, the source of the login page is empty (no HTML at all).

In the logs I see the following:

{
  "outcome": "ok",
  "scriptName": "pages-worker--844423-production",
  "exceptions": [],
  "logs": [
    {
      "message": [
        "-> GET https://dogfood.social/oauth/authorize?client_id=[redacted]&redirect_uri=https%3A%2F%2Fpinafore.social%2Fsettings%2Finstances%2Fadd&response_type=code&scope=read%20write%20follow%20push "
      ],
      "level": "log",
      "timestamp": 1675971779529
    },
    {
      "message": [
        "<- 200"
      ],
      "level": "log",
      "timestamp": 1675971779652
    },
    {
      "message": [
        "Error: invalid handle: localPart: https://dogfood.social/ap/users/brad"
      ],
      "level": "error",
      "timestamp": 1675971779652
    }
  ],
  "eventTimestamp": 1675971779529,
  "event": {
    "request": {
      "url": "https://dogfood.social/oauth/authorize?client_id=REDACTED&redirect_uri=https%3A%2F%2Fpinafore.social%2Fsettings%2Finstances%2Fadd&response_type=code&scope=read%20write%20follow%20push",
      "method": "GET",
      "headers": {
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
        "accept-encoding": "gzip",
        "accept-language": "en-US,en;q=0.9",
        "cf-access-jwt-assertion": "REDACTED",
        "cf-connecting-ip": "2606:54c0:7681:27f0::e:100",
        "cf-connecting-o2o": "1",
        "cf-ipcountry": "US",
        "cf-ray": "796f1765fb67e20e",
        "cf-visitor": "{\"scheme\":\"https\"}",
        "connection": "Keep-Alive",
        "cookie": "REDACTED",
        "host": "dogfood.social",
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15",
        "x-forwarded-for": "2606:54c0:7681:27f0::e:100",
        "x-forwarded-proto": "https",
        "x-real-ip": "2606:54c0:7681:27f0::e:100"
      },
      "cf": {
        "longitude": "-88.90740",
        "httpProtocol": "HTTP/2",
        "tlsCipher": "AEAD-AES128-GCM-SHA256",
        "continent": "NA",
        "asn": 13335,
        "clientAcceptEncoding": "gzip",
        "country": "US",
        "tlsClientAuth": {
          "certIssuerDNLegacy": "",
          "certIssuerSKI": "",
          "certSubjectDNRFC2253": "",
          "certSubjectDNLegacy": "",
          "certFingerprintSHA256": "",
          "certNotBefore": "",
          "certSKI": "",
          "certSerial": "",
          "certIssuerDN": "",
          "certVerified": "NONE",
          "certNotAfter": "",
          "certSubjectDN": "",
          "certPresented": "0",
          "certRevoked": "0",
          "certIssuerSerial": "",
          "certIssuerDNRFC2253": "",
          "certFingerprintSHA1": ""
        },
        "tlsVersion": "TLSv1.3",
        "city": "Humboldt",
        "timezone": "America/Chicago",
        "requestPriority": "weight=255;exclusive=0;group=0;group-weight=0",
        "edgeRequestKeepAliveStatus": 1,
        "postalCode": "38343",
        "colo": "ORD",
        "latitude": "35.83860",
        "region": "Tennessee",
        "regionCode": "TN",
        "asOrganization": "iCloud Private Relay",
        "metroCode": "640",
        "pagesHostName": "wildebeest-koehn.pages.dev"
      }
    },
    "response": {
      "status": 200
    }
  },
  "id": 3
}

Pleroma / Rebased (or other software) Fork in the plans?

Hello there!

This is an incredible piece of software and I absolutely love the CloudFlare developers for making the Fediverse more accessible through this for so many people!

However, I wanted to ask whether there will be a Pleroma or Rebased (or Diaspora, PeerTube, ...) implementation of this to allow users to not only choose Mastodon (which is quite resource intensive) but also other Fediverse-software like Pleroma which is very lightweight!

Just a question, this is already incredible enough, but the more the merrier!

Also, just another suggestion: how about an option to install wildebeest with the Soapbox frontend instead of the Mastodon frontend?

Thanks for reading, have a great day!

Bug: Wrong account being shown for replies

If I click on a toot's reply I go to that reply's page, the reply's content is ok but the author is wrong, it is the original toot's author instead of the replier

Example

In the following gif you can see that I access Mike Masnick's toot and click on Micheal Vilain reply, but on the reply page I see the Micheal toot's as if it were posted by Mike

wildebeest-wrong-account

Search shows internal errors

I have recently deployed successfully but it seems that I haven't get some of these thing to work properly yet...

Here is a request from my tablets mobile app that I captured with screen splitting.

{
  "outcome": "ok",
  "scriptName": "pages-worker--845909-production",
  "exceptions": [],
  "logs": [
    {
      "message": [
        "-> GET https://nganha.songngu.xyz/api/v2/search?q=%40&resolve=true "
      ],
      "level": "log",
      "timestamp": 1676130647552
    },
    {
      "message": [
        "Error: invalid handle: localPart: \n    at parseHandle (worker.mjs:102:11)\n    at handleRequest28 (worker.mjs:4914:17)\n    at onRequest37 (worker.mjs:4962:14)\n    at Object.next (worker.mjs:14922:32)\n    at main (worker.mjs:5662:22)\n    at async Object.next (worker.mjs:14922:26)\n    at async errorHandling (worker.mjs:14057:12)\n    at async Object.next (worker.mjs:14922:26)\n    at async logger (worker.mjs:10811:15)\n    at async next (worker.mjs:14922:26)",
        null
      ],
      "level": "error",
      "timestamp": 1676130648064
    },
    {
      "message": [
        "<- 500 (https://nganha.songngu.xyz/ap/users/admin)"
      ],
      "level": "log",
      "timestamp": 1676130648064
    }
  ],
  "eventTimestamp": 1676130647552,
  "event": {
    "request": {
      "url": "https://nganha.songngu.xyz/api/v2/search?q=%40&resolve=true",
      "method": "GET",
      "headers": {
        "accept-encoding": "gzip",
        "authorization": "REDACTED",
        "cf-connecting-ip": "2001:ee0:5279:67c0:f824:33fe:9680:565c",
        "cf-connecting-o2o": "1",
        "cf-ipcountry": "VN",
        "cf-ray": "797e3e031fd06c2a",
        "cf-visitor": "{\"scheme\":\"https\"}",
        "connection": "Keep-Alive",
        "host": "nganha.songngu.xyz",
        "user-agent": "MastodonAndroid/1.1.4",
        "x-forwarded-for": "2001:ee0:5279:67c0:f824:33fe:9680:565c",
        "x-forwarded-proto": "https",
        "x-real-ip": "2001:ee0:5279:67c0:f824:33fe:9680:565c"
      },
      "cf": {
        "longitude": "106.65810",
        "httpProtocol": "HTTP/2",
        "tlsCipher": "AEAD-AES128-GCM-SHA256",
        "continent": "AS",
        "asn": 45899,
        "clientAcceptEncoding": "gzip",
        "country": "VN",
        "tlsClientAuth": {
          "certIssuerDNLegacy": "",
          "certIssuerSKI": "",
          "certSubjectDNRFC2253": "",
          "certSubjectDNLegacy": "",
          "certFingerprintSHA256": "",
          "certNotBefore": "",
          "certSKI": "",
          "certSerial": "",
          "certIssuerDN": "",
          "certVerified": "NONE",
          "certNotAfter": "",
          "certSubjectDN": "",
          "certPresented": "0",
          "certRevoked": "0",
          "certIssuerSerial": "",
          "certIssuerDNRFC2253": "",
          "certFingerprintSHA1": ""
        },
        "tlsVersion": "TLSv1.3",
        "city": "Ho Chi Minh City",
        "timezone": "Asia/Ho_Chi_Minh",
        "colo": "SIN",
        "edgeRequestKeepAliveStatus": 1,
        "requestPriority": "weight=16;exclusive=0;group=0;group-weight=0",
        "latitude": "10.83260",
        "region": "Ho Chi Minh",
        "regionCode": "SG",
        "asOrganization": "VNPT",
        "pagesHostName": "wildebeest-pisceskaze.pages.dev"
      }
    },
    "response": {
      "status": 500
    }
  },
  "id": 22
}

Cannot logon with Mastodon mobile client

I created my userid with Pinafore and OAuth.

I have just tried to logon with Mastodon mobile App. The app asks for the server name, and then shows a new user logon screen, rather than a logon screen (OAuth).

D1 Error when Actor is not a Person

I've encountered a D1 Error when the Actor being processed is not a Person.
The issue arises in the getAndCache method in backend/src/activitypub/actors/index.ts where the cache only retrieves data for Person actors.
If the desired Actor type is a Service, the data is retrieved from the URL and inserted into the actor table, but there is a chance the data has already been inserted which results in a UNIQUE constraint error and throws an exception, preventing proper processing.

To avoid this issue, one potential solution could be to allow the cache to retrieve data for actors other than Person or temporarily use SQL such as INSERT IGNORE to suppress the error, but this will significantly slow down the operation as it disables the cache.

I am very excited about this product and apologize for not being able to contribute a Pull Request due to lack of time.

Catching /api not found

Currently when requests going to /api that do not match either of these paths, it would be captured by the frontend. What is worse is that the frontend not found page's status is 200, confusing the client app of invalid data received.

Incomplete Mastodon API endpoint implementation breaks 3rd-party app OAuth flow

Elk, along with several other 3rd-party apps, call GET /api/v1/apps/verify_credentials when they first register themselves with a Mastodon-compatible server (i.e. the app, not the user). This endpoint is not implemented in Wildebeest. This breaks OAuth flow during initial app registration.

In Elk, the missing endpoint triggers the following error:

{"url":"/api/wildebeest.example.com/oauth?origin=https://elk.example.com?code=xxxxxx","statusCode":400,"statusMessage":"App not registered for server: wildebeest.example.com","message":"App not registered for server: wildebeest.example.com","stack":""}

Support Nodeinfo

It would be useful if wildebeest supported nodeinfo so that tools could discover wildebeest and find the api it supports. Mastodon has moved to v2 of its api and maybe wildebeest will follow, or maybe not, but this would be a reliable way of indicating it one way or the other. It's also a reliable way of indicating that wildebeest is different software with different version numbers so that software accessing a wildebeest service knows what to expect.
Also supplying usage stats via nodeinfo would be helpful in determining if the node is active or not, especially since the nodes I have discovered don't supply that data through the Mastodon api.

Redployments should be a no-op

When you run the deployment script a second time it will fail because things like the KV store are already created.
We should be resilient to this and just skip those steps.

New deployment failed

I setup a new Cloudflare account, followed the directions...

Screenshot 2023-02-08 at 2 57 48 PM

Github job (deploy_to_cf_workers) failed with a warning:

Annotations
1 warning
[deploy](https://github.com/yawnbox/wildebeest/actions/runs/4129126395/jobs/7134393563)
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

Overall I would say deploying Wildebeest is not any easier than deploying Mastodon on a VM.

Error when following

I have deployed whatever version is current when this is filed. I am getting 500 errors whenever I try to follow someone. Any ideas on why I'd be seeing the signature key not found error?

Log Output
{
  "outcome": "ok",
  "scriptName": "pages-worker--847492-production",
  "exceptions": [],
  "logs": [
    {
      "message": [
        "-> POST https://social.meedan.com/api/v1/accounts/[email protected]/follow "
      ],
      "level": "log",
      "timestamp": 1676083538265
    },
    {
      "message": [
        "query",
        "https://cloudflare.social/.well-known/webfinger?resource=acct%3Acloudflare%40cloudflare.social"
      ],
      "level": "log",
      "timestamp": 1676083538532
    },
    {
      "message": [
        {
          "body": "{\"@context\":\"https://www.w3.org/ns/activitystreams\",\"type\":\"Follow\",\"actor\":\"https://social.meedan.com/ap/users/aaron\",\"object\":\"https://cloudflare.social/ap/users/cloudflare\"}"
        }
      ],
      "level": "log",
      "timestamp": 1676083539061
    },
    {
      "message": [
        "Error: delivery to https://cloudflare.social/ap/users/cloudflare/inbox returned 401: signature key not found\n    at deliverToActor (worker.mjs:968:11)\n    at async handleRequest (worker.mjs:1271:3)\n    at async Object.next (worker.mjs:14922:26)\n    at async Object.next (worker.mjs:14922:26)\n    at async errorHandling (worker.mjs:14057:12)\n    at async Object.next (worker.mjs:14922:26)\n    at async logger (worker.mjs:10811:15)\n    at async next (worker.mjs:14922:26)\n    at async Object.fetch (worker.mjs:14936:14)",
        null
      ],
      "level": "error",
      "timestamp": 1676083539234
    },
    {
      "message": [
        "<- 500 (https://social.meedan.com/ap/users/aaron)"
      ],
      "level": "log",
      "timestamp": 1676083539234
    }
  ],
  "eventTimestamp": 1676083538265,
  "event": {
    "request": {
      "url": "https://social.meedan.com/api/v1/accounts/[email protected]/follow",
      "method": "POST",
      "headers": {
        "accept": "application/json",
        "accept-encoding": "gzip",
        "accept-language": "en-US,en;q=0.9",
        "authorization": "REDACTED",
        "cf-connecting-ip": "REDACTED",
        "cf-connecting-o2o": "1",
        "cf-ipcountry": "US",
        "cf-ray": "7979bfe20c30e3ae",
        "cf-visitor": "{\"scheme\":\"https\"}",
        "connection": "Keep-Alive",
        "content-length": "0",
        "host": "social.meedan.com",
        "origin": "https://pinafore.social",
        "priority": "u=1",
        "sec-ch-ua": "\"Not_A Brand\";v=\"99\", \"Google Chrome\";v=\"109\", \"Chromium\";v=\"109\"",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "\"macOS\"",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "cross-site",
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
        "x-forwarded-for": "REDACTED",
        "x-forwarded-proto": "https",
        "x-real-ip": "REDACTED"
      },
      "cf": {
        "longitude": "-78.62930",
        "httpProtocol": "HTTP/3",
        "tlsCipher": "AEAD-AES128-GCM-SHA256",
        "continent": "NA",
        "asn": 7018,
        "clientAcceptEncoding": "gzip",
        "country": "US",
        "tlsClientAuth": {
          "certIssuerDNLegacy": "",
          "certIssuerSKI": "",
          "certSubjectDNRFC2253": "",
          "certSubjectDNLegacy": "",
          "certFingerprintSHA256": "",
          "certNotBefore": "",
          "certSKI": "",
          "certSerial": "",
          "certIssuerDN": "",
          "certVerified": "NONE",
          "certNotAfter": "",
          "certSubjectDN": "",
          "certPresented": "0",
          "certRevoked": "0",
          "certIssuerSerial": "",
          "certIssuerDNRFC2253": "",
          "certFingerprintSHA1": ""
        },
        "tlsVersion": "TLSv1.3",
        "city": "REDACTED",
        "timezone": "America/New_York",
        "requestPriority": "",
        "edgeRequestKeepAliveStatus": 1,
        "postalCode": "REDACTED",
        "colo": "ATL",
        "latitude": "REDACTED",
        "region": "REDACTED",
        "regionCode": "REDACTED",
        "asOrganization": "AT&T Internet",
        "metroCode": "560",
        "pagesHostName": "wildebeest-huslage.pages.dev"
      }
    },
    "response": {
      "status": 500
    }
  },
  "id": 23
}

Documents with MediaType image/gif and image/webp unsupported

I’m getting this error when I try to hit my main page (just https://dogfood.social)

{
  "outcome": "ok",
  "scriptName": "pages-worker--844423-production",
  "exceptions": [],
  "logs": [
    {
      "message": [
        "-> GET https://dogfood.social/explore "
      ],
      "level": "log",
      "timestamp": 1676032920138
    },
    {
      "message": [
        "Error: unsupported media Document type: {\"type\":\"Document\",\"mediaType\":\"image/gif\",\"url\":\"https://cdn.mastodon.org.uk/media_attachments/files/109/839/605/089/052/923/original/a69b03718e5326e5.gif\",\"name\":\"Calvin wants to sled down dangerous slopes to sate his need for excitement.\",\"blurhash\":\"U6QT4M4n4n00_3Rjt7%Mof~q%MayIUD%t7fQ\",\"focalPoint\":[0,0],\"width\":900,\"height\":289}\n    at At2 (worker.mjs:8974:9)\n    at be2 (worker.mjs:8966:12)\n    at we2 (worker.mjs:9018:14)\n    at async Tt (worker.mjs:9068:16)\n    at async G2 (worker.mjs:9076:13)\n    at async worker.mjs:9411:26\n    at async xi.d [as __qrl] (worker.mjs:7991:16)\n    at async worker.mjs:10299:42\n    at async Promise.all (index 1)\n    at async worker.mjs:10298:7",
        null
      ],
      "level": "warn",
      "timestamp": 1676032920279
    },
    {
      "message": [
        "<- 500"
      ],
      "level": "log",
      "timestamp": 1676032920279
    }
  ],
  "eventTimestamp": 1676032920136,
  "event": {
    "request": {
      "url": "https://dogfood.social/explore",
      "method": "GET",
      "headers": {
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
        "accept-encoding": "gzip",
        "cf-connecting-ip": "75.73.49.138",
        "cf-connecting-o2o": "1",
        "cf-ipcountry": "US",
        "cf-ray": "7974ec16caf813f8",
        "cf-visitor": "{\"scheme\":\"https\"}",
        "connection": "Keep-Alive",
        "host": "dogfood.social",
        "user-agent": "Uptime-Kuma/1.19.6",
        "x-forwarded-for": "75.73.49.138",
        "x-forwarded-proto": "https",
        "x-real-ip": "75.73.49.138"
      },
      "cf": {
        "longitude": "-93.44970",
        "httpProtocol": "HTTP/1.1",
        "tlsCipher": "AEAD-AES256-GCM-SHA384",
        "continent": "NA",
        "asn": 7922,
        "clientAcceptEncoding": "gzip",
        "country": "US",
        "tlsClientAuth": {
          "certIssuerDNLegacy": "",
          "certIssuerSKI": "",
          "certSubjectDNRFC2253": "",
          "certSubjectDNLegacy": "",
          "certFingerprintSHA256": "",
          "certNotBefore": "",
          "certSKI": "",
          "certSerial": "",
          "certIssuerDN": "",
          "certVerified": "NONE",
          "certNotAfter": "",
          "certSubjectDN": "",
          "certPresented": "0",
          "certRevoked": "0",
          "certIssuerSerial": "",
          "certIssuerDNRFC2253": "",
          "certFingerprintSHA1": ""
        },
        "tlsVersion": "TLSv1.3",
        "city": "Hopkins",
        "timezone": "America/Chicago",
        "requestPriority": "",
        "edgeRequestKeepAliveStatus": 1,
        "postalCode": "55343",
        "colo": "ORD",
        "latitude": "44.91430",
        "region": "Minnesota",
        "regionCode": "MN",
        "asOrganization": "Comcast Cable",
        "metroCode": "613",
        "pagesHostName": "wildebeest-koehn.pages.dev"
      }
    },
    "response": {
      "status": 500
    }
  },
  "id": 3
}

Refactoring to easily support other databases

First, thanks for open sourcing this. This is a great addition to the open-source world.

D1 and SQLite are great. But there are so many other choices for dbs.

What do you think about abstracting the db part just a bit to allow people who fork this project to swap it transparently?

import edgedbAdapter from './edgedbAdapter.js'

const config = { dbAdapter: edgedbAdapter }

The adapter would have a ts spec.

The db functions are already typed, so it wouldn't be hard to do the refactoring.

And in order to create an adapter, a user has to implement all the query functions in the adapter file.

I believe this will immensely help adoption of this project and create a vibrant ecosystem around it. Especially if db providers provide an adapter (supabase, mongo, prisma, edgedb ...).

Another use case is people who want to integrate this project into their existing system and database. I think you get the point :)

Bug: the back button brings me back to the homepage

Most back buttons navigate back to the homepage regardless of where the user is, they should return back via the history instead (like I did here)

Example 1

In the gif below, I go to a toot, then to one of its replies, then when I press back I navigate back to the explore page instead of going to the toot's page.

back

Example 2

In the gif below, I start from the local timeline, access a toot, press back and I navigate to the explore page instead of the local timeline

local

Deploy: fails at "Download Terraform state"

Environment: Following deployment instructions provided by Cloudflare without changes.

Expected behavior: Deployment script completes.

Actual behavior: At the "download Terraform state" step, I am receiving an error "Failed to fetch https://api.cloudflare.com/client/v4/accounts/***/storage/kv/namespaces/750f32f1b078482f80f301a1a4094b76/values/terraform.tfstate - 404: Not Found);" If I visit this URL, substituting in my account ID for "***", I see a status page with the message "Missing X-Auth-Key, X-Auth-Email or Authorization headers." The deploy script then fails.

Failure to Deploy `Queue "wildebeest" does not exist.`

I've been attempting to deploy this in a brand-new environment today (literally created my first cloudflare account today). While following the instructions I receive this error in the deploy action.

$ Running: wrangler publish --config consumer/wrangler.toml
 ⛅️ wrangler 2.7.1 
-------------------
▲ [WARNING] Processing consumer/wrangler.toml configuration:
    - D1 Bindings are currently in alpha to allow the API to evolve before general availability.
      Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
      Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message
  
      For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>`
Your worker has access to the following bindings:
- KV Namespaces:
  - KV_CACHE: a9e08b35f37d4d26b92f6b35b9bd6100
- D1 Databases:
  - DATABASE: wildebeest-andynortrup (b3a42301-d8f5-4d2b-822b-28c546bd459f)
- Vars:
  - DOMAIN: "social.nortrup.dev"
  - ADMIN_EMAIL: "[email protected]"
Total Upload: 56.19 KiB / gzip: 13.18 KiB
✘ [ERROR] Queue "wildebeest" does not exist. To create it, run: wrangler queues create wildebeest
If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Publish consumer

Full run: https://github.com/AndyNortrup/wildebeest/actions/runs/3920800870

I've double checked that I should have all of the permissions required for the API key.

Thank you in advance, this is an exciting project.

Deploying wildebeest fails with "In order to use Durable Objects, you must agree to pricing…"

Hi,
i wanted to try out wildebeest. I followed the instructions here to the point and even purchased an image-plan, but when i trie to deploy/publish, i always get this error:

Using API Token authentication
$ Running: wrangler publish --config do/wrangler.toml
⛅️ wrangler 2.9.1

Total Upload: 1.12 KiB / gzip: 0.49 KiB

✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/wildebeest-do) failed.

In order to use Durable Objects, you must agree to pricing at https://dash.cloudflare.com/***/workers/overview?enable-durable-objects [code: 10084]

If you think this is a bug, please open an issue at: https://github.com/cloudflare/wrangler2/issues/new/choose

Please advise how i can avoid this error. And sorry, if this is a newb-question. Thanks!

Identify recognised email and a login confirmation screen

It is common after a client requests authorization, before the authorization completes, the instance has a screen showing that a client is requesting certain oauth permissions of an account, and the user needs to manually confirm the authorization.

Current behaviour
The entire authorization flow completes by itself.

Expected behaviour
image
An example of such screen from Mastodon. Besides asking the user to confirm permissions, one can also choose to logout of current account and login to another one if needed, which currently is not possible. Also in case several emails/accounts are added into Zero Trust, it is unclear under which account is currently logged into. For this, it is beneficial to also add logged in email/account to the user sign up page as well to prevent possible confusion.

GitHub Actions are enabled on my Fork, but Deploy to CloudFlare Workers can't see it

I don't really know where to leave feedback, so I'm doing this here. I can get all the way to the step where I enable GitHub Actions on my forked repo in Github (https://github.com/TedTschopp/wildebeest) but the Deploy to Cloudflare Workers screen is not seeing it as shown by this screenshot below. I don't know if the issue is with GitHub (I don't think so), or with Wildebeest (maybe) or with CloudFlare Workers not being able to read the state of Github (I'm guessing this one, but I don't know how to debug further).

Screenshot 2023-01-13 at 9 17 58 AM

Unsupported Update for Object type: Question

Are polls supported in this release? They don't show in the timeline at all. A good account to test polls on is https://mastodon.social/@dungeons

Every time I receive an update for a poll I get a warning in the logs and it prevents anything from showing in the timeline:
(warn) unsupported Update for Object type: Question

The two errors I receive with this account are

Unknown Event - Ok @ 2/11/2023, 8:51:08 AM
  (log) {"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","toot":"http://joinmastodon.org/ns#","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"movedTo":{"@id":"as:movedTo","@type":"@id"},"schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","discoverable":"toot:discoverable","Device":"toot:Device","Ed25519Signature":"toot:Ed25519Signature","Ed25519Key":"toot:Ed25519Key","Curve25519Key":"toot:Curve25519Key","EncryptedMessage":"toot:EncryptedMessage","publicKeyBase64":"toot:publicKeyBase64","deviceId":"toot:deviceId","claim":{"@type":"@id","@id":"toot:claim"},"fingerprintKey":{"@type":"@id","@id":"toot:fingerprintKey"},"identityKey":{"@type":"@id","@id":"toot:identityKey"},"devices":{"@type":"@id","@id":"toot:devices"},"messageFranking":"toot:messageFranking","messageType":"toot:messageType","cipherText":"toot:cipherText","suspended":"toot:suspended","focalPoint":{"@container":"@list","@id":"toot:focalPoint"}}],"id":"https://mastodon.social/users/dungeons#updates/1676127037","type":"Update","actor":"https://mastodon.social/users/dungeons","to":["https://www.w3.org/ns/activitystreams#Public"],"object":{"id":"https://mastodon.social/users/dungeons","type":"Service","following":"https://mastodon.social/users/dungeons/following","followers":"https://mastodon.social/users/dungeons/followers","inbox":"https://mastodon.social/users/dungeons/inbox","outbox":"https://mastodon.social/users/dungeons/outbox","featured":"https://mastodon.social/users/dungeons/collections/featured","featuredTags":"https://mastodon.social/users/dungeons/collections/tags","preferredUsername":"dungeons","name":"Dungeons","summary":"<p>⚔️ Ꭿﬡ𝘭ꭿﬡ, the Dragonborn Fighter<br />❤️❤️❤️❤️❤️
❤️❤️🖤🖤🖤 10/15<br />⭐ 2 (310) 🎲 1/2<br />🗡️ Lance [1d12+5, +7] 🛡️ Shield <br />🛡️ Ring Mail [16]<br />🪙 53<br />
Str 20 Dex 12 Con 12 Int 10 Wis 12 Cha 13</p><p>🗺️ 31 🕔 1 day, 05:01</p>","url":"https://mastodon.social/@dungeons","m
anuallyApprovesFollowers":false,"discoverable":true,"published":"2022-11-16T00:00:00Z","devices":"https://mastodon.social/users/dungeons/collections/devices","publicKey":{"id":"https://mastodon.social/users/dungeons#main-key","owner":"https://mastodon.social/users/dungeons","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsZSBM7kMyW6/Q7p5yxvp\nlcxybbOmT9GQtI0022UNl/PjQBqG8+Oi5PwUCwnSrkVLLPJ4aXQ2nQpnswJu/rdj\nanRyx2T1gziCLt4O6U6rJGIw045tqTbmdXMtwlhu+ECXQXk5rH2IgN6V29cbdU2Q\nSN1C33ZCqpbEBZQNakWfWhu8bNLyiIc46/mPE74LAk0T/+7CYvOFx0GkNrYJplma\n2oG9z82HQ2YdsFtNKwO1bqNxiGsMXS/TQjrBFuaja+DKIU+ytEaB9mfHX1ZmVFjI\nUkgxw5Yg2INR5jtVqFb3vHX6ZmysI2Upo06pzhSAKBJZ/0QGPBh5LgM2nTyvty94\nvwIDAQAB\n-----END PUBLIC KEY-----\n"},"tag":[],"attachment":[{"type":"PropertyValue","name":"Tips & Info","value":"<a href=\"https://dungeons.astrelion.com\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"><span class=\"invisible\">https://</span><span class=\"\">dungeons.astrelion.com</span><span class=\"invisible\"></span></a>"},{"type":"PropertyValue","name":"Author","value":"<span class=\"h-card\"><a href=\"https://mastodon.social/@astrelion\" class=\"u-url mention\">@<span>astrelion</span></a></span>"},{"type":"PropertyValue","name":"Source","value":"<a href=\"https://gitlab.com/ASTRELION/dungeons-bot\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">gitlab.com/ASTRELION/dungeons-</span><span class=\"invisible\">bot</span></a>"}],"endpoints":{"sharedInbox":"https://mastodon.social/inbox"},"icon":{"type":"Image","mediaType":"image/png","url":"https://files.mastodon.social/accounts/avatars/109/354/069/933/492/315/original/20001dae7df896ce.png"},"image":{"type":"Image","mediaType":"image/png","url":"https://files.mastodon.social/accounts/headers/109/354/069/933/492/315/original/f01d631da5b476fe.png"}},"signature":{"type":"RsaSignature2017","creator":"https://mastodon.social/users/dungeons#main-key","created":"2023-02-11T14:50:37Z","signatureValue":"TrFc+lqZGeRgOV8fIZcRSv2G8esQ5itehqgPETvE4FzFG6vDyGUpDXW2y2p3ZosT+KWmVhKHi1/NwZg7/g6CtDebvfAwneeaBBOaRum65v0PviMYQwxd41Z6uw25YreZpNB6MuwyR/sBAl1vcj+63j1r4NsziGdRei18JM74l9mqlDsiKFeneZiiS/Udnidsklr4+XFjet/PEE7v/vRTUt0QT1+lNON5JeLQI5X7Gnt62dpK6EZxS5FQ2/zm94Ru0t7Qmvh0lRvxEEtx6mpXvu26kcaACVw7rIGEno5cHYHN3zZI9RPu6wqTBRnT6ogvyc7uzm+m3rHd4lEm3gBWNQ=="}}
  (error) Error: object https://mastodon.social/users/dungeons does not exist
    at handle (d1-beta-facade.entry.js:4467:15)
    at async handleInboxMessage (d1-beta-facade.entry.js:4771:3)
    at async Object.queue (d1-beta-facade.entry.js:4803:13) null
Unknown Event - Ok @ 2/11/2023, 8:55:11 AM
 (log) {"@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"}],"id":"https://mastodon.social/users/dungeons/statuses/109846543497026220#updates/1676126885","type":"Update","actor":"https://mastodon.social/users/dungeons","to":["https://www.w3.org/ns/activitystreams#Public"],"object":{"id":"https://mastodon.social/users/dungeons/statuses/109846543497026220","type":"Question","summary":null,"inReplyTo":"https://mastodon.social/users/dungeons/statuses/109846425442798354","published":"2023-02-11T14:20:36Z","url":"https://mastodon.social/@dungeons/109846543497026220","attributedTo":"https://mastodon.social/users/dungeons","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://mastodon.social/users/dungeons/followers"],"sensitive":false,"atomUri":"https://mastodon.social/users/dungeons/statuses/109846543497026220","inReplyToAtomUri":"https://mastodon.social/users/dungeons/statuses/109846425442798354","conversation":"tag:mastodon.social,2023-02-10:objectId=395106738:objectType=Conversation","content":"<p>You confronted the Owl!<br />---<br />🦁 Owl<br />❤️ 1/1<br />🛡️ 11 ☁️<br />❕0<br />✨ 10</p>","contentMap":{"en":"<p>You confronted the Owl!<br />---<br />🦁 Owl<br />❤
️ 1/1<br />🛡️ 11 ☁️<br />❕0<br />✨ 10</p>"},"endTime":"2023-02-11T14:50:36Z","closed":"2023-02-11T14:50:36Z","votersCount":27,"attachment":[],"tag":[],"repli
es":{"id":"https://mastodon.social/users/dungeons/statuses/109846543497026220/replies","type":"Collection","first":{"type":"CollectionPage","next":"https://mastodon.social/users/dungeons/statuses/109846543497026220/replies?min_id=109846661571196733&page=true","partOf":"https://mastodon.social/users/dungeons/statuses/109846543497026220/replies","items":["https://mastodon.social/users/dungeons/statuses/109846661571196733"]}},"oneOf":[{"type":"Note","name":"⚔️ Melee Attack, one-handed [1d12]","replies":{"type":"Collection","totalItems":14}},{"type":"Note","name":"🏹 Ranged Attack, improvised [1d4]","replies":{"type":"Collection","totalItems":9}},{"type":"Note","name":"👊 Melee Attack, unarmed [6]","replies":{"type":"Collection","totalItems":3}},{"type":"Note","name":"🏃 Run!","replies":{"type":"Collection","totalItems":1}}]},"signature":{"type":"RsaSignature2017","creator":"https://mastodon.social/users/dungeons#main-key","created":"2023-02-11T14:51:10Z","signatureValue":"mLUHFJQM0opEdYw5vQQ9QoxO3Ys3dnk7JId1WH+NflQKyLCaxuNWHRcLoaEgI5p1f3Uf8KPI+QraxdIqBaGreXqBqlMk04Y9Fv6uPLKENns4AYf2D5Iwa6mIDeV5Zp3Kczu1k4seSrVv5YhcA+eM2Wsk37mqsvnzp+LafFfluW2B7tItOJpsJppRByxY0dtwO5A2coA6J5fTXYmBp1LRvRx7NM7o8terEBkL1U/6BKqjbopKYmVsBd3t7sV3IZu8BRn/3+wfpe4ostVAeG9lpe6hmyO38NxWo5fcq0R0vCmWpwhRMe/7nRqd9ZOiebNTYqmxp8aQC+9hSvxaGlvFAA=="}}
  (warn) unsupported Update for Object type: Question

Support for account migrations (Mastodon to Wildebeest)

Mastodon supports redirecting profiles and moving your followers between different Mastodon accounts with its account migrations feature. Is this something Wildebeest might support in the future?

It doesn't feel realistic for many people to move their Mastodon accounts to a personal Wildebeest instance on their own domain, even if Wildebeest allows them to create a personal instance more easily than Mastodon does, because there's no way to bring the following many people already have on Mastodon over here. This is the dealbreaker for me trying out Wildebeest personally anyways. It'd also be nice to support migrating out of Wildebeest in case of a domain change or a need to use ActivityPub software with a different feature-set later on.

D1 database migration error when running initial deploy GitHub action

While trying to "Deploy with Workers" for the first time, my fork's GitHub action fails on the migrate D1 database step with the following error:

[ERROR] Can't find a DB with name/binding 'wildebeest-josephschmitt' in local config. Check info in wrangler.toml...

Full stack trace
/usr/bin/docker run --name ea425b5ca650dc10fd4bd6a7383f6798398dcf_c2bf12 --label ea425b --workdir /github/workspace --rm -e "OWNER_LOWER" -e "TERRAFORM_CLI_PATH" -e "CLOUDFLARE_ACCOUNT_ID" -e "INPUT_COMMAND" -e "INPUT_APITOKEN" -e "INPUT_PRECOMMANDS" -e "INPUT_APIKEY" -e "INPUT_EMAIL" -e "INPUT_ACCOUNTID" -e "INPUT_ENVIRONMENT" -e "INPUT_WORKINGDIRECTORY" -e "INPUT_WRANGLERVERSION" -e "INPUT_SECRETS" -e "INPUT_POSTCOMMANDS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/wildebeest/wildebeest":"/github/workspace" ea425b:5ca650dc10fd4bd6a7383f6798398dcf
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead

added 101 packages, and audited 102 packages in 2s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Using API Token authentication
$ Running: echo "*** pre commands ***"
echo -e "[[d1_databases]]\nbinding=\"DATABASE\"\ndatabase_name=\"wildebeest-josephschmitt\"\ndatabase_id=\"\"" >> wrangler.toml
echo "******"

*** pre commands ***
******
$ Running: wrangler d1 migrations apply wildebeest-josephschmitt
▲ [WARNING] Processing wrangler.toml configuration:

    - D1 Bindings are currently in alpha to allow the API to evolve before general availability.
      Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
      Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message
  
      For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>`
--------------------
    - D1 Bindings are currently in alpha to allow the API to evolve before general availability.
      Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
      Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message
  
      For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>`


🚧 D1 is currently in open alpha and is not recommended for production data and traffic
🚧 Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose
🚧 To request features, visit https://community.cloudflare.com/c/developers/d1
🚧 To give feedback, visit https://discord.gg/cloudflaredev
--------------------


✘ [ERROR] Can't find a DB with name/binding 'wildebeest-josephschmitt' in local config. Check info in wrangler.toml...

Is there a step that I'm missing other than what's described in the README? As far as I know I've done everything in there, and I don't see any instructions on customizing the wrangler.toml file.

Mobile Navigation Broken

When viewing a Wildebeest instance on mobile, including https://cloudflare.social/explore/, the menu is outside of the viewport. Pinching the screen forces it to snap inside the viewport.

This seems only to occur on the Explore view, where Local and Federated pages are fine. However, the Explore view is the home view, making navigation not-visible to visitors.

Implement integration frontend tests

currently we have a single integration test for the frontend application: frontend/test/post-page.spec.ts

given the simplicity of the read-only UI we don't need to go overboard and have fully fledged E2E tests, not unit tests are necessary but we should create integration tests such as the post-page one mentioned about, we should have one test per page so that we can be confident that things are working acceptably well.

we should also make sure that the left column is tested as well since it is populated by dynamic content provided by the backend

Unable to deploy when GitHub username has uppercase characters

(Sorry for submitting this on a WIP project, we just like to play with things early 😅)

If you run through the deployment steps and have a GitHub username with any uppercase letters, it fails to deploy. This seems to be because Pages doesn't support uppercase chars in project names (and normalizes to all lowercase), and the API is case-sensitive too so fetching for wildebeest-Cherry produces no results even if wildebeest-cherry exists.

The terraform step fails with:

╷
│ Error: error creating cloudflare pages project "wildebeest-Cherry": You have entered an invalid project name. Project names can be 1-58 lowercase characters with dashes, but cannot start/end with a dash (/). (8000003)
│ 
│   with cloudflare_pages_project.wildebeest_pages_project,
│   on main.tf line 57, in resource "cloudflare_pages_project" "wildebeest_pages_project":
│   57: resource "cloudflare_pages_project" "wildebeest_pages_project" {
│ 
╵

but doesn't actual exit with a non-zero exit code so continues to try and deploy in the next step. But then fails with this on the deploy step:

✘ [ERROR] A request to the Cloudflare API (/accounts/***/pages/projects/wildebeest-Cherry) failed.

  Project not found. The specified project name does not match any of your existing projects. [code: 8000007]

[ERROR] ParseError: A request to the Cloudflare API (/accounts/***/workers/services/wildebeest-do) failed.

I have tried many times, the deploy sequence always stop at Publish DO ,error log is

2023-01-21T11:06:09.8455119Z ##[group]Run cloudflare/[email protected]
2023-01-21T11:06:09.8455450Z with:
2023-01-21T11:06:09.8455917Z   apiToken: ***
2023-01-21T11:06:09.8456200Z   command: publish --config do/wrangler.toml
2023-01-21T11:06:09.8456438Z env:
2023-01-21T11:06:09.8457045Z   OWNER_LOWER: fqx
2023-01-21T11:06:09.8457376Z   TERRAFORM_CLI_PATH: /home/runner/work/_temp/7b8b039f-a90d-45ad-a827-8e431c948bb7
2023-01-21T11:06:09.8457729Z   d1_id: 899b40d7-89db-4f90-9a60-9891b3986b64
2023-01-21T11:06:09.8457984Z   auth_domain: null
2023-01-21T11:06:09.8458451Z   CLOUDFLARE_ACCOUNT_ID: ***
2023-01-21T11:06:09.8458669Z ##[endgroup]
2023-01-21T11:06:09.8467822Z ##[command]/usr/bin/docker run --name ea425b6b1a29d59fb54a33998bd4056c2ebbdb_504fcc --label ea425b --workdir /github/workspace --rm -e "OWNER_LOWER" -e "TERRAFORM_CLI_PATH" -e "d1_id" -e "auth_domain" -e "CLOUDFLARE_ACCOUNT_ID" -e "INPUT_APITOKEN" -e "INPUT_COMMAND" -e "INPUT_APIKEY" -e "INPUT_EMAIL" -e "INPUT_ACCOUNTID" -e "INPUT_ENVIRONMENT" -e "INPUT_WORKINGDIRECTORY" -e "INPUT_WRANGLERVERSION" -e "INPUT_SECRETS" -e "INPUT_PRECOMMANDS" -e "INPUT_POSTCOMMANDS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/wildebeest/wildebeest":"/github/workspace" ea425b:6b1a29d59fb54a33998bd4056c2ebbdb
2023-01-21T11:06:12.5410203Z npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-01-21T11:06:12.5755000Z npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
2023-01-21T11:06:13.0648739Z 
2023-01-21T11:06:13.0649740Z added 101 packages, and audited 102 packages in 2s
2023-01-21T11:06:13.0650045Z 
2023-01-21T11:06:13.0650283Z 11 packages are looking for funding
2023-01-21T11:06:13.0650680Z   run `npm fund` for details
2023-01-21T11:06:13.0664968Z 
2023-01-21T11:06:13.0665344Z found 0 vulnerabilities
2023-01-21T11:06:13.0840109Z Using API Token authentication
2023-01-21T11:06:13.0841692Z $ Running: wrangler publish --config do/wrangler.toml
2023-01-21T11:06:13.9215150Z  ⛅️ wrangler 2.8.0 
2023-01-21T11:06:13.9215766Z -------------------
2023-01-21T11:06:14.3697499Z �[31m✘ �[41;31m[�[41;97mERROR�[41;31m]�[0m �[1mParseError: A request to the Cloudflare API (/accounts/***/workers/services/wildebeest-do) failed.�[0m
2023-01-21T11:06:14.3698092Z 
2023-01-21T11:06:14.3698512Z       at throwFetchError (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:123033:17)
2023-01-21T11:06:14.3699148Z       at fetchResult (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:123002:5)
2023-01-21T11:06:14.3699821Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-01-21T11:06:14.3700611Z       at async publish (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:126733:31)
2023-01-21T11:06:14.3701535Z       at async Object.publishHandler [as handler] (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:141579:3) {
2023-01-21T11:06:14.3703246Z     text: 'A request to the Cloudflare API (/accounts/***/workers/services/wildebeest-do) failed.',
2023-01-21T11:06:14.3703930Z     notes: [ { text: 'Authentication error [code: 10000]' } ],
2023-01-21T11:06:14.3704230Z     location: undefined,
2023-01-21T11:06:14.3704720Z     kind: 'error',
2023-01-21T11:06:14.3704992Z     code: 10000
2023-01-21T11:06:14.3705301Z   }
2023-01-21T11:06:14.3705634Z 
2023-01-21T11:06:14.3705643Z 
2023-01-21T11:06:14.5075204Z 
2023-01-21T11:06:14.5097442Z �[31m✘ �[41;31m[�[41;97mERROR�[41;31m]�[0m �[1mA request to the Cloudflare API (/accounts/***/workers/scripts) failed.�[0m
2023-01-21T11:06:14.5097986Z 
2023-01-21T11:06:14.5098638Z   Authentication error [code: 10000]
2023-01-21T11:06:14.5098935Z   
2023-01-21T11:06:14.5100024Z   If you think this is a bug, please open an issue at: �[4mhttps://github.com/cloudflare/wrangler2/issues/new/choose�[0m
2023-01-21T11:06:14.5100453Z 
2023-01-21T11:06:14.5100595Z 

cURL for the same token returns code 10000 but with success

{"result":{"id":"f516959e1fe94372fe4adfc55c752659","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}

I changed worker's default subdomain in the first time deploying, otherwise all default setting.
Tried different browser, same error.

Best place for general discussions about this project?

Hey! I have deployed an instance. It was actually pretty solid for something that is just starting and is "living on the edge" (pun intended).

I have a couple of concerns though (regarding, for example, account creation, domains, etc). What would be the best place for these general discussions? Should we consider opening the Discussions feature in the repo?

Thanks!

The only thing that's stopping me from adopting this as my main account is that CF doesn't support .eu domains, which honestly is pretty sad. I'd pay for this service!

Adjust UI colors (after tailwind migration)

After switching to tailwind the colors we're using are not as nice as before (nor as close to the mastodon site)
(I did try to keep them as similar as possible but didn't put too much effort into it since the priority was to just switch to tailwind)

We should try to see if we can improve the colors situation, we could use arbitrary values if not too many places need tweaking, trying to extend the color palette or just simply see if there are more appropriate standard tailwind colors that we can use instead of the current ones.

Adjust wildebeest logo

Screenshot 2023-01-09 at 15 46 09

We should be using the wildebeest logo svg file with text included so that it more versatile and easier to resize (Wildebeest dark full)

we also need to make sure that the WildebeestLogo component can accept different sizes and apply the correct side to the different places in which it is applied (small for the mobile header, medium small for the right column and medium for the start-instance and first-login pages)

Hashtags don’t work in toots

When I post a toot with a #hashtag, I expect it to be correctly tagged and linked. They are not in Wildebeest, neither in Toots originating outside Wildebeest nor from Toots coming from Wildebeest accounts.

Same is true for hashtags in profiles.

D1 size limit

Hi, thanks for this project!

My understanding is that D1 is currently limited to 100MB databases. Perhaps I'm missing something, but isn't it very likely that you'll hit that limit while running Wildebeest after a short time?

Bug: wrong URLs used in the account name link

For an account we have two different urls one used on the avatar and one on the name link, they are different and only one currently works (locally only the name link works and in prod only the avatar one does)
Screenshot 2023-02-07 at 17 28 11

The two urls need to be the same and it should be:

  • a full remote url for users registered on other servers
  • a relative url (allowing spa navigation) for users registered on the instance

Make it work outside cloudflare

Because mastodon and the fediverse are federated, not centralized on a particular provider platform.

Discord killed the concept of "server" please dont kill federation.

D1 deploy migrate failed with internal error

log:

🚧 D1 is currently in open alpha and is not recommended for production data and traffic.
Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose.
To request features, visit https://community.cloudflare.com/c/developers/d1.
To give feedback, visit https://discord.gg/cloudflaredev
🌀 Mapping SQL input into an array of statements
🌀 Parsing 1 statements
✘ [ERROR] Executing on wildebeest-codehz (03fa8682-d4dd-4996-9d84-7881b8cc3c44):


🚣 Executed 2 commands in 1.[48](https://github.com/codehz/wildebeest/actions/runs/3972551377/jobs/6810556763#step:12:49)771899999997ms
🌀 Mapping SQL input into an array of statements
🌀 Parsing 1 statements
✘ [ERROR] Executing on wildebeest-codehz (03fa8682-d4dd-[49](https://github.com/codehz/wildebeest/actions/runs/3972551377/jobs/6810556763#step:12:50)96-9d84-7881b8cc3c44):


🚣 Executed 1 command in 1.3280979999999545ms
? About to apply 3 migration(s)
Your database may not be available to serve requests during the migration, continue?
🤖 Using default value in non-interactive context: yes
🌀 Mapping SQL input into an array of statements
🌀 Parsing 26 statements
✘ [ERROR] Executing on wildebeest-codehz (03fa8682-d4dd-4996-9d84-7881b8cc3c44):


┌────────────────────────────────────┬────────┐
│ Name                               │ Status │
├────────────────────────────────────┼────────┤
│ 0000_initial.sql                   │ ❌       │
├────────────────────────────────────┼────────┤
│ 0001_add-unique-following.sql      │ 🕒️     │
├────────────────────────────────────┼────────┤
│ 0002_add-target-outbox_objects.sql │ 🕒️     │
└────────────────────────────────────┴────────┘

❌ Migration 0000_initial.sql failed with following Errors
┌─────────────────────────────┐
│ Error                       │
├─────────────────────────────┤
│ Internal error [code: 7[50](https://github.com/codehz/wildebeest/actions/runs/3972551377/jobs/6810556763#step:12:51)1] │
└─────────────────────────────┘

(full log: https://github.com/codehz/wildebeest/actions/runs/3972551377/jobs/6810556763)

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.