Skip to content

christiantochen/github-random-repo

Repository files navigation

GitHub Random Repo Project

This project is built following the instructions from https://roadmap.sh/projects/github-random-repo. It randomly displays a GitHub repository based on the API and allows users to explore repositories directly from their browser.

🔧 Built With

  • Next.js 15: Framework for React applications, enabling server-side rendering and static site generation.
  • React 19: JavaScript library for building user interfaces.
  • ShadCN UI: Component library for building accessible and beautiful interfaces.
  • Tailwind CSS: Utility-first CSS framework for creating custom designs quickly.
  • GitHub REST API: To fetch and display random repositories from GitHub.

📦 Installation

To get started with the project locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/christiantochen/github-random-repo.git
  2. Copy the .env.example file to .env:
    cp .env.example .env
  3. Obtain your GitHub personal access token by following GitHub’s guide.
  4. Add your GitHub token to the .env file:
    GITHUB_TOKEN=your_personal_access_token
  5. Install the dependencies:
    npm install
  6. Run the development server:
    npm run dev
  7. Open http://localhost:3000 in your browser to view the project.

📜 License

This project is open-source and available under the MIT License.