Backend Server with Frontend App is deployable (works on local / heroku)
Frontend App communicate with the Backend Server
Backend Server communicate with the Issues API wrapper
CLI communicate with the Backend Server / API wrapper
Frontend App needed because:
don't won't to force users to download, install and config Nodejs and work with the CLI
Backend Server needed because:
the Frontend App and CORS
and because cant request everything to Github API from the client-side (Frontend App)
CLI Flow
download cli and run it
welcome message and suggestion for Github registration
prompts for username+password or token
try to create username.github.io repo if not exist
othewise suggest to delete if exist and create it again (or update it)
it will have index page only
suggest custom domain and write CNAME if given
prompts for title, keywords, description, about, avatar, socials, etc
then build the index in username.github.io repo
try to create blog repo if not exist
otherwise suggest to delete
if no exit
if yes delete and create it again
create first issue (first comment to first issue) through API to Github
get the created issue compile/render and deploy static pages (and json db)
webhooks
good luck
Frontend App
used only for the same steps as in CLI Flow above
works with the Backend Server
Writing flow
After all is installed and created just work with the Github UI for issues
Maybe will need some webhooks for issues, to drop the need to request the server to rebuild everything after every new article (issue) and comment.
Also need some smart rebuilding. E.g you create new article/post (open new issue), after that someone comment it, or you just want to edit it; server must just append/update already existing static pages and json db on the every change to save requests to the Github API
as per #1 continuation
CLI, Frontend App, Backend Server
CLI Flow
username.github.io
repo if not existusername.github.io
repoblog
repo if not existno
exityes
delete and create it againFrontend App
Writing flow
After all is installed and created just work with the Github UI for issues
Maybe will need some webhooks for issues, to drop the need to request the server to rebuild everything after every new article (issue) and comment.
Also need some smart rebuilding. E.g you create new article/post (open new issue), after that someone comment it, or you just want to edit it; server must just append/update already existing static pages and json db on the every change to save requests to the Github API