Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎾🌎 ↝ [STA-19 STA-30 SGV2-141]: Articles & off-chain accounts #139

Conversation

Gizmotronn
Copy link
Member

@Gizmotronn Gizmotronn commented Aug 20, 2024

Let's just get this over with

Huly®: STAR_-93

Gizmotronn and others added 30 commits January 24, 2023 19:11
We've got some 3d planets being rendered in javascript, these are based on the initial C# algorithms in Signal-K/starsailors#4, Signal-K/starsailors-boilerplate#1

We've got some plans to generate nfts from this: Signal-K/sytizen#18. The models here are based on the C# model, we'll have an API call setup later so that they're both equivalent to each other directly.

Next step is setting up some image exports and saving user data, providing a way for users to export the 3JS graphic to their Supabase storage row. That will be commenced later on tonight.

All the fields will be set to be callable via an API & we will compare the output of different Deepnote graphs generated from `lightkurve` to provide further adjustments to either end.
One issue is that on the frontend for the generator, some of the components aren't selectable. This is because the original example components were built for a much older version of React>Next. Since these will be callable via a custom API, and the editor will be changed to be a form, that won't be an issue.

Docs available at the central issues on signal-k org

Signal-K/marketplace#19
Signal-K/marketplace#3
Signal-K/marketplace#7
Signal-K/Silfur#26 -> These will be added to posts on the image/comment sharing part of the site (and later on Lens -> team members can refer to the roadmap) so that will be routed internally.
…-parameters-from

🥶🦀 ↝ Adding initial off-chain authentication via Supabase to the Lens client
Also updated header component to provide links to the section
Signal-K/sytizen#16

Temporarily had to remove the `Threads` hooks because being unfinished, they were causing build errors. They will be re-added later. Vercel has now been updated with a new test link -> check out the generator https://starprotocol-gizmotronn.vercel.app/generator/planet-editor

Documentation on the gallery is available here:
https://skinetics.notion.site/Supabase-Primer-6cf6c0e31fe6421b9fe0f084d8bad0e5
Changelog:
Moved the gallery components into the offchain account section.
Added new feature where users can take a screenshot of the planet they've created

