Skip to content

Latest commit

 

History

History
151 lines (129 loc) · 4.95 KB

README.md

File metadata and controls

151 lines (129 loc) · 4.95 KB
Handy

Handy

Let your notes become art ✨

GitHub package.json version (subfolder of monorepo) GitLab (self-managed) contributors Website handy-notes.ru

Handy is a website for creating notes. We have done everything to make your notes and our code look like a work of art.

Illustration

Features

JWT authentication 🔐

We are aware of how important the security of users' personal data is, so authentication in our application is based on JWT tokens. This approach is considered one of the safest ways to transmit information .

Markdown notes editor 📝

Markdown is a markup language for text documents. Today it is the most convenient language for text formatting, which is why we decided to use it for editing notes. Our editor supports:

  • Headings (up to 6 levels)
  • Text formatting (bold, italic)
  • Quotes
  • Lists (ordered and not)
  • Links

Synchronization (beta) 🔄

Since Handy was originally supposed to be a multiplatform application, we decided to implement support for syncing notes. To correctly combine the edited text with its old version, we used a simplified version of the Operational Transformation (OT) algorithm . Now users can edit notes simultaneously from two devices!

Technologies

Client Server Deploy

Getting started

Prerequisites

To run the project locally, it is recommended to install the following.

For client:

For server:

It is also necessary to install Docker Compose to simplify the process of building the application.

Installation

  1. Clone the repository
    git clone https://gitlab.com/zavod-team/handy.git
    
  2. Create a file .env in the root of the project (next to docker-compose.yml)
    LOGS_DIR=../logs
    BUILD_DIR=./server
    DB_DIR=../db
    LETSENCRYPT_DIR=../letsencrypt
    
    MYSQL_DATABASE=database
    MYSQL_USER=user
    MYSQL_PASSWORD=password
    MYSQL_ROOT_PASSWORD=root
    MYSQL_HOST=host
    MYSQL_PORT=port
    
  3. Change in docker-compose.yml the following sections
    backend:
     build: ./server
     restart: always
     env_file:
       - .env
     depends_on:
       - db
     ports:
       - 8080:8080
    
    frontend:
     build: ./client
     env_file:
       - .env
     volumes:
     - ${BUILD_DIR}:/server
    
  4. Optional. For a separate client launch install npm dependencies outside of Docker
    cd ./client
    npm install
    

Run

Fullstack (with Docker)

  1. Build client
    docker-compose build frondend
    docker-compose up frondend
    
  2. Build server
    docker-compose build backend
    
  3. Run it all together
    docker-compose up db backend
    

The Handy website should be available at localhost:8080.

It is important to up the client and server containers in this order, because the client leaves artifacts in the server resources folder, and the server image is already being built with them.

After each client rebuild, all commands must be executed.

Client

If necessary, the client can be run separately. There are two ways to do this.

  1. Build mode:
    npm run build
    
    As a result, a bundle will appear in the client/build folder.
  2. Development mode:
    npm run start
    
    The website will be available at localhost:4200.

Links

GitLab GitHab GitHab