Galaxy: Three-dimensional Web for Polkadot Users
- Team Name: Galaxy.Do
- Payment Address: 0xF1dcdA1C9E76BBf32791da01e464A3F55bd7000c (USDC)
- Level: 1
Project Overview 📄​
Overview​
Web has revolutionized the way we organize and explore knowledge.
Although web pages digitalized physical documents, they also inherited some of limitations.
That's the reason most web pages are vertically scrollable, in one dimension only, imitating physical predecessor.
Whiteboards expanding it's space into second dimension leverage human ability of spatial awareness to enhance the understanding.
As hyper text links navigate user in between of web site pages, same way whiteboards can be also inter-linked to expand information into a third dimension.
Then multiple related whiteboards can be rendered as layers on the same canvas with seamless transition in between the layers, thus expanding the knowledge into a third dimension.
That's the quintessence of Stretch Text concept, which makes it possible to express interconnectedness of all knowledge (intertwingularity)
Current grant is offering to develop canvas-based browser which allows polkadot users to create, organize, and share knowledge leveraging three-dimensional Stretch Text space.
Project Details​
1. Frontend - Excalidraw​
The scene is represented as an object; it contains UI State, list of elements, and files cache.
Whenever the elements on the scene updated, it triggers rendering of the canvas.
Each element is represented as an object too: text, images, shapes.
If given element object has a text field, then each line of the text passed to fillText canvas method.
If given element is an image though, it's content is fetched from files cache, and then passed to drawImage canvas method. Files cache is simply a mapping from image content hash to the blob content.
UI implemented in React rendering on top of the canvas allows to seamlessly create and manipulate the elements on the canvas.
Selected elements can be joined into groups, and then selected groups can be serialized and saved as a separate layers.
As user navigates across an infinite canvas, the layers outside of viewport can be unloaded and relevant layers appear.
2. Networking - Polkadot​
Each layer can be serialized into JSON file and then saved to IPFS.
User who created the layer, then makes a transaction to claim ownership of it.
In the transaction, user is passing IPFS link and chosen Layer Name.
The smart contract deployed on the pallete, maintains the mapping from Layer Link to IPFS Link.
Layer Link is represented as deep link in format of galaxy://<wallet address/<layer name>
.
3. Backend - Chisel​
Galaxy Browser consist of frontend app, backend server, and database.
REST API implemented in Rust is running a Deno runtime to handle the network requests in between frontend and database.
When user opens a deep link, layer loading will be handled by backend endpoint which returns the scene object in response to frontend request.
Same endpoint will first resolve Layer Link to IPFS link through polkadot as described above, then fetch content of IPFS link, perform validation of deserialized content to ensure it corresponds scene schema, then save every element as a separate object in the database, then fetch images and save them to database as well, and then consturct a scene object.
The proposed architecture also allows to implement more advanced features: search across different layers, tagging and versioning, recommendations, parallel tranclusion, and microtransactions.
Ecosystem Fit​
Here open for suggestions. Specifically to consider partnerships with: wallets, storage solutions, content sharing platforms and social networks, copyright and microtransaction services.