1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 18:54:53 +09:00
vervis/th/routes
fr33domlover 2e72684fd5 Switch to new actor layout
This is such a huge patch, it's probably impossible to tell what it does by
looking at the code. One thing is clear: It changes *everything* :P so here's
an overview:

- There are now 5 types of actors, each having its own top-level route
- So projects, repos, etc. are no longer "under" sharers
- Actor routes are now based on their KeyHashid, there are no "idents" anymore,
  i.e. URLs look random and don't contain user or repo names
- No sharers anymore; people and groups are distinct entities not sharing a
  common namespace or anything like that
- Project has been renamed to Deck and it simply means a ticket tracker; repos
  are no longer "under" projects
- In addition to Person, Group, Repo and Deck, there's a new actor type Loom,
  which is a patch tracker; i.e. Repo actors don't manage MRs anymore
- All C2S and S2S is temporarily disabled, because huge changes to the whole
  code are required and I'll do them gradually in the next patches
- Since form-based actions are implemented using C2S, they're disabled as well,
  so Vervis is now essentially read-only
- Some views have been temporarily removed, e.g. repo history and commit view
- A huge set of DB migrations has been added to adapt the DB to these changes;
  I haven't tested them yet on a read DB so there may be errors there; I'll fix
  them in the next patches if I find any (probably going to test on the main
  instance where Vervis itself is hosted...)
- Some modules got tech upgrades, e.g. LocalActor became a higher-kinded type
  and a similar pattern is probably relevant for several other types
- There's an 'Actor' entity in the DB schema now, and all 5 actor types use it
  for common things like inbox and outbox
- Although inbox and outbox are used only by Actor, so essentially could be
  removed, I haven't removed them; that's because I wonder if at some point
  users can have a tree of inboxes much like in email; I don't have an excuse
  for Outbox, but anyway, leaving them as is for now
- Workflows, roles and collaborators are partially removed/unused until I
  figure out a sane federated way to provide these features
- Since repo routes don't contain a "sharer" anymore, SSH URIs are now simpler,
  they already look like user@host/repo regardless of who "controls" that repo
2022-08-15 13:57:42 +00:00

276 lines
14 KiB
Text

