alexnathanson / solar-protocol

A repository in development for a solar powered network of servers that host a distributed web platform. Project by Tega Brain, Alex Nathanson and Benedetta Piantella. Supported by Eyebeam, Mozilla, and CS&S
http://solarprotocol.net
231 stars 19 forks source link

Migrate from php to python + javascript #32

Closed jedahan closed 1 year ago

jedahan commented 1 year ago

This pull request makes some major changes to installation, development, and deployment of solar protocol

Fixes

Todo

Enhancements

Migration Plan

This migration is really cool because as nodes cannot respond to old api, the network is self-healing. Nodes that can only talk 'old protocol' will just show rings for old protocol, new nodes new protocol. The network state may be in a state of flux, but the site will go somewhere working

Major changes

New solar-protocol cli command created to manage everything.

Installation script solar-protocol install for development and on raspberry pi.

Migration into three services - api, datalogger, protocol. These are run in containers to make it easier to work with on different systems.

Migration from php to python + javascript. May migrate all javascript to python templating in the future.

Removal of lots of dependencies and code (around 1/3 the size).

Migration to latest stable python and dependencies.

Improved windows support.

Ability to run multiple instances locally for testing.

Migration to new api v3 based on FastAPI with nice developer docs on /api/docs.

Merging of gateway api into regular api - this means we do not need to rely on server.solarprotocol.net for some things (like getting a nodes ip address), and can be even more distributed.

Migration from custom shell environment setting to secrets.json storage.

Migration from apache to nginx.

Migration to editable allowlist/blocklist instead of hardcoding hashes.

Missing features

Removal of website file management in /admin/settings. We are investigating using SyncThing or Samba or FTP.

jedahan commented 1 year ago

renamed the branch beta, closing this PR