A minimal Github clone built on nextjs app router.
See the codeA 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.
Expect stuff to break.
git push and git remote commandsFirst you have to clone the repository
git clone https://github.com/Fredkiss3/gh-next.git
Start the docker compose instance to start the DB + redis instance :
docker-compose up -d --remove-orphans
Install the dependencies :
pnpm install
Rename .env.example to .env.local And change the file to your needs,
And launch the project :
pnpm run dev
The app will show at http://localhost:3000.
Open the source code and start rocking ! 😎
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
src/app/: this folder contains all the routes & pages of our app.
src/actions : this folder contains all the logic of our app.
src/components : this folder contains all the components of our app.
src/models : this folder contains all the DB models of our app.
src/lib/: this folder contains utils & helpers used throughout our app :
client : this folder contains all the utilities that are client-only, usually used by client components. It contains mainly hooks
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
shared : this folder contains all the utilities that are shared between the server & client, these can be used anywhere in the app.
biome.json: this file contains the configuration for biome to enable autoformatting.
pnpm-lock.yaml: this file contains the dependencies lock for the repo.
tsconfig.json: this file contains the configuration for typescript, that are used by the all the underlying packages
| 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 |
94,070 followers · starred Aug 2023
2,031 followers · starred Jul 2023
1,022 followers · starred Aug 2023
366 followers · starred Aug 2023
A minimal Github clone built on nextjs app router.
See the codeA 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.
Expect stuff to break.
git push and git remote commandsFirst you have to clone the repository
git clone https://github.com/Fredkiss3/gh-next.git
Start the docker compose instance to start the DB + redis instance :
docker-compose up -d --remove-orphans
Install the dependencies :
pnpm install
Rename .env.example to .env.local And change the file to your needs,
And launch the project :
pnpm run dev
The app will show at http://localhost:3000.
Open the source code and start rocking ! 😎
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
src/app/: this folder contains all the routes & pages of our app.
src/actions : this folder contains all the logic of our app.
src/components : this folder contains all the components of our app.
src/models : this folder contains all the DB models of our app.
src/lib/: this folder contains utils & helpers used throughout our app :
client : this folder contains all the utilities that are client-only, usually used by client components. It contains mainly hooks
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
shared : this folder contains all the utilities that are shared between the server & client, these can be used anywhere in the app.
biome.json: this file contains the configuration for biome to enable autoformatting.
pnpm-lock.yaml: this file contains the dependencies lock for the repo.
tsconfig.json: this file contains the configuration for typescript, that are used by the all the underlying packages
| 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 |
94,070 followers · starred Aug 2023
2,031 followers · starred Jul 2023
1,022 followers · starred Aug 2023
366 followers · starred Aug 2023