https://github.com/sitmcella/doc-versions
Document Versions is a web application that manages the versions of text documents via Git
https://github.com/sitmcella/doc-versions
documentation-tool draft-js git gitgraph graph javascript react-draft-wysiwyg reactjs rust
Last synced: 2 months ago
JSON representation
Document Versions is a web application that manages the versions of text documents via Git
- Host: GitHub
- URL: https://github.com/sitmcella/doc-versions
- Owner: sitMCella
- License: mit
- Created: 2023-04-08T11:04:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T18:15:54.000Z (about 2 years ago)
- Last Synced: 2025-01-23T23:32:03.301Z (4 months ago)
- Topics: documentation-tool, draft-js, git, gitgraph, graph, javascript, react-draft-wysiwyg, reactjs, rust
- Language: Rust
- Homepage:
- Size: 270 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Document Versions

## Table of contents
* [Introduction](#introduction)
* [Development](#development)
* [Setup Development](#setup-development)
* [Configuration Development](#configuration-development)
* [Build Project Development](#build-project-development)
* [Production](#production)
* [Setup Production](#setup-production)
* [Configuration Production](#configuration-production)
* [Build Project Production](#build-project-production)## Introduction
Document Versions is a web application that manages the versions of text documents via Git.
In the current version of the application, the files are stored in the local environment.Read the [documentation](https://github.com/sitMCella/doc-versions/wiki) in order to discover the features of Document Versions.
## Development
Document Versions is a web application built using the Rust language on the backend, and React JS framework on the frontend.
Document Versions stores and versions the files using a Git client via the libgit2 library for Rust.### Setup Development
Install Node.js. Recommended version >= 19.5.0
Install Rust and Cargo. Recommended version:
- Rustc and Cargo >= 1.63.0### Configuration Development
Configure the root directory for the workspaces in 'backend/configuration.yaml'.
Configure the root directory for the backed tests in 'backend/configuration_test.yaml'.
### Build Project Development
#### Run Unit and Integration Tests (Backend)
``` sh
cd ./backend
cargo test -- --nocapture
```#### Rust Code Coverage
```sh
cd ./backend
cargo tarpaulin --ignore-tests
```#### Rust Linter
```sh
cd ./backend
cargo clippy -- -D warnings
```#### Format Code (Backend)
```sh
cd ./backend
cargo fmt
```#### Build (Backend)
``` sh
cd ./backend
cargo build
```#### Build (Frontend)
``` sh
cd ./frontend
npm run build
```#### Format Code (Frontend)
```sh
cd ./frontend
npm run lint
```#### Eslint Check:
```sh
cd ./frontend
eslint --ext .jsx,.js src/
```#### Eslint Format:
```sh
cd ./frontend
eslint --fix --ext .jsx,.js src/
```#### Run application
#### Run Application Backend
``` sh
cd ./backend
cargo run
```#### Run Application Frontend
``` sh
cd ./frontend
npm run start
```#### Run Application Frontend (Electron)
``` sh
cd ./frontend
npm run dev
```#### Access the application
```sh
http://localhost:3000
```## Production
### Setup Production
Install Node.js. Recommended version >= 19.5.0
Install Docker and Docker Compose.
### Configuration Production
Configure the root directory for the workspaces in 'backend/configuration.yaml' with the following content:
``` yaml
application_port: 8000
workspaces_path: "/app/git-workspace"
```### Build Project Production
#### Build (Backend)
``` sh
cd ./backend
cargo build --release
```#### Build (Frontend)
``` sh
cd ./frontend
npm run build
```#### Build Docker Images
``` sh
docker-compose build
```#### Run application
```sh
docker-compose up
```#### Access the application
```sh
http://localhost:80
```