Skip to content

marcuwynu23/gitshelf

Repository files navigation

GitShelf

Stars Badge Forks Badge Issues Badge License Badge

GitShelf is a lightweight Git repository manager that allows you to:

  • Create and manage Git repositories locally.
  • Browse repository files in a tree view.
  • View recent commits for each repository.
  • Manage repositories without external Git hosting services.

Features

  • Repository Management: Create, list, and view repositories.
  • File Explorer: Browse repository contents with a folder/file tree view.
  • Commits Viewer: See the latest commits of a repository.
  • Lightweight & Local: Runs entirely on your local machine or server.

Getting Started

Prerequisites

  • Node.js v20+
  • Git installed on your machine

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/repohub.git
cd repohub
  1. Install dependencies:
pnpm install
  1. Create a .env file in the backend (apps/backend) with the following:
ROOT_DIR=./data
  1. Start the backend server:
cd apps/backend
pnpm dev
  1. Start the frontend:
cd apps/frontend
pnpm dev
  1. Open your browser at http://localhost:5173

API Endpoints

Repositories

  • GET /api/repos - List all repositories.

  • POST /api/repos - Create a new repository.

    { "name": "repo-name" }
  • GET /api/repos/:name - Get file tree of a repository.

  • GET /api/repos/:name/commits - Get recent commits (returns empty array if no commits).

Example Response: Commits

[
  {
    "hash": "abcd123",
    "message": "Initial commit",
    "author": "John Doe",
    "date": "2025-11-21T05:00:00Z"
  }
]

Frontend Structure

  • Repo List: Left sidebar
  • File Tree: Center
  • Commits: Right sidebar

Future Improvements

  • Support multiple branches.
  • Add commit creation directly from the UI.
  • Push/pull from remote repositories.
  • User authentication.

License

This project is source-available and free for personal, educational, and non-commercial use only.

Commercial use — including use by companies, organizations, startups, SaaS offerings, or revenue-generating services — is not permitted without prior written permission.

About

GitShelf is a lightweight, self-hosted source code management system for creating, browsing, and managing local repositories.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages