forum-logic/README.md

84 lines
2.3 KiB
Markdown
Raw Normal View History

2023-07-10 12:40:52 -05:00
# Forum Logic
2023-06-22 15:36:36 -05:00
2023-07-11 16:04:54 -05:00
This project is a Javascript prototype for the DGF system.
2023-06-22 15:36:36 -05:00
2023-07-10 12:40:52 -05:00
It implements the core algorithm described in [Craig Calcaterra (May 24, 2018) On-Chain Governance of Decentralized Autonomous Organizations](http://dx.doi.org/10.2139/ssrn.3188374).
2023-06-22 15:36:36 -05:00
2023-07-11 16:04:54 -05:00
This project is implemented as a static site, and so may be downloaded and browsed offline, or served via HTTP.
The `main` branch is [served](https://dao-governance-framework.gitlab.io/forum-logic) via GitLab Pages.
# Development
For a more convenient local URL,
2023-07-11 21:13:39 -05:00
Add `forum.dev` as an alias for `127.0.0.1` in your `/etc/hosts` file
Install [mkcert](https://github.com/FiloSottile/mkcert/#installation)
Install [nginx](https://nginx.org/en/docs/install.html)
Add the root CA for self-signed certificates
2023-07-11 21:13:39 -05:00
```bash
mkcert -install
```
Generate a certificate for `forum.dev`
2023-07-11 21:13:39 -05:00
```bash
mkcert forum.dev
```
Move the certificate to nginx config directory
2023-07-11 21:13:39 -05:00
```bash
sudo mkdir -p /etc/nginx/certs
sudo cp forum.dev{,-key}.pem /etc/nginx/certs/
```
2023-07-11 21:13:39 -05:00
Make your home directory readable to the webserver. One way to do this is to add the webserver daemon's user to your user group. The following command would work if your user's group has the same name as your user, and the webserver user is `www-data`:
2023-07-11 21:13:39 -05:00
```bash
sudo groupmems --group $USER --add www-data
```
Configure `nginx` by adding a file `/etc/nginx/sites-available/forum_dev`, with content similar to the following:
```nginx
server {
listen 443 ssl;
server_name forum.dev;
ssl_certificate /etc/nginx/certs/forum.dev.pem;
ssl_certificate_key /etc/nginx/certs/forum.dev-key.pem;
root /home/ladd/dgf/forum-logic/src/;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
```
2023-07-11 21:13:39 -05:00
Replace `/home/ladd/dgf/forum-logic` with the path to this repository on your filesystem
Enable the site
2023-07-11 21:13:39 -05:00
```bash
sudo ln -s /etc/nginx/sites-available/forum_dev /etc/nginx/sites-enabled/
```
Now restart `nginx` and the site should be available at https://forum.dev.
2023-07-11 21:13:39 -05:00
```bash
sudo systemctl restart nginx
```
Note that browsers may cache assets, so after modifying source code, you may need to refresh your browser while holding `Shift` to bypass the browser cache.
2023-07-11 16:04:54 -05:00
2023-07-11 15:04:33 -05:00
# TODO
- Move `actor.js` and `action.js` out of `display/`. To `supporting`?