- Description
- Objective
- Features
- How to Use
- Project Structure
- Technologies Used
- Contributors
- Future Enhancements
Ctrl + Z is a custom version control system developed as a final project for the Operating Systems course. It allows users to manage repositories, track versions, collaborate with others, and securely store code with encryption. The system is implemented in C and provides a command-line interface for all operations.
The main objectives of this project are:
- To provide basic version control functionalities (push, pull, versioning, etc.).
- To enable collaboration among multiple users with configurable access control.
- To offer a simple, educational alternative to mainstream VCS tools like Git.
- To demonstrate OS-level concepts such as file management, threading, and synchronization.
- User Authentication: Register, login, and logout with secure credential management.
- Repository Management: Create, browse, and publish repositories.
- Versioning: Push new versions, pull any previous version, and revert to older versions.
- Collaboration: Add or remove collaborators with fine-grained access control.
- Stats & Diff: Compare two versions of a repository and view detailed file differences.
- Encryption: Secure files using an encryption/decryption algorithm.
- Threaded Operations: Uses multithreading for efficient repository browsing and file comparison.
- Configurable Access: Public/private repositories and collaborator management via config files.
- Command-Line Interface: Interactive menu-driven CLI for all operations.
-
Build the Project
gcc -o main main.c -lpthread
-
Run the Program
./main
-
Main Menu Options
- Browse public repositories
- Register as a new user
- Login/Logout
- Publish your own repository
- Push/pull files (with versioning)
- Add/remove collaborators
-
Versioning
- Each push creates a new
Version_N
folder in the repository. - Commit messages and history are tracked in
History.txt
. - Pull any version to any folder, or revert to a previous state.
- Each push creates a new
-
Collaboration
- Only authors and collaborators (as listed in
Config.txt
) can push/pull private repositories. - Public repositories can be browsed and pulled by anyone.
- Only authors and collaborators (as listed in
-
Encryption
- Use the encryption algorithm to encrypt/decrypt files as needed.
ctrl-z/
│
├── main.c # Main CLI and logic
├── auth.c # User authentication and registration
├── stats.c # Version comparison and diff stats
├── utils.c # Utility functions (file copy with encryption/decryption, etc.)
├── version.c # Versioning logic (push, pull, revert)
│
├── Ascii.txt # ASCII art for UI
├── README.md # Project documentation
├── .gitignore # Ignore compiled binaries
└── .vscode/ # VSCode settings
- Language: C (C17 standard)
- Libraries: POSIX (pthread, dirent, stdio, stdlib, string, sys/stat, unistd)
- Build Tool: GCC
- Editor: Visual Studio Code
- Add a graphical user interface (GUI).
- Implement more advanced difference and merge tools.
- Add support for remote repositories and networking.
- Improve encryption options and security.
- Add automated tests and CI/CD integration.
PS: This project is for educational purposes and demonstrates core OS and version control concepts in C.