Add readme first draft

This commit is contained in:
Eric Eastwood 2022-02-09 02:39:24 -06:00
parent f80f9fbbb6
commit a268086cfd
3 changed files with 26 additions and 345 deletions

26
README.md Normal file
View File

@ -0,0 +1,26 @@
# Matrix public archive
**NB: This project is very much a work-in-progress (WIP)!** Undocumented
config/secrets, using a draft branch of Hydrogen, etc.
In the vein of [feature parity with
Gitter](https://github.com/vector-im/roadmap/issues/26), the goal is to make a
public archive site like Gitter's archives which search engines can index and
keep all of the content accessible/available. There is already
https://view.matrix.org/ (https://github.com/matrix-org/matrix-static) but there
is some desire to make something with more Element-feeling polish and loading
faster (avoid the slow 502's errors that are frequent on `view.matrix.org`).
## Plan summary
The plan is to server-side render (SSR) the
[Hydrogen](https://github.com/vector-im/hydrogen-web) Matrix client on a Node.js
server (since both use JavaScript) and serve pages on the fly (probably with
some Cloudflare caching on top) when someone requests
`/archives/${year}/${month}/${day}`. To fetch the events for a given day/time,
we will use [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030)'s
`/timestamp_to_event` endpoint to jump to a given day in the timeline and fetch
the messages from a Matrix homeserver.
Re-using Hydrogen gets us pretty and native(to Element) looking styles and keeps
the maintenance burden of supporting more event types in Hydrogen.

View File

@ -1,159 +0,0 @@
[
{
"content": {
"join_rule": "public"
},
"origin_server_ts": 1630711781351,
"sender": "@madlittlemods:matrix.org",
"state_key": "",
"type": "m.room.join_rules",
"unsigned": {
"age": 13058602804
},
"event_id": "$9wq2K5_EvYmVWWfGZuPoSD9qmpmE_Gkr2Cj_AVxiRUU"
},
{
"content": {
"history_visibility": "shared"
},
"origin_server_ts": 1630711781440,
"sender": "@madlittlemods:matrix.org",
"state_key": "",
"type": "m.room.history_visibility",
"unsigned": {
"age": 13058602715
},
"event_id": "$22vR5vNHchWfcEh-sew2Lw74xUxloIMbHSYujn919a8"
},
{
"content": {
"name": "test-public1"
},
"origin_server_ts": 1630711781545,
"sender": "@madlittlemods:matrix.org",
"state_key": "",
"type": "m.room.name",
"unsigned": {
"age": 13058602610
},
"event_id": "$j3BKW_IekVAFUbGMMkJFfqyoQxXydEg9WoRER_H6WZM"
},
{
"content": {
"topic": "some room topic"
},
"origin_server_ts": 1630711789582,
"sender": "@madlittlemods:matrix.org",
"state_key": "",
"type": "m.room.topic",
"unsigned": {
"age": 13058594573
},
"event_id": "$-1F5lNPStFyosnNeCY7ZZ8WJw7Uiny2-ZV96g2cYYLs"
},
{
"content": {
"topic": "some room topic (just testing)"
},
"origin_server_ts": 1630711795159,
"sender": "@madlittlemods:matrix.org",
"state_key": "",
"type": "m.room.topic",
"unsigned": {
"replaces_state": "$-1F5lNPStFyosnNeCY7ZZ8WJw7Uiny2-ZV96g2cYYLs",
"prev_content": {
"topic": "some room topic"
},
"prev_sender": "@madlittlemods:matrix.org",
"age": 13058588996
},
"event_id": "$qgpNxe__zpn3oedI7llrBAEloBtrTru0uquARFTxvck"
},
{
"content": {
"body": "y",
"msgtype": "m.text",
"org.matrix.msc1767.text": "y"
},
"origin_server_ts": 1643751261463,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 19122692
},
"event_id": "$p2K-H4KLf9rFsijWtovL_8iBSA0RL6fsmXq1F-nvZZ0"
},
{
"content": {
"avatar_url": "mxc://matrix.org/djdngehyFuFlApXWpYotALoK",
"displayname": "erictroupetester",
"membership": "join"
},
"origin_server_ts": 1643751279424,
"sender": "@erictroupetester:matrix.org",
"state_key": "@erictroupetester:matrix.org",
"type": "m.room.member",
"unsigned": {
"age": 19104731
},
"event_id": "$Me_sKWilYAR3G4KifH1ytusbkCcZN955l63rrj-hj1E"
},
{
"content": {
"body": "o",
"msgtype": "m.text",
"org.matrix.msc1767.text": "o"
},
"origin_server_ts": 1643751285181,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 19098974
},
"event_id": "$dggun2-VMSDr9qT_oT_tl0w_5Xi68A7upvu996CSDjg"
},
{
"content": {
"body": "u",
"msgtype": "m.text",
"org.matrix.msc1767.text": "u"
},
"origin_server_ts": 1643751287241,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 19096914
},
"event_id": "$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q"
},
{
"content": {
"body": "> <@madlittlemods:matrix.org> u\n\nupdog",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!OWqptMTjnQfUWubCid:matrix.org/$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q?via=matrix.org\">In reply to</a> <a href=\"https://matrix.to/#/@madlittlemods:matrix.org\">@madlittlemods:matrix.org</a><br>u</blockquote></mx-reply>updog",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q"
}
},
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "> <@madlittlemods:matrix.org> u\n\nupdog",
"mimetype": "text/plain"
},
{
"body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!OWqptMTjnQfUWubCid:matrix.org/$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q?via=matrix.org\">In reply to</a> <a href=\"https://matrix.to/#/@madlittlemods:matrix.org\">@madlittlemods:matrix.org</a><br>u</blockquote></mx-reply>updog",
"mimetype": "text/html"
}
]
},
"origin_server_ts": 1643751346493,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 19037662
},
"event_id": "$FcdFuZLl_G7W8HaQW9INkSrZoP_ZcBKTaYqB0sG4Kns"
}
]

