Skip to content

sitMCella/doc-versions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Versions

Document

Table of contents

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 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)

cd ./backend
cargo test  -- --nocapture

Rust Code Coverage

cd ./backend
cargo tarpaulin --ignore-tests

Rust Linter

cd ./backend
cargo clippy -- -D warnings

Format Code (Backend)

cd ./backend
cargo fmt

Build (Backend)

cd ./backend
cargo build

Build (Frontend)

cd ./frontend
npm run build

Format Code (Frontend)

cd ./frontend
npm run lint

Eslint Check:

cd ./frontend
eslint --ext .jsx,.js src/

Eslint Format:

cd ./frontend
eslint --fix --ext .jsx,.js src/

Run application

Run Application Backend

cd ./backend
cargo run

Run Application Frontend

cd ./frontend
npm run start

Run Application Frontend (Electron)

cd ./frontend
npm run dev

Access the application

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:

application_port: 8000
workspaces_path: "/app/git-workspace"

Build Project Production

Build (Backend)

cd ./backend
cargo build --release

Build (Frontend)

cd ./frontend
npm run build

Build Docker Images

docker-compose build

Run application

docker-compose up

Access the application

http://localhost:80

About

Document Versions is a web application that manages the versions of text documents via Git

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages