Lwa: Difference between revisions
(add planned feature set for Lwa) |
m (ββGoals) Β |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
'''<dfn>Lwa</dfn>''' is a in-progress social [[reader]] by {{jackyalcine}} | '''<dfn>Lwa</dfn>''' is a in-progress social [[reader]] by {{jackyalcine}} that aims to provide a people-centric approach to the social Web. It's comprised of a [[PWA]] for the Web browser, a proxy server for handling requests from [[Micropub]] and [[Microsub]] as well (for handling [[Web sign-in]], [[post type discovery]] and [[reply|a reply proxying bridge]]). Β | ||
=== | == Experiments == | ||
=== Composable Editor === | |||
The composable [[Micropub]] editor provided in Lwa is meant to be the ''advanced'' mode of the editing experience; for those who want to craft a particular item down to the property. This is a set of [https://developer.mozilla.org/en-US/docs/Web/Web_Components Web Components] optimized for use within Lwa. | |||
* | Source code (pending) is at https://git.jacky.wtf/indieweb/lwa-composer | ||
** [[ | Β | ||
* | === Web Proxy === | ||
* | Allowing a [[PWA]] to participate 'natively' with the IndieWeb requires the use of a trusted Web server. This proxy aims to provide an approved PWA to have its requests proxied through. The flow follows. | ||
* | Β | ||
* | <pre> | ||
* | GET /auth?me=https://jacky.wtf/&redirect_uri=https://pwa.example/auth/callback&state=$TOKEN | ||
* | Host: pwa.example | ||
Β | |||
* | HTTP/1.1 302 Redirect | ||
* | Location: https://proxy.example/authorize?id=[random id] | ||
* | </pre> | ||
Β | |||
The proxy server would begin the act of signing in, finding all the available endpoints for use (or only the ones specified in <code>rel[]</code> as part of the initial request) and ask for scopes as provided in <code>scope</code>. After the proxy server handles all of that, it'll redirect to the redirect URI provided with a <code>code</code> query parameter. This can be redeemed with the original value of <code>state</code> to another endpoint, <code>/redeem</code>. | |||
* | Β | ||
<pre> | |||
POST /redeem | |||
Host: pwa.example | |||
.. Browser-specific CORS headers .. | |||
Β | |||
state=$STATE | |||
code=$CODE | |||
Β | |||
Β | |||
HTTP/1.1 200 OK | |||
Content-Type: application/json | |||
Β | |||
{ | |||
Β "rels": { | |||
Β Β "micropub": ["http://proxy.example/endpoint/UUID0"] | |||
Β }, | |||
Β "rel-urls": { | |||
Β Β "http://jacky.example/micropub": { | |||
Β Β Β "rels": ["micropub"], | |||
Β Β Β "proxy_url": "http://proxy.example/endpoint/UUID0", | |||
Β Β Β "title": "Content" | |||
Β Β } | |||
Β }, | |||
Β "me": "https://jacky.example/" | |||
} | |||
</pre> | |||
Β | |||
This request will work once after redemption — the values should be stored into either session or local storage for later use. It returns the following: | |||
Β | |||
* '''rels''': List of endpoint URLs, mapped by their corresponding rel | |||
* '''rel-urls''': A mapping of relations by their URL. There's an additional key, <code>proxy_url</code> which serves as the CORS-friendly proxy URL for this endpoint. | |||
Β | |||
==== Notes ==== | |||
* Q: Should proxy endpoints have lifespans? This would enforce hygiene on PWA clients. | |||
* Q: Can we expand this to allow people to always proxy their endpoint - being "Cloudflare of Micropub"? | |||
* Q: Can requests can be sent elsewhere (e-mail?) | |||
Β | |||
=== Local Micropub === | |||
On the off chance someone doesn't have the ability to use [[Micropub]] on their site, Lwa can store posts for authenticated users for at most a month. A ''read only'' endpoint for querying [[posts]], [[tags]] and the like will be available. | |||
Β | |||
==== Caveats ==== | |||
* No [[nickname cache]] or [[hashtag cache]] support, to prevent spam. | |||
* The [[published|published date]] cannot be changed. | |||
* These posts are [[public|listed publicly]] with a [[audience|global audience]]. | |||
* Every post lives as an [[expire|expiring post]] with it being marked as such with <code>dt-expired</code>. | |||
* These posts do not send Webmentions out, but they can receive them. This is meant to be a [[spam]] prevention measure. | |||
Β | |||
== Goals == | |||
Β | |||
* [[Micropub]], [[Microsub]] and [[WebSub]] client | |||
* Adaptive timeline views ([[photo]]/[[video]]-optimized, [[audio]]-optimized, replies, reactions) | |||
* Checking if a [[reaction]] was made to a particular post | |||
* Inline [[reaction]] views from source and syndicated sources (configurable, requiring auth) | |||
* [[Web sign-in]] | |||
* [[backfeed]] some social operations like [[follow|following]] and [[block|blocking]] to one's [[micropub|Micropub server]] with [[visibility]] and [[audience]] put into consideration. | |||
* auto [[follow|following]] by looking for [[follow]] posts in a particular feed authored by oneself | |||
== See Also == | == See Also == | ||
* [[Microsub]] | * [[Microsub]] | ||
* | * [[Aperture]] | ||
* [[Monocle]] |
Latest revision as of 15:53, 7 April 2022
This article is a stub. You can help the IndieWeb wiki by expanding it.
Lwa is a in-progress social reader by Jacky AlcinΓ© that aims to provide a people-centric approach to the social Web. It's comprised of a PWA for the Web browser, a proxy server for handling requests from Micropub and Microsub as well (for handling Web sign-in, post type discovery and a reply proxying bridge).
Experiments
Composable Editor
The composable Micropub editor provided in Lwa is meant to be the advanced mode of the editing experience; for those who want to craft a particular item down to the property. This is a set of Web Components optimized for use within Lwa.
Source code (pending) is at https://git.jacky.wtf/indieweb/lwa-composer
Web Proxy
Allowing a PWA to participate 'natively' with the IndieWeb requires the use of a trusted Web server. This proxy aims to provide an approved PWA to have its requests proxied through. The flow follows.
GET /auth?me=https://jacky.wtf/&redirect_uri=https://pwa.example/auth/callback&state=$TOKEN Host: pwa.example HTTP/1.1 302 Redirect Location: https://proxy.example/authorize?id=[random id]
The proxy server would begin the act of signing in, finding all the available endpoints for use (or only the ones specified in rel[]
as part of the initial request) and ask for scopes as provided in scope
. After the proxy server handles all of that, it'll redirect to the redirect URI provided with a code
query parameter. This can be redeemed with the original value of state
to another endpoint, /redeem
.
POST /redeem Host: pwa.example .. Browser-specific CORS headers .. state=$STATE code=$CODE HTTP/1.1 200 OK Content-Type: application/json { "rels": { "micropub": ["http://proxy.example/endpoint/UUID0"] }, "rel-urls": { "http://jacky.example/micropub": { "rels": ["micropub"], "proxy_url": "http://proxy.example/endpoint/UUID0", "title": "Content" } }, "me": "https://jacky.example/" }
This request will work once after redemption — the values should be stored into either session or local storage for later use. It returns the following:
- rels: List of endpoint URLs, mapped by their corresponding rel
- rel-urls: A mapping of relations by their URL. There's an additional key,
proxy_url
which serves as the CORS-friendly proxy URL for this endpoint.
Notes
- Q: Should proxy endpoints have lifespans? This would enforce hygiene on PWA clients.
- Q: Can we expand this to allow people to always proxy their endpoint - being "Cloudflare of Micropub"?
- Q: Can requests can be sent elsewhere (e-mail?)
Local Micropub
On the off chance someone doesn't have the ability to use Micropub on their site, Lwa can store posts for authenticated users for at most a month. A read only endpoint for querying posts, tags and the like will be available.
Caveats
- No nickname cache or hashtag cache support, to prevent spam.
- The published date cannot be changed.
- These posts are listed publicly with a global audience.
- Every post lives as an expiring post with it being marked as such with
dt-expired
. - These posts do not send Webmentions out, but they can receive them. This is meant to be a spam prevention measure.
Goals
- Micropub, Microsub and WebSub client
- Adaptive timeline views (photo/video-optimized, audio-optimized, replies, reactions)
- Checking if a reaction was made to a particular post
- Inline reaction views from source and syndicated sources (configurable, requiring auth)
- Web sign-in
- backfeed some social operations like following and blocking to one's Micropub server with visibility and audience put into consideration.
- auto following by looking for follow posts in a particular feed authored by oneself