[♻️ refactor] Expand scope
Fredkiss3 opened this issue · comments
Adrien KISSIE commented
What is the reason to do this refactor ?.
For fun.
Describe the work that needs to be done
we will expand the scope with these features :
- files hosting for repos (with a storage limit)
- file browsing + search
- file search (?) with sourcegraph or something like that
- commit history
- time travel
- issue kanban board (like github projects), to close an issue either with a commit or from the UI
- running CI with docker, we can take inspiration from gitlab : https://gitlab.com/gitlab-org/gitlab
- support
git push
andgit remote <cmd>
- list all the repos (UI inspiration: https://github.com/trending), the path should be
/explore
- search for repository
Additional context
this closes of #53 we will continue working with only next app router, until we can't.
Some packages for reference :
- Queue system (with REDIS) : https://github.com/OptimalBits/bull
- we will need another server that handles the queue, not the nextjs app (or maybe not ?)
- some guide & docs around bull : https://github.com/OptimalBits/bull/blob/develop/PATTERNS.md#returning-job-completions , https://www.digitalocean.com/community/tutorials/how-to-handle-asynchronous-tasks-with-node-js-and-bullmq
- Rate limiting : https://github.com/fastify/fastify-rate-limit
- Use pragramatic-drag-and-drop for the kanban board :
- Try minio for the file system ? https://github.com/minio/minio
- Isomorphic git : https://isomorphic-git.org/en/
- We can also take inspiration from : https://github.com/go-gitea/gitea
- We should also try to test it locally : https://dl.gitea.com/gitea/
- For CI we may be inspired by this or straight up use that (with credit to the source) : https://x.com/fat/status/1729526683701854603?s=46
- Git hooks : https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- Git server : https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
- Git hooks folder : https://stackoverflow.com/questions/3462955/putting-git-hooks-into-a-repository
- Git server setup : https://linuxize.com/post/how-to-setup-a-git-server/
- NodeJS github server :
- more stars : https://github.com/stackdot/NodeJS-Git-Server
- another option : https://github.com/gabrielcsapo/node-git-server (they have TS support 👀 ) ✅
- client (walker) : Isomorphic git : https://isomorphic-git.org/en/ ✅
- PHP git server : https://github.com/jonls/php-git-server/tree/master - Building your own git : https://app.codecrafters.io/courses/git/overview
- PB-Boss for background & scheduled jobs using postgres : https://logsnag.com/blog/deep-dive-into-background-jobs-with-pg-boss-and-typescript
- Look into this for quota limitations :
- https://serverfault.com/questions/100596/linux-quota-per-directory
- https://stackoverflow.com/questions/10914208/is-there-a-git-server-side-hook-to-put-quota-on-repository-sizes
- Are you willing to make a PR for this ?
Adrien KISSIE commented
To implement the git actions, we wil use :
- for the server : https://github.com/gabrielcsapo/node-git-server (they have TS support 👀 ) ✅ , POC here : https://github.com/Fredkiss3/git-test used for handling all git commands from the client
- client : Isomorphic git : https://isomorphic-git.org/en/ ✅ used for reading git objects, searching and walking each repository, also may be used for PRs & forks and handling git actions from the browser