MCPcopy Index your code
hub / github.com/Fredkiss3/gh-next

github.com/Fredkiss3/gh-next @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
387 symbols 1,221 edges 180 files 19 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

A simple clone of github in Next.JS

A simple github alternative open source on github (ironic right ?), it aims is to be fully functionnal with some of the core features of github working.

See #84 for more info on the supported features.

⚠️ THIS PROJECT IS IN ACTIVE DEVELOPMENT ⚠️

Expect stuff to break.

Roadmap

Click to see more

  • [x] Login/Logout
  • [x] HomePage (README content)
  • [x] Responsive Layout
  • [x] Settings page for toggling theme
  • [x] Stargazers Page
  • [x] See Profile informations
  • [x] Update username
  • [x] Change theme
  • [ ] User detail page
  • [x] Issues List page
  • [x] Search & filter issues by author, label, assignee, closed/open, title, mentions, etc. (Inspiration: https://github.com/openstatusHQ/openstatus, https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests)
  • [ ] New issue page
  • [ ] Issue CRUD (by the author only)
  • [ ] Comments CRUD
  • [ ] Mentions
  • [ ] Issue Popovers (for previewing issues)
  • [ ] Linking between issues
  • [ ] Assign & self assign issues
  • [ ] OpenGraph
  • [ ] landing (inspiration: https://github.com/trpc/trpc/blob/main/www/og-image/pages/api/landing.tsx)
  • [ ] Per repository
  • [ ] Per user
  • [ ] Per Issue (inspiration: https://opengraph.githubassets.com/101e5bdeef8e959c800fab2aef88eef0b01b15d883e3e17c990bde8dfd67d6b3/trpc/trpc/issues/4306)
  • [ ] Labels CRUD (can only add or update labels, no deleting)
  • [ ] Notifications page
  • [ ] Notifications badge (Inspiration: https://gist.github.com/Fredkiss3/ab918aee3977d681f0508537a44838c0, https://github.com/Fredkiss3/bunrest)
  • [ ] Notifications for issues subscriptions
  • [ ] Notifications for mentions
  • [ ] Notifications for issue statuses
  • [ ] Filter notifications by status, title, closed, etc.
  • [ ] Mark as done, unsubscribe
  • [ ] files hosting for repos (with a storage limit)
  • [ ] file browsing UI
  • [ ] file searching
  • [ ] Repository list
  • [ ] list of repos
  • [ ] search for repos
  • [ ] Git web UI
  • [ ] commit history
  • [ ] time travel
  • [ ] support git push and git remote commands
  • [ ] issue kanban board (like github projects), to close an issue either with a commit or from the UI
  • [ ] CI/CD
  • [ ] running CI with docker, we can take inspiration from gitlab

Stack

Requirements

  • Node >= v18.x
  • pnpm >= v8.x
  • docker installed for local development
  • A registered github app for authenticating users

🚀 How to work on the project ?

  1. First you have to clone the repository

bash git clone https://github.com/Fredkiss3/gh-next.git

  1. Start the docker compose instance to start the DB + redis instance :

bash docker-compose up -d --remove-orphans

  1. Install the dependencies :

bash pnpm install

  1. Rename .env.example to .env.local And change the file to your needs,

  2. And launch the project :

bash pnpm run dev

The app will show at http://localhost:3000.

  1. Open the source code and start rocking ! 😎

🧐 Project structure

A quick look at the top-level files and directories you will see in this project.

  .
  ├── src/
  │    ├── app
  │    ├── actions
  │    ├── components
  │    ├── models
  │    └── lib/
  │         ├── client
  │         ├── server
  │         └── shared
  ├── biome.json
  ├── pnpm-lock.yaml
  └── tsconfig.json
  1. src/app/: this folder contains all the routes & pages of our app.

  2. src/actions : this folder contains all the logic of our app.

  3. src/components : this folder contains all the components of our app.

  4. src/models : this folder contains all the DB models of our app.

  5. src/lib/: this folder contains utils & helpers used throughout our app :

  6. client : this folder contains all the utilities that are client-only, usually used by client components. It contains mainly hooks

  7. server : this folder contains all the utilities that are server-only, for use within server components and server actions. It also contains the DB schemas inside db/schema

  8. shared : this folder contains all the utilities that are shared between the server & client, these can be used anywhere in the app.

  9. biome.json: this file contains the configuration for biome to enable autoformatting.

  10. pnpm-lock.yaml: this file contains the dependencies lock for the repo.

  11. tsconfig.json: this file contains the configuration for typescript, that are used by the all the underlying packages

🍳 ENV VARIABLES USED

Nom role
SESSION_SECRET random 32 chars length string used to encode the session id
REDIS_HTTP_URL The URL to the connect to redis HTTP for a key/value store
DATABASE_URL The URL to the connect to the Postres Database
REDIS_HTTP_USERNAME LOCAL file server URL for storing key values
REDIS_HTTP_PASSWORD LOCAL file server URL for storing key values
GITHUB_CLIENT_ID github client id stored for our app used for authenticating users with github
GITHUB_PERSONAL_ACCESS_TOKEN github client token stored for our app used for authenticating users with github
GITHUB_REDIRECT_URI URL to redirect when a user has been authenticated
GITHUB_SECRET github secret stored for our app

Extension points exported contracts — how you extend this code

KVStore (Interface)
(no doc) [5 implementers]
src/lib/server/kv/index.server.ts
Global (Interface)
(no doc)
globals.d.ts
SubItemProps (Interface)
(no doc)
src/components/issues/issue-list-search-input.tsx
LocalizedScreenReaderText (Interface)
(no doc)
scripts/github-query-builder-element.ts
FulfilledThenable (Interface)
* From the React `use` internals
src/lib/shared/lifetime-cache.ts
PendingThenable (Interface)
(no doc)
src/lib/shared/lifetime-cache.ts
RejectedThenable (Interface)
(no doc)
src/lib/shared/lifetime-cache.ts

Core symbols most depended-on inside this repo

clsx
called by 180
src/lib/shared/utils.shared.ts
get
called by 46
src/lib/server/kv/index.server.ts
withOpactity
called by 34
tailwind.config.cjs
set
called by 26
src/lib/server/kv/index.server.ts
delete
called by 20
src/lib/server/kv/index.server.ts
addFlash
called by 12
src/lib/server/session.server.ts
#normalizeValue
called by 10
scripts/github-query-builder-element.ts
parseIssueFilterTokens
called by 9
src/lib/shared/utils.shared.ts

Shape

Function 234
Method 128
Class 18
Interface 7

Languages

TypeScript100%

Modules by API surface

scripts/github-query-builder-element.ts62 symbols
src/lib/server/session.server.ts32 symbols
src/lib/shared/utils.shared.ts17 symbols
scripts/github-action-list-element.ts16 symbols
src/lib/server/kv/webdis.server.mjs11 symbols
src/lib/shared/lifetime-cache.ts9 symbols
src/components/markdown-editor/markdown-editor-toolbar.tsx8 symbols
src/models/issues/index.ts7 symbols
src/lib/client/pauseable-timeout.ts7 symbols
src/actions/issue.action.tsx7 symbols
src/models/user.ts6 symbols
src/lib/server/kv/http.ts6 symbols

For agents

$ claude mcp add gh-next \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact