Repository navigation
Polykey naming and repository structure #426
Description
Move to new repo structure:
Polykey
- js-polykey renames to Polykey
- keeps all issues in js-polykey
- license: GPL3 (possible move to APL3)
- npm: polykey
- not hosted on nix (it's not an application)
- supports network API
- embeddable as a library
- bin/ code is extracted to Polykey-CLI
- maintains wiki: theory, reference, guides, tutorials
- maintains community discussions
- main README.md (open source entry point)
- requires cross-platform gitlab runner for building and QA of possibly-native addons
Polykey-CLI
- license: GPL3
- npm: polykey-cli
- nix: polykey-cli
- extracts bin/ code out of js-polykey
- requires cross-platform gitlab runner for building and QA
Polykey-Desktop - electron/tauri wrapper around library code
- license: GPL3
- not hosted on npm (it's not a JS library or application)
- nix: polykey-desktop
- requires cross-platform gitlab runner for building & QA
Polykey-Mobile - nativescript wrapper around library code
- license: unknown
- not hosted on npm (it's not a JS library or application)
- not hosted on nix (it's not a desktop application)
- requires cross-platform gitlab runner for building & QA
Old spec:
I reckon the js-polykey codebase can be moved into Polykey. There aren't going to be other language implementations of js-polykey. And the desktop application is unlikely to be distributed in NPM anyway. So we can just use the name NPM package name polykey.
This would mean:
- Polykey - CLI & library code, and all the wiki: theory, reference, guides, tutorials, README.md should be mentioning Polykey-Desktop and Polykey-Mobile
- Polykey-Desktop - Electron app
- Polykey-Mobile - Mobile App
We have 3 names on npm:
- https://www.npmjs.com/package/@matrixai/polykey
- https://www.npmjs.com/package/polykey
- https://www.npmjs.com/package/js-polykey
I think we should revive the name polykey and make use of it. It's less characters to type. We already control it, we just need to undeprecate the name: https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions. Then that means deprecating @matrixai/polykey in favour of polykey. Neither desktop app nor mobile app would be distributed on NPM so their names can be just polykey-desktop and polykey-mobile in package.json.
In other package repositories, polykey and polykey-desktop would be separate names. So nixpkgs would have polykey and polykey-desktop.
Furthermore we would have a polykey-enterprise a mirror/fork of the repo. Need to study how this is done in gitlab. This version is proprietary or it may be semi-opensource with BSL. See: https://about.gitlab.com/install/ce-or-ee/
We also want to preserve all the commit history of js-polykey, whereas this repo's history is less useful. We could just delete this repository and rename js-polykey to Polykey. But a safer option is probably history merging: https://stackoverflow.com/a/10548919/582917
Also in order to avoid needing to move all of our issues in js-polykey, we would go from Polykey to js-polykey.
Tasks
- - Attempt history merging in https://stackoverflow.com/a/10548919/582917, by merging Polykey into js-polykey
- - Move all wiki and issues from Polykey to js-polykey, thus superseding this MatrixAI/Polykey.old#3
- - Archive and schedule deletion this repository Polykey.old
- - Rename js-polykey to "Polykey" for its repository
- - Rename
package.jsonforjs-polykeytopolykey [ ] - Undeprecate the NPMpolykey[ ] - Publish topolykey[ ] - Deprecate@matrixai/polykey[ ] - Change name of Polykey-Desktop- desktop is now a JS application nor library, useless to dopackage.jsonto usepolykey-desktopnpm install. There is nomainhere. I guess it could work though, since electron is executable from JS, you just end up distributing native binaries... either prebuilds, or some sort of packaging situation where you select the appropriate release. At any case it's not really relevant.
Activity
CMCDragonkai commentedon Sep 23, 2021
I noticed alot of wiki assets were stored in the repo in order to do MatrixAI/Polykey-Docs#5. @emmacasolin
Those assets are better off being embedded into the wiki repo itself rather than the code repo.
Instructions to do this are here: https://gist.github.com/TT--/14260aef6c0e31fca5b37e7cb3c53020 and https://gist.github.com/subfuzion/0d3f19c4f780a7d75ba2
I've done this before... so I will need to write a guide. This requires cloning the wiki git repo itself.
CMCDragonkai commentedon Oct 5, 2021
Note that internally we still have a
polykey-designrepository that can contain all the design materials. Although majority of its information should be ported to the wiki.However branding related information still stays in
polykey-design. Research notes can stay there too or be part of issues.CMCDragonkai commentedon Oct 18, 2021
Note that we should also maintain understanding of the wiki repo:
git@github.com:MatrixAI/js-polykey.wiki.gitorgit@github.com:MatrixAI/Polykey.wiki.git. This will be essential for putting images into the wiki so it doesn't need to link external resources or put images into the main repo.This repo might even be mirrored to our Gitlab as an explicit repo. I wonder how a
README.mdwould be handled in the wiki repo.CMCDragonkai commentedon Oct 25, 2021
Remember no more
gh-pagesbranch. Docs are going to come directly frommaster.CMCDragonkai commentedon Oct 25, 2021
While the branch is deleted, docs still need to be generated. So we should update this.
CMCDragonkai commentedon Dec 15, 2021
Due to licensing inspired by Ethereum. We may want to do this:
CMCDragonkai commentedon Dec 15, 2021
One problem... These are what has access to the macos runner.
So we would need to rename https://gitlab.com/MatrixAI/open-source/js-polykey to https://gitlab.com/MatrixAI/open-source/Polykey-CLI. So that the github CLI benefits from the macos runner.
This would mean that
Polykeyitself does not have macos runner. But that's ok for now, we can request it subsequently. Our tests currently only run on Nix anyway which is Linux only.CMCDragonkai commentedon Dec 15, 2021
The alternative is to stick with
Polykeyas GPL3, and then slowly move domains out to separate libraries when they can be relicensed.CMCDragonkai commentedon May 11, 2022
New plan:
Polykey
Polykey-CLI
Polykey-Desktop - electron/tauri wrapper around library code
Polykey-Mobile - nativescript wrapper around library code
Updating on the issue description.
[-]Merging js-polykey and Polykey repositories and fixing up names[/-][+]Polykey naming and repository structure[/+]CMCDragonkai commentedon May 14, 2022
Because we don't control/own the wiki platform, instead of putting all of our docs there, our theory, guides, and tutorials will instead go directly to
polykey.io/docs.Our
referencecan still be mostly generated through typedoc and hosted on github pages, we need some customisation there so we can link it back to polykey.io.Note that our libraries will only have reference documentation, they don't really need anything else, which is generated directly via typedoc.
Note that we may need a custom theme to be able to inject GTM into our generate docs page. More information should always be in the GH pages, since those links will not be nofollow. See: https://matrixai.github.io/TypeScript-Demo-Lib/ or https://matrixai.github.io/js-encryptedfs/. These links will all be done via
github.io. These are all hosting the generated reference documentation.3 remaining items
CMCDragonkai commentedon Jul 23, 2022
However the wiki will be scheduled to go into the polykey.io/docs instead due to community/community#4992. GH wikis are not SEO friendly.
However the wiki is still useful way of editing information compared to editing pages on our website. So a hybrid solution is to have the wiki available but then replicate/mirror the wiki to the website.
How to do this? Well the wiki information is public, and we can use BE server to mirror the information. Because search engines cannot see the wiki anyway, it's fine to have the duplicate information.
However
polykey.iois hosted by webflow which has their own custom CMS. So how to connect to an external API (possibly serverless) backend to then load custom data. Most important it must do the rendering of HTML itself, and not just a mirror the HTML and present it via SSR, not fetched from JS.CMCDragonkai commentedon Jul 23, 2022
It looks like on webflow, it supports https://university.webflow.com/lesson/href-prefix which allows part of an existing website hosted by your own webserver to reverse proxy a particular url directory to webflow.
However I'm looking to do the opposite, use webflow to reverse proxy a portion of the site to an alternative location. However they only allow this for enterprise: https://webflow.com/feature/reverse-proxy-service-for-enterprise
So it looks like it will be time to to front webflow with our own reverse proxy to serve.
There are 2 options here:
polykey.ioand we can use it's page rules and maybe other features to be able to route a subdirectory to a different backend server.Finally the underlying backend could work as a serverless platfrom like cloudflare workers, and then it just has to fetch the wiki markdown and render the correct page.
This does limit the wiki's formatting to what the HTML is shown. See: https://stackoverflow.com/questions/38480701/can-a-github-wiki-embed-html and https://github.com/bryanbraun/github-wiki-html-test/wiki. Note that even if github wiki itself removes those tags, the code is still in the wiki git, and when we mirror we can render that with custom CSS as well if needed. We will need to incorporate this https://webmasters.stackexchange.com/a/76927
Seems like something to be automated with pulumi when we get to it.
CMCDragonkai commentedon Jul 23, 2022
All issues and wiki and asset files transferred over. Just need to move over a README.md.
CMCDragonkai commentedon Jul 23, 2022
Old Polykey repository can be deleted now. Going to first archive it, and then delete it later.
CMCDragonkai commentedon Jul 23, 2022
Now need to update gitlab.
CMCDragonkai commentedon Jul 23, 2022
Zenhub and gitlab swapped over. Seems to be working fine.
CMCDragonkai commentedon Jul 23, 2022
Still need to do this: https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions
But to do it well, we should be publishing the polykey package @tegefaulkes @emmacasolin
CMCDragonkai commentedon Jul 23, 2022
@emmacasolin @tegefaulkes make sure to swap the remotes for origin and cicd to point to:
Use
git remote set-url origin git@github.com:MatrixAI/Polykey.git.Rename the directory
js-polykeytoPolykeyand then just checkout staging andgit pull. That will be sufficient to update anything you're using.CMCDragonkai commentedon Jul 23, 2022
Codesee now integrated, so we should get maps for each PRs now.
CMCDragonkai commentedon Jul 23, 2022
We should aim to get all staging tests passing (or disabling whatever) in order to release a new version, so this issue can be closed.
CMCDragonkai commentedon Jul 24, 2022
Going to split out this issue to subissues, as the main job is done.
CMCDragonkai commentedon Jul 24, 2022
Publishing tasks moved to #268.
CMCDragonkai commentedon Jul 24, 2022
Wiki publishing going to MatrixAI/Polykey-Docs#1.