apxtri | ||
objects | ||
schema | ||
template | ||
.gitignore | ||
backup.sh | ||
LICENSE | ||
package.json | ||
README.md |
apXtri
Context
A community of SAAS Hosters (Software As A Service), a full solution to create a decentralized economy for Sys Admin, web dev (back/front/fullstack), entrepreneur, producer, consummer.
apXtri a DAO (Decentralize Autonomous Organization), synchronize many nodes (server) called "town" that respects set of rules (called "nation"). A user called a "pagan" has a unique alias anonymous (or not) identity link to a PGP key pair (public/private) that allow him to sign any action to proof the ownership of an alias.
A node (town) can host group of people called a tribe. Each tribe has a web space (public or private) to host web app or page as well as api endpoint. Any user (Pagan) can join a tribe and becoming a person into a tribe define by the tribe owner.
Rules management works like russian dolls, a tribe define its onw rules that respect by design the towns rules, that respect the nation rules. Any user actions under rules are store into a blockchain. The blockchain is manage by each town owner.
Tech in actions
apXtri, use open source tools to be easily auditable and respect the RESTFull api concept.
- ubuntu LTS (desktop https://ubuntu.com/desktop for dev, server https://ubuntu.com/server for production)
- nginx to serve https web page and proxy serve api services https://nginx.org/
- node.js / express.js to provide endpoint in a routes/models https://expressjs.com/
- JSON schema https://json-schema.org/specification to define some item collection
Get support
The adminapi endpoint doc are documented here https://antsnation.mooo.com/apidoc/index.html
Training is under working, for entrepreneur that have ingenior skills but not IT skills, to help to become atonomous in managing an apXtri node as well to dev some web interface and endpoint to dev a full SAAS.
Contact support@need-data.com for any help.
Installation
adminapi is a special tribe that rules all tribes to provide a SAAS solution easy to customize as a node.js dev.
Tech pre-request
CReate your town for dev or for prod
Install an ubuntu desktop machine https://ubuntu.com/desktop
$ sudo apt update && sudo apt upgrade
$ sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl gnupg nginx
$ sudo snap install --classic certbot
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update && sudo apt install yarn
# check version
$ yarn --version
In the next step replace {apxuser} by the login user you used to install ubuntu
Only if you want to create a specific user in your desktop :
$ sudo useradd -s /bin/bash -m -d /home/{apxuser} -c "{apxuser}" {apxuser}
$ sudo passwd {apxuser}
$ sudo usermod -aG sudo {apxuser}
# Switch to the new user:
$ su {apxuser}
With a sudo user:
$ sudo visudo
# Add the following line to the file:
$ {apxuser} ALL=(ALL) NOPASSWD: ALL
$ mkdir ~apxtowns/dev-ants
# Install the latest version of nvm (check the website for the latest version: https://github.com/nvm-sh/nvm)
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# Close and re-open the terminal under the apxuser
$ nvm --version
# Then recheck the nvm version
$ nvm --version
$ mkdir ~/apxtowns # if it does not exist
# Create a town name that does not exist for a nation and create folder {tonwname}-{nation}
# Following example dev is a town and ants is a nation (you can create an existing town localy but you won't be able to join the ants network if this towns already exist)
$ mkdir ~/apxtowns/dev-ants
$ cd ~/apxtowns/dev-ants
$ wget https://testwall-ants.ndda.fr/setup.sh
$ chmod +x setup.sh
$ . setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi
Open http://admin.adminapi.dev.ants/index_en.html (notice the dot instead of - ) in your browser after installation. you are ready to dev in adminapi
Then you can conf your town from the web interface.
NB: if the machine is a production (not located in your localhost) don't forget to add in your /etc/hosts
"public IP adresse" admin.adminapi.dev.ants
Until the web interface allow it here are usefull process to:
- create an empty tribe call tribename
cd .. && . setup.sh tribename newtribe
This will create a new tribe that you can manage in http://admin.tribename.dev.ants (a standard .giitignore is generate ready if you want to version your code in apxtri)
- To add a new tribe from an existing tribe host in testwall-ants.ndda.fr, we want set a dev env from git repo named smatchit with data that come from testwall-ants.ndda.fr the last night. To get data you must have the password to access backup.
cd .. && . setup.sh smatchit https://testwall-ants.ndda.fr https://gitea.ndda.fr/smatchit/smatchit
To conf a new website
- Update in adminapi/objects/tribes/itm/tribename.json add domaine name in dns
- Create a folder in tribename/objects/wwws/itm/webname/src and /dist
- from adminapi/apxtri/setup/nginx.wwwscf create file tribename/nginx/website.tribename.townname.nation.name.conf
- add in tribename/objects/wwws/itm/websitename.json the localdb to send to front
- Then conf website test domain and use sudo certbot --nginx -d domainename to get ssl and access in https
If you want to contribute fixing bug, add new features in adminapi please push in your branch and send an email to support@need-data.com.