-- This file is part of Vervis.
--
-- Written in 2016, 2018, 2019, 2020, 2022
-- by fr33domlover <fr33domlover@riseup.net>.
--
-- ♡ Copying is an act of love. Please copy, reuse and share.
--
-- The author(s) have dedicated all copyright and related and neighboring
-- rights to this software to the public domain worldwide. This software is
-- distributed without any warranty.
--
-- You should have received a copy of the CC0 Public Domain Dedication along
-- with this software. If not, see
-- <http://creativecommons.org/publicdomain/zero/1.0/>.
-- ----------------------------------------------------------------------------
-- Yesod misc
-- ----------------------------------------------------------------------------
-- /highlight/#Text/style.css HighlightStyleR GET
-- ----------------------------------------------------------------------------
-- Internal
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
-- Federation
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
-- Current user
-- ----------------------------------------------------------------------------
-- /k KeysR GET POST
-- /k/!new KeyNewR GET
-- /k/#KyIdent KeyR GET DELETE POST
-- /cr ClaimRequestsPersonR GET
-- ----------------------------------------------------------------------------
-- People
-- ----------------------------------------------------------------------------
-- /g/!new GroupNewR GET
-- /g/#ShrIdent/m GroupMembersR GET POST
-- /g/#ShrIdent/m/!new GroupMemberNewR GET
-- /g/#ShrIdent/m/#ShrIdent GroupMemberR GET DELETE POST
-- /s/#ShrIdent/pr ProjectRolesR GET POST
-- /s/#ShrIdent/pr/!new ProjectRoleNewR GET
-- /s/#ShrIdent/pr/#RlIdent ProjectRoleR GET DELETE POST
-- /s/#ShrIdent/pr/#RlIdent/a ProjectRoleOpsR GET POST
-- /s/#ShrIdent/pr/#RlIdent/a/!new ProjectRoleOpNewR GET
-- ----------------------------------------------------------------------------
-- Projects
-- ----------------------------------------------------------------------------
-- /s/#ShrIdent/r ReposR GET
-- /s/#ShrIdent/p/#PrjIdent/tcr ClaimRequestsProjectR GET
-- /w GlobalWorkflowsR GET POST
-- /w/!new GlobalWorkflowNewR GET
-- /w/#WflIdent GlobalWorkflowR GET DELETE POST
-- /s/#ShrIdent/w WorkflowsR GET POST
-- /s/#ShrIdent/w/!new WorkflowNewR GET
-- /s/#ShrIdent/w/#WflIdent WorkflowR GET DELETE POST
-- /s/#ShrIdent/w/#WflIdent/f WorkflowFieldsR GET POST
-- /s/#ShrIdent/w/#WflIdent/f/!new WorkflowFieldNewR GET
-- /s/#ShrIdent/w/#WflIdent/f/#FldIdent WorkflowFieldR GET DELETE POST
-- /s/#ShrIdent/w/#WflIdent/e WorkflowEnumsR GET POST
-- /s/#ShrIdent/w/#WflIdent/e/!new WorkflowEnumNewR GET
-- /s/#ShrIdent/w/#WflIdent/e/#EnmIdent WorkflowEnumR GET DELETE POST
-- /s/#ShrIdent/w/#WflIdent/e/#EnmIdent/c WorkflowEnumCtorsR GET POST
-- /s/#ShrIdent/w/#WflIdent/e/#EnmIdent/c/!new WorkflowEnumCtorNewR GET
-- /s/#ShrIdent/w/#WflIdent/e/#EnmIdent/c/#Text WorkflowEnumCtorR PUT DELETE POST
-- /s/#ShrIdent/p/#PrjIdent/w/+Texts WikiPageR GET
------------------------------------------------------------------------------
-- New route structure
------------------------------------------------------------------------------
---- Static Files ------------------------------------------------------------
/static StaticR Static appStatic
/favicon.svg FaviconSvgR GET
/favicon.png FaviconPngR GET
/robots.txt RobotsR GET
---- Authentication ----------------------------------------------------------
/auth/!resend ResendVerifyEmailR GET
/auth AuthR Auth getAuth
/oauth DvaraR Dvara getDvara
/akey1 ActorKey1R GET
/akey2 ActorKey2R GET
---- Client ------------------------------------------------------------------
/ HomeR GET
/browse BrowseR GET
/notifications NotificationsR GET POST
/publish PublishR GET POST
/inbox InboxDebugR GET
---- Person ------------------------------------------------------------------
/people/#PersonKeyHashid PersonR GET
/people/#PersonKeyHashid/inbox PersonInboxR GET POST
/people/#PersonKeyHashid/outbox PersonOutboxR GET POST
/people/#PersonKeyHashid/outbox/#OutboxItemKeyHashid PersonOutboxItemR GET
/people/#PersonKeyHashid/followers PersonFollowersR GET
/people/#PersonKeyHashid/following PersonFollowingR GET
/people/#PersonKeyHashid/ssh-keys/#SshKeyKeyHashid SshKeyR GET
/people/#PersonKeyHashid/messages/#LocalMessageKeyHashid PersonMessageR GET
/people/#PersonKeyHashid/follow PersonFollowR POST
/people/#PersonKeyHashid/unfollow PersonUnfollowR POST
---- Group ------------------------------------------------------------------
/groups/#GroupKeyHashid GroupR GET
/groups/#GroupKeyHashid/inbox GroupInboxR GET POST
/groups/#GroupKeyHashid/outbox GroupOutboxR GET
/groups/#GroupKeyHashid/outbox/#OutboxItemKeyHashid GroupOutboxItemR GET
/groups/#GroupKeyHashid/followers GroupFollowersR GET
---- Repo --------------------------------------------------------------------
/repos/#RepoKeyHashid RepoR GET
/repos/#RepoKeyHashid/inbox RepoInboxR GET POST
/repos/#RepoKeyHashid/outbox RepoOutboxR GET
/repos/#RepoKeyHashid/outbox/#OutboxItemKeyHashid RepoOutboxItemR GET
/repos/#RepoKeyHashid/followers RepoFollowersR GET
/repos/#RepoKeyHashid/_darcs/+Texts DarcsDownloadR GET
/repos/#RepoKeyHashid/info/refs GitRefDiscoverR GET
/repos/#RepoKeyHashid/git-upload-pack GitUploadRequestR POST
/repos/#RepoKeyHashid/source/+Texts RepoSourceR GET
/repos/#RepoKeyHashid/source-by/#Text/+Texts RepoBranchSourceR GET
/repos/#RepoKeyHashid/commits RepoCommitsR GET
/repos/#RepoKeyHashid/commits-by/#Text RepoBranchCommitsR GET
/repos/#RepoKeyHashid/commits/#Text RepoCommitR GET
/new-repo RepoNewR GET POST
/repos/#RepoKeyHashid/delete RepoDeleteR POST
/repos/#RepoKeyHashid/edit RepoEditR GET POST
/repos/#RepoKeyHashid/follow RepoFollowR POST
/repos/#RepoKeyHashid/unfollow RepoUnfollowR POST
/post-receive PostReceiveR POST
---- Deck --------------------------------------------------------------------
/decks/#DeckKeyHashid DeckR GET
/decks/#DeckKeyHashid/inbox DeckInboxR GET POST
/decks/#DeckKeyHashid/outbox DeckOutboxR GET
/decks/#DeckKeyHashid/outbox/#OutboxItemKeyHashid DeckOutboxItemR GET
/decks/#DeckKeyHashid/followers DeckFollowersR GET
/decks/#DeckKeyHashid/tickets DeckTicketsR GET
/decks/#DeckKeyHashid/tree DeckTreeR GET
/new-deck DeckNewR GET POST
/decks/#DeckKeyHashid/delete DeckDeleteR POST
/decks/#DeckKeyHashid/edit DeckEditR GET POST
/decks/#DeckKeyHashid/follow DeckFollowR POST
/decks/#DeckKeyHashid/unfollow DeckUnfollowR POST
---- Ticket ------------------------------------------------------------------
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid TicketR GET
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/discussion TicketDiscussionR GET
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/events TicketEventsR GET
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/followers TicketFollowersR GET
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/deps TicketDepsR GET
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/rdeps TicketReverseDepsR GET
-- /decks/#DeckKeyHashid/new-ticket TicketNewR GET POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/edit TicketEditR GET POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/delete TicketDeleteR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/accept TicketAcceptR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/close TicketCloseR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/open TicketOpenR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/claim TicketClaimR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/unclaim TicketUnclaimR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/assign TicketAssignR GET POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/unassign TicketUnassignR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/follow TicketFollowR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/unfollow TicketUnfollowR POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/reply TicketTopReplyR GET POST
---- Ticket Dependency -------------------------------------------------------
/decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/deps/#TicketDepKeyHashid TicketDepR GET
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/new-dep TicketDepNewR GET POST
-- /decks/#DeckKeyHashid/tickets/#TicketDeckKeyHashid/deps/#TicketDepKeyHashid/delete TicketDepDeleteR POST
---- Loom --------------------------------------------------------------------
/looms/#LoomKeyHashid LoomR GET
/looms/#LoomKeyHashid/inbox LoomInboxR GET POST
/looms/#LoomKeyHashid/outbox LoomOutboxR GET
/looms/#LoomKeyHashid/outbox/#OutboxItemKeyHashid LoomOutboxItemR GET
/looms/#LoomKeyHashid/followers LoomFollowersR GET
/looms/#LoomKeyHashid/cloths LoomClothsR GET
-- /new-loom LoomNewR GET POST
-- /looms/#LoomKeyHashid/delete LoomDeleteR POST
-- /looms/#LoomKeyHashid/edit LoomEditR GET POST
-- /looms/#LoomKeyHashid/follow LoomFollowR POST
-- /looms/#LoomKeyHashid/unfollow LoomUnfollowR POST
---- Cloth -------------------------------------------------------------------
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid ClothR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/discussion ClothDiscussionR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/events ClothEventsR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/followers ClothFollowersR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/deps ClothDepsR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/rdeps ClothReverseDepsR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/bundles/#BundleKeyHashid BundleR GET
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/bundles/#BundleKeyHashid/patches/#PatchKeyHashid PatchR GET
-- /looms/#LoomKeyHashid/new-cloth ClothNewR GET POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/edit ClothEditR GET POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/delete ClothDeleteR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/accept ClothAcceptR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/close ClothCloseR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/open ClothOpenR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/claim ClothClaimR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/unclaim ClothUnclaimR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/assign ClothAssignR GET POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/unassign ClothUnassignR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/follow ClothFollowR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/unfollow ClothUnfollowR POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/reply ClothTopReplyR GET POST
---- Cloth Dependency --------------------------------------------------------
/looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/deps/#TicketDepKeyHashid ClothDepR GET
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/new-dep ClothDepNewR GET POST
-- /looms/#LoomKeyHashid/cloths/#TicketLoomKeyHashid/deps/#TicketDepKeyHashid/delete ClothDepDeleteR POST