Giter Club home page Giter Club logo

kwickwockwac's Introduction

KwicKwocKwac

Web application for labeling documents generating RDFa and TEI output, developed for the digital edition of Aldo Moro opera omnia.

Set up MongoDB

The project is build on the database management system Mongo.

First you need to create a Mongo collection where there has to be at least two tables: one named users for saving users, and another named metadata for stored the metadata information of every marked up document.

To set up MongoDB inside the project you need to create a .env file in order to store the connection information.

Inside the file you need to declare a DB_CONNECT variable assigning the url for your Mongo collection.

DB_CONNECT = mongodb+srv://"username":"password"@"clustername"-rwpos.mongodb.net/"collection"?retryWrites=true&w=majority

Set up JWT

For the authentication management we use the JSON Web Token standard.

The encryption is based upon three parts:

  • Header
  • Payload
  • Signature

The header typically consists of two parts: the type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA.

The second part of the token is the payload, which contains the claims. Claims are statements about an entity (typically, the user) and additional data. We store here the information about the username.

To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.

The secret object will be store inside the .env file in the variable TOKEN_SECRET.

TOKEN_SECRET = tH1s_1s_An_eXAmpl3_0F_SEcreT_String

How to run

First you need to install Node.js in your computer following the how to install guide from the official web site (https://nodejs.org/en/download/package-manager/ "Node.js").

From the terminal install all dependencies inside package.json using the node packet manager called npm.

npm install

Start the server on localhost:3000

npm start

It will execute node index.js to start the server.

To execute it on developer mode, run the following command

npm run dev

This time is going to run nodemon a tool that will restart automatically the server when an edited file is saved.

KwicKwocKwac will run on localhost:3000

How to use it

Inside the doc folder there is a complete documentation of the application accessible also from the documentation button in the app menu.

kwickwockwac's People

Contributors

sanofrank avatar holyyeti avatar bearbit avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.