gitfaster-demo.mp4
Check it out live at gitfaster.dev
You can also try by replacing any github.com
URL with githubf.com
to switch to GithubF[aster].
This project is a submission to the Next.js Global Hackathon, for the speed category.
Gitfaster was created out of personal frustration with GitHub's slow navigation. I often browse repositories to learn or reference examples, but GitHub's Multi-Page Application makes it painfully slow to navigate quickly - even when I already know exactly which file or directory I'm looking for.
Gitfaster directly addresses this issue by prioritizing speed and responsiveness. It achieves this through two primary optimizations:
-
Efficient Caching: GitHub API responses are cached intelligently to minimize redundant requests, drastically improving load times.
-
Predictive Prefetching: When a user visits a page, we already know all the possible links they might navigate to next. In theory, we could fetch all of these pages in the background to make navigation instantaneous. However, prefetching every visible link would be resource-intensive and inefficient. To optimize performance, Gitfaster employs a "just-in-time" prefetching strategy by loading content early when the user hovers over a link. This approach ensures that the next page loads instantly upon clicking, delivering an exceptionally snappy experience without unnecessary resource consumption.
The end result is a much faster and more enjoyable experience for quickly navigating and referencing code.
-
Clone the repository:
git clone https://github.com/krish120003/gitfaster.git
-
Navigate to the project directory:
cd gitfaster
-
Install the dependencies using pnpm:
pnpm install
-
Create a
.env
file based on the.env.example
file and fill in the required environment variables:cp .env.example .env
Make sure to configure the following variables:
AUTH_SECRET
: Generate a new secret usingopenssl rand -base64 64
.GITHUB_ID
: Your GitHub application client ID.GITHUB_SECRET
: Your GitHub application client secret.DATABASE_URL
: PostgreSQL database connection URL.REDIS_URL
: Redis connection URL.GITHUB_TOKEN
: GitHub Personal Access Token.
-
Start the local database using Docker (optional):
./start-database.sh
-
Push the Drizzle schema to the database:
pnpm db:push
-
Start the development server:
pnpm dev