Skip to content

Tejkaur04/Mini-Version-Control-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Mini VCS

A Git-inspired Version Control System built from scratch using Java, Spring Boot, React, and custom data structures.

Mini VCS allows users to track files, create commits, manage branches, visualize repository history, and monitor repository status through an interactive web dashboard.


๐Ÿ“ธ Screenshots

Image Image Image Image Image

โœจ Features

Repository Management

  • Initialize repositories
  • Track files and versions
  • Monitor repository status
  • Browse tracked files

Commit Management

  • Create commits with messages
  • Maintain commit history
  • Track parent-child relationships
  • View commit metadata

Branch Management

  • Create branches
  • Switch between branches
  • Track branch heads
  • Merge branch histories

Interactive Dashboard

  • Live repository statistics
  • Dynamic commit graph
  • Repository status monitoring
  • Recent activity feed

File Versioning

  • SHA-1 based file tracking
  • Version history management
  • File metadata visualization

๐Ÿงฉ Custom Data Structures

To better understand the internals of version control systems, several data structures were implemented from scratch and integrated into the project:

  • Linked List
  • Stack
  • Queue
  • Hash Table
  • Binary Search Tree

These structures are used throughout the repository, commit, and version management modules.


๐Ÿ”— Full Stack Integration

The Version Control System was originally implemented as a Java application.

To make it interactive and easier to visualize, a Spring Boot API layer was built on top of the core VCS engine. The React frontend communicates with these APIs to display repository data in real time.

React Frontend
       โ”‚
       โ–ผ
Spring Boot REST API
       โ”‚
       โ–ผ
Mini VCS Engine
       โ”‚
       โ–ผ
Custom Data Structures

๐Ÿ“Š Commit Graph Visualization

One of the core features of Mini VCS is the dynamic commit graph.

The graph is generated directly from repository commit history and visualized using React Flow.

Features include:

  • Dynamic node generation
  • Parent-child commit relationships
  • HEAD commit highlighting
  • Real-time updates from backend APIs
  • Interactive repository history visualization

Example:

debug
  โ”‚
  โ–ผ
next
  โ”‚
  โ–ผ
hello (HEAD)

Unlike static diagrams, the graph is generated entirely from actual commit data.


๐Ÿ“ˆ Dashboard Features

The dashboard provides a real-time overview of repository activity.

Repository Insights

  • Total commits
  • Active branches
  • Tracked files
  • Current HEAD commit

Repository Status

  • Modified files
  • Deleted files
  • Untracked files
  • Working tree health

Recent Activity

  • Latest commits
  • Commit timestamps
  • Repository updates

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React.js
  • Tailwind CSS
  • React Flow
  • Axios
  • Lucide React

Backend

  • Java
  • Spring Boot
  • REST APIs

Core VCS Engine

  • Repository Management
  • Commit Tracking
  • Branch Management
  • File Versioning

๐Ÿ“‚ Project Structure

Mini-VCS
โ”‚
โ”œโ”€โ”€ mini-vcs-ui
โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”œโ”€โ”€ services
โ”‚   โ””โ”€โ”€ layout
โ”‚
โ”œโ”€โ”€ mini-vcs-api
โ”‚   โ”œโ”€โ”€ controller
โ”‚   โ”œโ”€โ”€ service
โ”‚   โ”œโ”€โ”€ dto
โ”‚   โ””โ”€โ”€ vcs
โ”‚
โ””โ”€โ”€ core-engine
    โ”œโ”€โ”€ Repository
    โ”œโ”€โ”€ Commit
    โ”œโ”€โ”€ CommitHistory
    โ”œโ”€โ”€ File
    โ””โ”€โ”€ FileVersion

๐Ÿ“ก REST API Endpoints

Dashboard

GET /api/dashboard

Returns repository statistics including commit count, branch count, tracked files, and current HEAD.

Commits

GET /api/commits

Returns commit history and metadata.

Branches

GET /api/branches

Returns branch information and current branch details.

Repository Files

GET /api/files

Returns tracked files and metadata.

Repository Status

GET /api/status

Returns modified, deleted, and untracked files.


๐Ÿ’ก Challenges Solved

During development, several interesting problems were addressed:

  • Designing commit-parent relationships
  • Implementing branch tracking and checkout functionality
  • Building file version management using SHA-1 hashes
  • Exposing a Java-based VCS through REST APIs
  • Synchronizing frontend visualizations with backend repository data
  • Generating dynamic commit graphs from repository history
  • Integrating custom data structures into a real-world application

๐Ÿš€ Running the Project

Backend

cd mini-vcs-api
./mvnw spring-boot:run

Runs on:

http://localhost:8080

Frontend

cd mini-vcs-ui
npm install
npm run dev

Runs on:

http://localhost:5173

๐Ÿ”ฎ Future Improvements

  • Branch checkout from UI
  • Branch creation and deletion
  • Merge conflict visualization
  • Commit search and filtering
  • File diff viewer
  • Multi-repository support
  • Authentication and user profiles
  • Dark mode
  • GitHub integration

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Tejinder Kaur Passionate about Software Engineering, Backend Development, Open Source, and Building Systems from Scratch.

About

A simplified version control system built in Java to mimic the core functionalities of Git.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors