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

https://github.com/hafiz-shamnad/tics

Tronics is a minimal version control system built in C, inspired by Git, designed to track changes in code, IoT device data, and CAD files. It supports basic version control features like staging, committing, branching, and file history tracking using a custom .tronics directory.
https://github.com/hafiz-shamnad/tics

cad code iot

Last synced: 4 months ago
JSON representation

Tronics is a minimal version control system built in C, inspired by Git, designed to track changes in code, IoT device data, and CAD files. It supports basic version control features like staging, committing, branching, and file history tracking using a custom .tronics directory.

Awesome Lists containing this project

README

          

# TICS ๐Ÿš€

Welcome to **TICS** ๐ŸŽ‰ โ€” a Git-inspired version control system designed to **Track**, **Integrate**, **Control**, and **Synchronize** code, IoT device data, and CAD designs in a seamless workflow. ๐ŸŒ

---

## ๐Ÿ”ข TICS Explained

| **Letter** | **Meaning** |
| ---------- | ------------------------------------------------------------- |
| **T** | Track: Monitors changes and progress in your projects. |
| **I** | Integrate: Combines different code versions or data smoothly. |
| **C** | Control: Manages versions, branches, and updates efficiently. |
| **S** | Synchronize: Aligns your work across devices or teams. |

---

## โœจ Features

### Version Control ๐Ÿ“š

* **Git-like Functionality**: Commit, branch, merge, diff, log, stash, tag, and history tracking.
* **Diffing**: Compare text files and staged changes across commits.
* **Status Checking**: View staged/committed files and current branch details.
* **File Restoration**: Revert files to previous commit states.

### IoT Integration ๐Ÿ›

* **Device Simulation**: Tracks simulated IoT device states.
* **Event Logging**: Appends IoT data to versioned files.
* **Device Management**: Stores sensor data in the repository (MQTT support coming soon).

### CAD Handling ๐ŸŽจ

* **File Support**: Versions CAD logs (e.g., draw\_line events).
* **Event Logging**: Records CAD operations.
* **Metadata Tracking**: Captures CAD metadata (STL/STEP support planned).

### CLI Interface ๐Ÿ–ฑ๏ธ

**Available commands:**

```
tics init tics add tics commit tics log
tics status tics diff tics restore tics branch
tics checkout tics merge tics history tics stash
tics pop tics list-stash tics tag tics list-tags
tics iot tics cad
```

---

## ๐Ÿ› ๏ธ Installation

### Prerequisites

* GCC or any C compiler
* Standard C libraries: `stdio.h`, `stdlib.h`, etc.
* POSIX system (Linux/macOS)
* `make` utility

### Setup

```bash
git clone https://github.com/your-username/tics.git
cd tics
make
sudo mv tics /usr/local/bin/ # Optional
./tics init myrepo
```

---

## ๐Ÿš€ Usage

### Initialize a Repository

```bash
./tics init myrepo
```

### Add Files

```bash
./tics add sensor_data.txt
```

### Commit Changes

```bash
./tics commit -m "Initial commit with sensor data"
```

### Simulate IoT and CAD

```bash
./tics iot
./tics cad
```

### Manage Branches

```bash
./tics branch dev
./tics checkout dev
```

### Stash and Pop

```bash
echo "sensor: updated" >> sensor_data.txt
./tics add sensor_data.txt
./tics stash
./tics pop
```

### History and Tags

```bash
./tics commit -m "Updated sensor data"
./tics history sensor_data.txt
./tics checkout main
./tics merge dev
./tics tag v1.0
```

---

## ๐Ÿ“‚ Project Structure

```
tics/
โ”œโ”€โ”€ include/ # Header files
โ”‚ โ”œโ”€โ”€ branch_ops.h
โ”‚ โ”œโ”€โ”€ cad_ops.h
โ”‚ โ”œโ”€โ”€ commit_ops.h
โ”‚ โ”œโ”€โ”€ file_ops.h
โ”‚ โ”œโ”€โ”€ repo_ops.h
โ”‚ โ”œโ”€โ”€ stash_ops.h
โ”‚ โ”œโ”€โ”€ tag_ops.h
โ”‚ โ””โ”€โ”€ tics.h
โ”œโ”€โ”€ src/ # C source files
โ”‚ โ”œโ”€โ”€ branch_ops.c
โ”‚ โ”œโ”€โ”€ cad_ops.c
โ”‚ โ”œโ”€โ”€ commit_ops.c
โ”‚ โ”œโ”€โ”€ file_ops.c
โ”‚ โ”œโ”€โ”€ main.c
โ”‚ โ”œโ”€โ”€ repo_ops.c
โ”‚ โ”œโ”€โ”€ stash_ops.c
โ”‚ โ”œโ”€โ”€ tag_ops.c
โ”œโ”€โ”€ Makefile # Build script
โ”œโ”€โ”€ README.md # This file
โ”œโ”€โ”€ LICENSE # Apache 2.0
โ”œโ”€โ”€ test-tics.sh # Test script
โ”œโ”€โ”€ test.txt # Sample file
```

---

## ๐ŸŒ Roadmap

### Q3 2025

* โœ… Automated merge conflict resolution
* โœ… STL/STEP file versioning
* โœ… MQTT integration for IoT

### Q4 2025

* โœ… **TICSHub**: remote hosting, web interface, pull requests

### Q1 2026

* โœ… Real-time IoT dashboard
* โœ… CAD file diffing & previews
* โœ… Integration with IoT/CAD tools

---

## ๐Ÿงช Testing

```bash
chmod +x test-tics.sh
./test-tics.sh
```

*Ensure the executable is named `tics`. Rename the test file if needed.*

---

## โš ๏ธ Troubleshooting

* **Command Not Found**: Use `./tics` or add to PATH.
* **Build Issues**: Run `make clean && make`.
* **Crashes**: Use `gdb ./tics` to debug.
* **Merge Conflicts**: Reset file metadata and retry.

---

## ๐Ÿค Contributing

1. Fork the repo
2. Create a branch: `git checkout -b feature`
3. Commit: `git commit -m "Add feature"`
4. Push: `git push origin feature`
5. Open a Pull Request

---

## ๐Ÿ“ง Contact

Email: **[haafizshamnad@gmail.com](mailto:haafizshamnad@gmail.com)**

> **TICS** is the foundation for **TICSLab**, a future-ready platform for collaborative IoT & CAD innovation. Join us in building the future of engineering! ๐Ÿš€