update setup

This commit is contained in:
philc 2023-02-10 11:48:45 +01:00
parent e5c48d61fe
commit 264c706b54
11 changed files with 15 additions and 17 deletions

View File

@ -1,6 +1,6 @@
# apXtrib a Decentralized Autonomous Organisation (DAO)
You are here on the tech side, to understand under the wood how it's work and how you can contribute to this tech journey.
You are here on the tech side, to understand under the wood how it works and how you can contribute to this tech journey.
See [apXtrib web site](https://apxtrib.crabdance.com) how to create a new social world with apXtrib.
## apXtrib Architecture a quick view & keywords definition
@ -13,13 +13,13 @@ See [apXtrib web site](https://apxtrib.crabdance.com) how to create a new social
- **a mayor** is a owner of a physical machine, he is in charge to make a town node working (IP availibily) and accept to be part of a nation (rules of the blockchain nation).
- **a contract** is an algorythme that is written into the blockchain and will be run if an action trig. Immutable contract are the one link to the blockchain. Any pagan/druid/major can defined a contract that apply to other pagans.
- **the XTRIB coin** is the token that drive the blockchain, it materialises an exchange value and is a conterpoint
- **a git apxtrib** is a package ready to install a town by a mayor that will be able to join a nation (then it accepts nation rules). You can also create a nation and stay alone or not. Then mayor will be able to receive druid request to create a tribe. Then druid will invite pagan to join a tribe...
- **a git apxtrib** is a package ready to install a town by a mayor into a physical server that will be able to join a nation (mean accept thoses nation rules). You can also create a nation and stay alone or not. Then mayor will be able to host druid request to create tribe. Then druid will invite pagan to join his tribe...
All actors will have the same target to respect contracts and are free to leave or to stay into a nation, a town or a tribe. If a contract is not fair, then a nation, tribe, will not create value.
All actors will have the same target to respect contracts and are free to leave or to stay into a nation, a town or a tribe. If a contract is not fair, then a nation, tribe, will be empty mean not creating value mean die. Only fair rules will survive but any try will rewards actor with XTRIB coin.
## Network topology
As it is a decentralize organisation, a public address directory is replicated on each instance of a town into /nationchains .<br>
As it is decentralize organisation, a public address directory is replicated on each instance of a town into /nationchains .<br>
Each town (instance) is accessible with an anonymlous DNS https://apxtrib.crabdance.com where the IP adresse is update when elected town's IP to register a new block into the blockchain (each 10minutes).
```

View File

@ -3,7 +3,7 @@ const path = require( 'path' );
// Check if package is installed or not to pickup the right config file
//const src = ( __dirname.indexOf( '/node_modules/' ) > -1 ) ? '../../..' : '..';
//const config = require( path.normalize( `${__dirname}/${src}/config.js` ) );
const config = require( '../config.js' );
const config = require( '../tribes/townconf.js' );
/*
Check que le header contient des éléments necessaire pour les
routes utilisant tribeid / language / token / uuid

View File

@ -2,7 +2,7 @@ const fs = require( 'fs-extra' );
const glob = require( 'glob' );
const path = require( 'path' );
const config = require( '../config.js' );
const config = require( '../tribes/townconf.js' );
const hasAccessrighton = ( object, action, ownby ) => {
/*

View File

@ -7,7 +7,7 @@ const glob = require( 'glob' );
// Check if package is installed or not to pickup the right config file
//const src = '..'; // ( __dirname.indexOf( '/node_modules/' ) > -1 ) ? '../../..' : '..';
//const config = require( path.normalize( `${__dirname}/${src}/config.js` ) );
const config = require( '../config.js' );
const config = require( '../tribes/townconf.js' );
const isAuthenticated = ( req, res, next ) => {
/*
check if authenticated with valid token

View File

@ -9,7 +9,7 @@ const { DateTime } = require( 'luxon' );
const UUID = require( 'uuid' );
const Outputs = require( '../models/Outputs.js' );
const config = require( '../tribes/townconf.js' );
const checkdata = require( `${config.tribes}/${config.mayorId}/www/cdn/public/js/checkdata` );
const checkdata = require( `../nationchains/socialworld/contracts/checkdata.js`);
/*
Message manager
* Manage apixtribe message at different level

View File

@ -9,7 +9,7 @@ const axios = require( 'axios' );
const UUID = require( 'uuid' );
const Outputs = require( './Outputs.js' );
const config = require( '../tribes/townconf.js' );
const checkdata = require( `${config.tribes}/${config.mayorId}/www/cdn/public/js/checkdata` );
const checkdata = require( `../nationchains/socialworld/contracts/checkdata.js`);
/*
Blockchain manager
* Manage network directory

View File

@ -11,7 +11,7 @@ const smtpTransport = require( 'nodemailer-smtp-transport' );
const axios = require( 'axios' );
const { GoogleSpreadsheet } = require( 'google-spreadsheet' );
const config = require( '../tribes/townconf.js' );
const checkdata = require( `${config.tribes}/${config.mayorId}/www/cdn/public/js/checkdata` );
const checkdata = require( `../nationchains/socialworld/contracts/checkdata.js` );
const Outputs = {};

View File

@ -7,7 +7,8 @@ const jwt = require( 'jwt-simple' );
const UUID = require( 'uuid' );
const Outputs = require( './Outputs.js' );
const config = require( '../tribes/townconf.js' );
const checkdata = require( `${config.tribes}/${config.mayorId}/www/cdn/public/js/checkdata` );
const checkdata = require( `../nationchains/socialworld/contracts/checkdata.js`);
/*
Gestion des utilisateurs connecte

View File

@ -13,8 +13,7 @@ const Outputs = require( './Outputs.js' );
const Pagans = require( './Pagans.js' );
const config = require( '../tribes/townconf.js' );
const checkdata = require( `${config.tribes}/${config.mayorId}/www/cdn/public/js/checkdata` );
const checkdata = require( `../nationchains/socialworld/contracts/checkdata.js`);
/*
tribeid manager

View File

@ -86,7 +86,6 @@
"glob": "^7.1.2",
"google-spreadsheet": "^3.1.15",
"html-to-text": "^5.1.1",
"iconv": "^3.0.1",
"jquery": "^3.6.0",
"js-beautify": "^1.14.0",
"jsdom": "^11.11.0",
@ -124,7 +123,6 @@
"uuid": "^3.2.1"
},
"devDependencies": {
"nodemon": "^1.17.3",
"request": "^2.85.0"
"nodemon": "^1.17.3"
}
}

View File

@ -1,5 +1,5 @@
const express = require( 'express' );
const config = require( '../config.js' );
const config = require( '../tribes/townconf.js' );
// Classes
const Nationchains = require( '../models/Nationchains.js' );