Skip to content

Mapping-Frontend to find and add sustainable Organisations (Initiatives, Companies) and Events on Kartevonmorgen.org / MapofTomorrow.org

License

Notifications You must be signed in to change notification settings

kartevonmorgen/kartevonmorgen.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karte von morgen (Map of Tomorrow)

kartevonmorgen_v1

Mapping for Good

von morgen supports kindness, sustainability and joint action. Everything that brings a little happiness to our world. We believe that living in a de‐stressed, environmental‐friendly and trust‐worthy society, is already in progress. We want to support people in finding ways to embrace those values.

The Map von morgen is a website and app, that allows users to share their favorite places in the world. Places that are forward‐thinking and inspiring. The goal is to collect projects, companies and events that make a world of tomorrow, already experienceable today.

Website: https://kartevonmorgen.org/

System-Architecture

This graph shows you, how the whole Map of tomorrow system interacts with each other karte von morgen architecture

Dependencies

Installing Dependencies

  1. node.js: please refer to nvm
  2. yarn: please refer to the installation guideline
  3. project:
    1. git clone https://github.com/kartevonmorgen/kartevonmorgen-v1
    2. cd kartevonmorgen-v1
    3. yarn install
  4. database:
    1. python3: please refer to the official website
    2. cd scripts/python
    3. python3 -m venv venv
    4. . ./venv/bin/activate
    5. pip3 install -r requirements.txt
    6. python3 tag-frequency-cron.py --dev --fetch-all-on-start --sync-once --log-level debug (development) or python3 tag-frequency-cron.py --fetch-all-on-start --interval-for-all-tags 300 --interval-for-least-used-tags 60 (production)
    7. full list of options are available on Wiki

Development

The general pattern is:

  • server.*.js files are responsible for building and running "Karte von Morgen"
  • .env loads for both the production mode and the development mode
  • .env.development loads on the development mode but not the build mode. Hence any variable from the environment needed for building MUST be placed in server.build.*.js and for running in the server.start.*.js
  • server.dev.js runs the project on local machine. it compiles pages on runtime and has more verbose error reporting but comes with a considerable speed. suitable for development but not user testing or production

Development Mode With Hot-Reload

yarn run dev

Development Mode With Optimized Bundles

yarn run build:dev
yarn run start:dev

Production Mode

yarn run build:production
yarn run start:production

Process Scalability

After building the project you can run it with pm2

pm2 start "yarn run start:production" --name kartevonmorgen

Environment Variables

  • NEXT_PUBLIC_BASICS_API: is the address of OpenfairDB
  • DB_NAME: is the name of the database as the dependency of "Karte von Morgen" front-end
  • NEXT_PUBLIC_SELF_API: is the address of the server which "Karte von Morgen" is hosted
  • HOSTNAME: is the hostname interface e.g localhost or 0.0.0.0
  • PORT: is the port to listen on

Test Platform

  • OS: Ubuntu 20.04.2 LTS
  • RAM: 2 GB
  • Storage: 20 GB NVMe
  • CPU: 1 core 2 GHz

Backend

KVM uses the OpenFairDB as its backend.