Currently, the screenshot is saved as an image URI string (see bottom of commit for e.g.), which is a problem as it is then uploaded to Supabase as a URI. What we need to do is convert the URI to an image inside the app (without saving it as a file on the app (as in a png file being saved next to the jsx file). This could be done before it's uploaded to Supabase, or when it's retrieved...

Signal-K/sytizen#18
Signal-K/sytizen#16
…contract

This is the first step of our new attempt at fixing Signal-K/Silfur#25

I've started merging the CSS into a new `styles/Proposals` directory in the next client, converted the calculater functions to typescript, and adding the context as a wrapper around the rest of the app (inside Thirdweb -> Moralis [providers]).

We'll take the `<Sidebar />` component from https://github.com/Signal-K/sytizen/tree/main/client and have that be a persistent component on all pages INSIDE the `pages/Proposals` directory. We can remove the usage of `react-router-dom` by just putting a page inside that directory, and then creating a `[...id].tsx` file for the proposals dynamic routes, thus making it Next compatible. The context provider seems to be working fine. So we'll see how this goes.
…-commenting-post

👜🦺 ↝ Adding planet editor, profile hooks
…management added

There's an issue with loading the Avatars in the PostCard component -> we need to match them to the post id & the user who created the post [id] however it seems there's an endless loop that's been established where the client is constantly trying to communicate with the server (Supabase). The key to fixing this issue is getting the Avatar data to be passed in the same way as it is in the PostFormCard component (which is not experiencing any problems)

Signal-K/sytizen#16
1. Completed authentication header for web client. To the end user it is 100% offchain, with user profiles being stored on a postgresql database. However, I've taken a dive into the Magic sdk to create wallet addresses for each user, as well as a Flask-based authentication handler for future metamask/wallet interaction. I've made this decision for a few reasons (like simplicity), but the main reason is for the client to seem like a regular journal platform and not be confusing, as well as follow the 'web3-agnostic' design language I favour for projects like this due to confusion and/or distrust of web3 products/teams. However, since each user will have a wallet address, they'll be able to interact with smart contracts and IPFS just fine. Further discussion will need to take place to discuss long-term suitability of this model, including things like gas fees (currently everything regarding transactions is occurring on Goerli [testnet] and gas fees will be processed by a "superuser" so that there's no restrictions or huge expenses) and how we go about getting users to trust the web3 nature (which I've got a lot of experience with). However, I don't fully know the exact demographics we'll be targeting & also I understand that that's quite a while away, so I'll raise it now but won't spend any time thinking about it until the time comes
          2. I've continued with the contracts for proposals/publications & updating the metadata standards. I favour a lazy minting approach with data processing being handled by a Flask blueprint (which is a formula my team have developed on signal-k/sytizen). Right now I'm using Thirdweb & Moralis for the contract interactions and I have also, with much difficulty, succeeded in getting Moralis to self-host on my Postgres server. Finally, I've begun the process of optimising the base layer contracts so that the gas fees (which are already reduced post-merge) are essentially negligible at this time.
          3. File upload for posts/articles feature on the web client is complete, and the smart contracts now receive all file upload metadata from this.
          4. Begun a new flask blueprint (forked from point #2) to generate dataset previews based on which modules (e.g. lightkurve) are used and to add interactive nature to the 'sandbox' feature discussed earlier
          5. Reluctantly continued some documentation

(above message from the Desci discord, see Signal-K/sytizen#16 for more info)
…h-to-usesession-from

🥎🔎 ↝ Fixing thirdweb module issue, update avatar export function
… some issues with rendering the planet-editor state. Also added contract info for staking
…ent-to-offchain

🥇🐧 ↝ WB3-12 add lens graphql client to offchain client, and staking back
Users can now navigate to `/planets/{$planetID}` to see information relating to their planet, including datasets, articles, a sandbox, basic stats/info, a gallery, and a generator.

Generator:
Signal-K/sytizen#18
Right now it's just the same generator script, but eventually it will take in the fields like radius from the table the page itself is generated from. We'll update the frontend fields to use a UI based on the <Card /> component we've designed for the Profile pages. users will be able to edit these fields and create a fork of the anomaly in its dataset sandbox for use in their own projects, and this can be part of the "XP" demo for "citizen science points" to mimic the behaviour of the reputation erc20 token:

Now that staking has been re-added, time to close #18

Signal-K/sytizen#16 Profile pages
Signal-K/sytizen#13
Signal-K/sytizen#6 -> Generator & staking
Signal-K/sytizen#1 -> sandbox & generator
Signal-K/Unity-Demo#28
Signal-K/Unity-Demo#5
Signal-K/starsailors#4 -> user input on anomalies
Signal-K/Silfur#26
Signal-K/Silfur#25 -> Some small changes with the Thirdweb module behaviour, still yet to commence full re-integration now though
Signal-K/Silfur#24
Signal-K/Silfur#22 -> Replacing "mint" FOR NOW with just a "claim" button that sends the planet to your supabase table inventory (array/foreign key in 'profiles' table

Signal-K/Silfur#21
Signal-K/Silfur#12 -> Keep an eye on this, but for now this is deprecated
Signal-K/Silfur#3 -> Again keep an eye on the original card game contract, but until we commence the full re-integration of the smart contracts, this is not needed

Signal-K/Silfur#30 -> This is working a treat
Signal-K/Silfur#29 -> Now need to add true threaded comments & integrate it with sandbox items

Full notes available here: https://www.notion.so/skinetics/February-Flow-Planets-8c864b66147c447f82136772336e9bc6?pvs=4#09b8260b2360412683ef5935309fd011
…ent-to-offchain

🚀🎨 ↝ Staking soft re-integration & profile page index/boilerplate completed
Gizmotronn and others added 19 commits June 1, 2023 06:00
…worlds. Confirmed to be compatible with react-renderer-
🧠🗿 ↝ Unity LOD build for planet paint function, fresh dir for undefined error
…-posts-be-generated

🧉🧠 ↝ Planet/anomaly object pages generated based on entities in db, claiming & Unity integration added
🐦🧉 ↝ Addition of Unity build
…rn-stats

🐏🩳 ↝ Claiming method created (just hidden for now), stats & graphs for anomalies are returned to the frontend
…commenting-post

🪖👜 ↝ Off-chain threads & discussion board now implemented
…ent-to-offchain

🧛🏻‍♂️🍢 ↝ Lens client still there, just hidden
…wb3-11-migrate-offchain-auth-to-usesession-from

🛻🧩 ↝ [STA-30 WB3-11 SGV2-141]: Offchain-accounts integrated into article comp.
@Gizmotronn Gizmotronn added documentation Improvements or additions to documentation duplicate This issue or pull request already exists wontfix This will not be worked on content data crafting labels Aug 20, 2024
@Gizmotronn Gizmotronn self-assigned this Aug 20, 2024
Copy link

height bot commented Aug 20, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@Gizmotronn Gizmotronn merged commit da06c31 into sta-19-route-authentication-parameters-from Aug 20, 2024
@Gizmotronn Gizmotronn deleted the sta-30-create-article-component-in-client branch August 20, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content crafting data documentation Improvements or additions to documentation duplicate This issue or pull request already exists wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants