Renders the whole app, its providers around its routes. main.tsx mounts
it. Its paths follow one rule (shared/paths.ts): @name is a user, any
other word under the root a category or an app page, a view of a page one
more segment, and a default view the bare path, with no redirect.
/is the feed of every dump on the viewer's default tab, and/hot,/new,/journaland/followits tabs (Index),/follow/playliststhe dumps of the playlists followed./?share_url=opens the create form on a shared link./searchand/search/:searchTabare the search results (Search)./registerand/loginsign up and sign in (UserRegister,UserLogin), signed out only,/login?next=coming back to a page./authorizelets another gerbeur instance sign the user in with their account here (Authorize), and/federation/callbackfinishes a sign-in here with an account on another (FederationCallback)./reset-passwordasks for a reset link by email, and sets a new password from it,?token=(ResetPassword), and/unsubscribeturns off a digest from its emailed link (Unsubscribe)./notifications(Notifications) and/settings(Settings), signed in only, and/manage, the site's tools, forcategory:manageorfederation:manage(Manage)./communityand/community/monthly, the site's week and month (Community), signed in only./playlistsis every public playlist, and/playlists/:categorySluga playlist category's, in the order?sort=names, or with?mine=1the signed-in user's own (Playlists)./@:username/*is a user's (UserRoutes): their profile and its tabs, their dumps atdumps/:slug(Dump) anddumps/:slug/edit(DumpEdit, signed in only), and their playlists atplaylists/:slug(PlaylistDetail), with its editor open atplaylists/:slug/edit./:categorySlugand/:categorySlug/:feedTabare a dump category's feed (Index), with its/follow/playliststoo.- Any other path is
NotFound.
The pages not marked are open to anyone. Every page is loaded with its
route. Since category slugs share the root with the app's pages and the
feed tabs, the server reserves those words as slugs; no slug has an @.
Renders the app. The theme, player, socket, follow and chat providers read
the session, and ChatProvider reads the URL, so it sits inside the router.
GlobalPlayer sits outside the routes, so playback survives navigation.
Renders the route table, and the floating buttons over every page. Exported for the tests, which reach a page through it as a visit does.
Usage
import * as mod from "src/App.tsx";