Giter Site home page Giter Site logo

gh-next's Introduction

A clone of github* in Next.JS

* only some features are implemented : issues CRUD & notifications

⚠️ THIS PROJECT IS IN ACTIVE DEVELOPMENT !!

Expect stuff to break.

Roadmap

Stack

Requirements

  • Node >= v16.6.2
  • PNPM >= v6.22.2
  • A neon database
  • A registered github app for authenticating users

🚀 How to work on the project ?

  1. First you have to clone the repository

    git clone https://github.com/Fredkiss3/gh-next.git
  2. Install the dependencies on the bun server and launch it :

    cd server
    bun install
    bun run dev

    the server will be open at http://127.0.0.1:3001

  3. Move to the www folder :

  4. Then, Install the dependencies :

    pnpm install
  5. Rename .env.example to .env.local And change the file to your needs,

  6. And launch the project :

    pnpm run dev

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

  7. 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.

.
├── server/
└── www/
     ├── src/
     │    ├── app/
     │    │   ├── (actions)
     │    │   ├── (components)
     │    │   ├── (models)
     │    │   └── (routes)
     │    └──lib/
     │        ├── db/schema
     │        └── hooks
     ├── .prettierrc
     ├── pnpm-lock.yaml
     └── tsconfig.json
  1. server/: this folder contains the source code to a local server implemented in bun used for replacing the Key/Value Store on cloudfare, since we use edge runtime for our projet we couldn't have just done it in our next app as it store keys in files and we don't have access to FILE I/O on edge runtime.

  2. www/src/app/: this folder contains the source code to our app :

    1. (actions) : this folder contains all the logic of our app.

    2. (components) : this folder contains all the components of our app.

    3. (models) : this folder contains all the DB models of our app.

    4. (routes) : this folder contains all the routes & pages of our app.

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

    1. db/schema : this folder contains all the drizzle sqlite schema for our DB.

    2. hooks : this folder contains all the react custom hooks used in the app.

  4. www/.prettierrc: this file contains the configuration for prettier to enable autoformatting.

  5. www/pnpm-lock.yaml: this file contains the dependencies lock for the repo.

  6. www/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
NEON_DB_URL url of the neon database, as shown in neon dashboard
KV_REST_URL 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.