Giter Club home page Giter Club logo

kp's Introduction


About

Version 2.0 of our glorious project! The hype is real! Such w0w, such 4m4z1ng ... such 1337! Much c00l!

"Waren Sie in einem großen Gebäude schon einmal komplett lost - hatten Sie gar keinen Plan? Dann brauchen Sie KainPlan!" - with this legendary slogan we kick-started this amazing project back in 2020 - look how far we've already gotten!

Table of Contents

Setup

In case you want to clone this repository and get KainPlan up and running on your machine, all you should have to do is follow these instructions:

Prerequisites

The current requirements are ...

  • Node >= v12.18.3
  • NPM >= 6.14.6

... do also note, however, that the versions mentioned are simply the ones used on the original system and everything might just work fine with newer/older versions.

Installation

Node

Firstly, clone this repository to your local machine ...

$ git clone https://github.com/KainPlan/kp

... afterwards, change into the directory that has just been created and use npm to install all dependencies ...

$ cd kp
$ npm i

... and you should be grand! (If you're not, feel free to ask for support ^^).

Postgres

Since the user authentication update, the node server will now also be looking to connect to the local Postgres server - you need to install / set it up.

First of all, if you don't have Postgres installed, install it and any interface/manager you like (pgadmin, pgcli, ...).

Then, simply run the following SQL script to set up the database, user and tables (of course you need to replace [PWD] with the proper password):

-- Create & use the database ...
CREATE DATABASE kainplan;
USE kainplan;
-- Create user & grant privileges ...
CREATE USER kainplan WITH PASSWORD '[PWD]';
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO kainplan;
GRANT SELECT, UPDATE, USAGE ON ALL SEQUENCES IN SCHEMA public TO kainplan;
-- Create tables ...
CREATE TABLE users (
    id          BIGSERIAL PRIMARY KEY,
    email       VARCHAR(40) UNIQUE NOT NULL,
    username    VARCHAR(32) UNIQUE NOT NULL,
    password    VARCHAR(60),
    googleId    VARCHAR(22)
);
CREATE TABLE maps (
    id          BIGSERIAL PRIMARY KEY,
    "user"      BIGINT NOT NULL,
    map         VARCHAR(24) NOT NULL,
    CONSTRAINT fk_user
        FOREIGN KEY("user")
            REFERENCES users(id)
);

MongoDB

Ever since adding maps to KainPlan, you'll also be required to have a MongoDB server up and running on your local machine.

First of all, if you don't have the MongoDB Community Server installed, install it and any interfaces/db managers you require (mongosh, compass, ...).

Then simply open your command line interface and execute the following commands, or do it manually in your GUI:

// Create & use the databse ...
use kainplan;
// Create collections ...
db.createCollection('maps');
db.maps.createIndex({ name: "text", desc: "text" });
// Create user & grant privileges ...
db.createRole({
    role: "kainplan",
    privileges: [
        { resource: { db: "kainplan", collection: "" }, actions: [ "find", "insert", "update", "remove" ] }
    ],
    roles: []
});
db.createUser({
    user: "kainplan",
    pwd: "[PWD]",
    roles: [ "kainplan" ],
    authenticationRestrictions: [ { clientSource: [ "127.0.0.1" ], serverAddress: [ "127.0.0.1" ] } ]
});

... obviously you'll have to replace [PWD] with the real password.

Documentation

@everyone who's looking for some docs, but especially @frontend-devs, you can find the full documentation here. Here you should find everything - from an extensive documentation of the backend and the models it uses, all API endpoints, ...

Tbh, it might not be completely complete... but the most important things for you (like API endpoints, etc.) will be there ... ^^


... The KainPlan Team, June 2021

kp's People

Contributors

8twinni8 avatar huberfranzat avatar mattmoony avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.