@chromatic-systems/rho
v0.0.6
Published
peer-to-peer web dev
Downloads
14
Readme
Rho
Publish Computational Media to the Planet
A Peet-to-Peer Network for Geospatial Media
- Learn to write software in the context of a Geospatial Publishing System
- A school built on mesh networks
- End to End encrypted video and data
- Integrated Machine Learning and AI like code assist
- Move computation & data from the Cloud to Bookshelf
- Publish and distribute your work worldwide in seconds
- Team of alumni, mentors, and friends
- Funding system for data journalism & high impact projects
- Punches through firewalls and torrents data by key
Overcomes legacy Education Tech system limitations
- Centralized certification
- Censorship
- High cost content providers
- Centralized data storage
- Data transfer costs
- A company or school owns your work
Live in browser edit example
Geospatial Web Dev School & P2P mesh
- Directed graph of components via
meta
keys - Many examples with code to learn from
- End to End UX Testing
- ML code assistant
- Web Crawler
- hackable default UI
- no trackers
- no PII
Start
To install the program
npx chromatic-systems/rho 8080 ram write swarm
npx chromatic-systems/rho 8081 ram read swarm <64 byte key from a writer>
npx chromatic-systems/rho <port> [ ram | disk ] [ write | read ] [ swarm | local ] <public key>
Open the browser
- http://localhost:8080
Optional tunnel on the open web
- optionally tunnel over cloudflare to connect the old world to the peer-to-peer world
cloudflared tunnel --name dev --hostname dev.yourdomain.io
Test
npm test
To run with the debugger
npm run test:i
Dev log update
Milestone 1: Peer-to-peer mesh
- npx to p2p mesh
working!
- web editor
working!
- p2p keystore
working!
Milestone 2: Codex integration
- codex
basic library working, need integration
- navigation
basic page enabled, need user interface
- self hosting shadow chrome tab
host is working see browser.js, need to replace browser that starts from start.test.js
Milestone 3: Full Text Search
- full text search see https://github.com/nextapps-de/flexsearch
- page capture and cache assets see playwright
Why are you building this?
The New Learning Economy: It’s Time To Build in Education
- https://a16z.com/2022/09/16/the-new-learning-economy-its-time-to-build-in-education/
As we enter the third school year of the Covid era, a disturbing new normal is settling over the country. Students continue to be chronically absent; nearly 50,000 Los Angeles public school students failed to show up on the first day of school. Nine-year-olds’ math and reading levels have dropped to 20-year lows, and the dip in reading scores is the steepest decline in more than 30 years. Teacher vacancies are reaching crisis levels. Schools are even resorting to bringing back retirees and loosening basic teaching requirements to fill gaps.
Why is this so important? Education is a $1.8 trillion-dollar industry in the U.S. More importantly, our education system shapes who our future leaders and builders will be—more than 1 in 5 people in the U.S. are current K–12 and college students.
The pandemic catalyzed big shifts at all levels of education, in some cases upending what were previously slow, decade-long trends. Technology adoption in classrooms accelerated; parents pulled their kids out of public schools by the millions after seeing firsthand the inadequacies of our current education system; teens became study influencers on TikTok and made learning cool again (aka #studytok); and the government stepped in with hundreds of billions of dollars for public education. These shifts are driving an expansion of EdTech beyond lecture halls and classrooms, beyond K–12 schools and colleges, to lifelong learning and what we call the Learning Economy.
Naysayers may note that education venture funding returns have trailed the returns generated by other markets, or that only three companies (Coursera, Duolingo, and Udemy) have gone public in the last year. But we believe that the Learning Economy is a much broader sector—and one that spans a longer timeframe—than most people think. The Learning Economy doesn’t just refer to academic tools and student/teacher-facing technologies. Rather, it encompasses all the different ways we develop as human beings, be it picking up a hobby or learning to be a better boss, parent, or friend.
To read more
see strategy
Roadmap
- fix
THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry.
warning - load fulltext from hyperbee stream
- code assist with OpenAI Codex
started
- handle etags / caching
started and testing
- add a lock
public key sig
- add api/esm backend then cache to hyperbee
- accessible multi language, alt text, tap to use, audio-alts, tab targets
- MMO Live coding
- fuzz testing
Architecture
http
server on top ofhyperbee
- share public key to replicate
- add a public route and now you have a CDN
symbols
are stored askey[ meta, data, ... ]
in ahyperbee
symbols
store a few keys with differenttypes
- These are
meta
icon
data
lock
- These types are stored as
sub
keyspace inhyperbee
- a http server proxies requests to the
symbol
keyspace - changes live refresh the system
- watches
/public
and loads into thesymbol
keyspace - runs
chromium
browser as the test client - all logs are piped togther for devUX
routes
are defined inhttp.js
templates
are optionally applied transforms tosymbols
on a HTTP GET request, the current example isarticle
which is atemplate
on theedit
page selector
Recently Added
- add template selector to edit page
- auto reload on sse event
- peer replication
Install
npm install
Test
npm test
test with debugger
npm run test:i
Run the server
note the port and key printed to the console
npm start
or
node src/start.js port ram|disk write|read public-key
Optional Dependencies
- OpenAi Codex API key https://beta.openai.com/docs/guides/code
Priorites
- Tests run first
- Dont break the build
- Test the live system
- Clean up as you go
- Getting started over perfecting the system
Cloudflare Tunnel Getting Started
cloudflared tunnel list
cloudflared tunnel --name dev --hostname dev.yourdomain.io --hello-world true
cloudflared tunnel list
cloudflared tunnel cleanup dev
cloudflared tunnel delete dev
cloudflared tunnel list
Symbol Templates
- Article:
- Text:
- HTML:
- Map: https://deck.gl/
- Markdown: https://github.com/showdownjs/showdown
- Canvas: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial
- Globe: https://chromatic.systems/h3
- Tree: https://chromatic.systems/dag
- Graph: https://chromatic.systems/dag
- CAD & BIM: https://ifcjs.github.io/info/
- CSG: https://github.com/gkjohnson/three-bvh-csg
- Timeline:
- Table:
- cryptography: https://github.com/openpgpjs/openpgpjs
- combinatorics: https://github.com/N8Brooks/combinatorics
- Mathematica: https://reference.wolfram.com/language/ref/program/wolframscript.html
- Image:
- Video:
- Audio: https://github.com/chaosprint/glicol
- Code: https://chromatic.systems/e/1
- Form:
- List:
- Grid:
- Body Track: https://www.tensorflow.org/lite/examples/pose_estimation/overview
- Paint: https://github.com/CompVis/stable-diffusion
- Payments: https://github.com/holepunchto/invoices
- Calendar:
- Chat:
- Email https://www.mailgun.com/
- Phone https://www.twilio.com/
- OCR https://github.com/naptha/tesseract.js
- Map Directions https://github.com/headwaymaps/headway
Tooling and Development
Patch
https://www.npmjs.com/package/patch-package
# fix a bug in one of your dependencies
vim node_modules/some-package/brokenFile.js
# run patch-package to create a .patch file
npx patch-package @popeindustries/lit-html-server
# commit the patch file to share the fix with your team
git add patches/some-package+3.14.15.patch
git commit -m "fix brokenFile.js in some-package"
"scripts": {
"postinstall": "patch-package",
npm i patch-package
Applying patches
Run patch-package without arguments to apply all patches in your project.