View File

@ -1,186 +0,0 @@
[
{
"content": {
"body": "y",
"msgtype": "m.text",
"org.matrix.msc1767.text": "y"
},
"origin_server_ts": 1643751261463,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 28534993
},
"event_id": "$p2K-H4KLf9rFsijWtovL_8iBSA0RL6fsmXq1F-nvZZ0"
},
{
"content": {
"avatar_url": "mxc://matrix.org/djdngehyFuFlApXWpYotALoK",
"displayname": "erictroupetester",
"membership": "join"
},
"origin_server_ts": 1643751279424,
"sender": "@erictroupetester:matrix.org",
"state_key": "@erictroupetester:matrix.org",
"type": "m.room.member",
"unsigned": {
"age": 28517032
},
"event_id": "$Me_sKWilYAR3G4KifH1ytusbkCcZN955l63rrj-hj1E"
},
{
"content": {
"body": "o",
"msgtype": "m.text",
"org.matrix.msc1767.text": "o"
},
"origin_server_ts": 1643751285181,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 28511275
},
"event_id": "$dggun2-VMSDr9qT_oT_tl0w_5Xi68A7upvu996CSDjg"
},
{
"content": {
"body": "u",
"msgtype": "m.text",
"org.matrix.msc1767.text": "u"
},
"origin_server_ts": 1643751287241,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 28509215
},
"event_id": "$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q"
},
{
"content": {
"body": "> <@madlittlemods:matrix.org> u\n\nupdog",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!OWqptMTjnQfUWubCid:matrix.org/$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q?via=matrix.org\">In reply to</a> <a href=\"https://matrix.to/#/@madlittlemods:matrix.org\">@madlittlemods:matrix.org</a><br>u</blockquote></mx-reply>updog",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q"
}
},
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "> <@madlittlemods:matrix.org> u\n\nupdog",
"mimetype": "text/plain"
},
{
"body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!OWqptMTjnQfUWubCid:matrix.org/$qK4Rp5t_ovTGstWu49Zw1FiplUBaFG36yenkShvqB0Q?via=matrix.org\">In reply to</a> <a href=\"https://matrix.to/#/@madlittlemods:matrix.org\">@madlittlemods:matrix.org</a><br>u</blockquote></mx-reply>updog",
"mimetype": "text/html"
}
]
},
"origin_server_ts": 1643751346493,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 28449963
},
"event_id": "$FcdFuZLl_G7W8HaQW9INkSrZoP_ZcBKTaYqB0sG4Kns"
},
{
"content": {
"body": "😀 Skin friction is a component of drag, the force resisting the motion of a fluid across the surface of a body.",
"msgtype": "m.text",
"org.matrix.msc1767.text": "😀 Skin friction is a component of drag, the force resisting the motion of a fluid across the surface of a body."
},
"origin_server_ts": 1643779720223,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 76233
},
"event_id": "$50Yhop7d2WHs4IiBiA4YQsGbKqXuvwHeJFf5uZ8c0jY"
},
{
"content": {
"body": "Friction_between_surfaces.jpg",
"info": {
"h": 925,
"mimetype": "image/jpeg",
"size": 396644,
"thumbnail_info": {
"h": 390,
"mimetype": "image/jpeg",
"size": 126490,
"w": 800
},
"thumbnail_url": "mxc://matrix.org/zsAjnuqrbMuPlwhcHgjpSobL",
"w": 1894,
"xyz.amorgan.blurhash": "LkR3G|IU?w%NbwbIemae_NxuD$M{"
},
"msgtype": "m.image",
"url": "mxc://matrix.org/VmOplYoLzBxmHxrwgtugnHnS"
},
"origin_server_ts": 1643779746726,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 49730
},
"event_id": "$129QzqeZk0EbB4mTOFTIfnZpcihByAtCrFInuvyBNl8"
},
{
"content": {
"body": "^ Simulated blocks with fractal rough surfaces, exhibiting static frictional interactions",
"msgtype": "m.text",
"org.matrix.msc1767.text": "^ Simulated blocks with fractal rough surfaces, exhibiting static frictional interactions"
},
"origin_server_ts": 1643779756545,
"sender": "@erictroupetester:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 39911,
"m.relations": {
"m.annotation": {
"chunk": [
{
"type": "m.reaction",
"key": "😮",
"count": 1
}
]
}
}
},
"event_id": "$QvdtjOIIbX8R1NlN10swcQJ5LoZFgbX_E7UmvYSah4k"
},
{
"content": {
"m.relates_to": {
"event_id": "$QvdtjOIIbX8R1NlN10swcQJ5LoZFgbX_E7UmvYSah4k",
"key": "😮",
"rel_type": "m.annotation"
}
},
"origin_server_ts": 1643779769772,
"sender": "@madlittlemods:matrix.org",
"type": "m.reaction",
"unsigned": {
"age": 26684
},
"event_id": "$k52WkLrC5T541zfVbofUdSDhmp8Zq2wnF8fh10x4dKI"
},
{
"content": {
"body": "The Greeks, including Aristotle, Vitruvius, and Pliny the Elder, were interested in the cause and mitigation of friction.",
"msgtype": "m.text",
"org.matrix.msc1767.text": "The Greeks, including Aristotle, Vitruvius, and Pliny the Elder, were interested in the cause and mitigation of friction."
},
"origin_server_ts": 1643779783542,
"sender": "@madlittlemods:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 12914
},
"event_id": "$ptJA2m9yHXrgx4Cl0mFUTVwiBy5gR25Z3oe0pdG33OU"
}
]