An open API service indexing awesome lists of open source software.

https://github.com/marcuwynu23/gitshelf

GitShelf is a lightweight, self-hosted source code management system for creating, browsing, and managing local repositories
https://github.com/marcuwynu23/gitshelf

bitbucket codecommit forgejo git git-repo git-repository gitea github gitlab gogs project repository self-hosted

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

          


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:

```bash
git clone https://github.com/yourusername/repohub.git
cd repohub
```

2. Install dependencies:

```bash
pnpm install
```

3. Create a `.env` file in the backend (`apps/backend`) with the following:

```env
ROOT_DIR=./data
```

4. Start the backend server:

```bash
cd apps/backend
pnpm dev
```

5. Start the frontend:

```bash
cd apps/frontend
pnpm dev
```

6. Open your browser at [http://localhost:5173](http://localhost:5173)

---

## API Endpoints

### Repositories

* **GET** `/api/repos` - List all repositories.

* **POST** `/api/repos` - Create a new repository.

```json
{ "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

```json
[
{
"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.