artflake / snowflakeweb

Snowflake Web Interface
0 stars 0 forks source link

Website builder for linked pages #12

Open TheRook opened 2 years ago

TheRook commented 2 years ago

I think we should use a jinja2 python template for making profile and NFT landing pages so that they can be hard linked.

Just make a stand alone jinja2 python script and a function that mints out; user profile pages and nft pages.

Usernames have to be unique, and we will give them top priority just like Instagram and medium https://flake.art/%7Busername%7D, where username has to be three characters and cannot have a slash. This allows us to create new folders that won't collide with that namespace. So for serving NFT images we won't use IPFS, we'll use: https://flake.art/i/ as the base URL so nfts will get their own folder: https://flake.art/i/1 ... https://flake.art/i/31337

TheRook commented 2 years ago

The data for each page comes from the DOM, here is the NFT metadata: document.window['nft_data']={ "title": "Asset Metadata", "type": "object", "properties": { "name": { "type": "string", "description": "Identifies the asset to which this NFT represents" }, "description": { "type": "string", "description": "Describes the asset to which this NFT represents" }, "image": { "type": "string", "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive." } } }

TheRook commented 2 years ago

User file structure, assume each page loads from the same directory. Usernames cannot start with a number so they do not overlap with the NFT ID.

http://flake.art/beepal would be a username, and usernames cannot start with numbers. http://flake.art/beepal/index.html is the application entry point with the jston struct that makes up that user profile. http://flake.art/beepal/profile is the profile image - no file extension http://flake.art/beepal/background is the background image - no file extension http://flake.art/beepal/oembed.html is the oembed page for beepal

TheRook commented 2 years ago

The nft ids are all numbers so if the folder starts with a number it is an NFT:

http://flake.art/1337 would be a username, and usernames cannot start with numbers. http://flake.art/1337/index.html is the application entry point with the json struct that makes up that user profile. http://flake.art/1337/asset is the NFT file - no file extension http://flake.art/1337/oembed.html is the oembed page for 1337 NFT

An NFT will use the standard NFT metadata: https://nftschool.dev/reference/metadata-schemas/#linking-to-nft-assets

TheRook commented 2 years ago

The template variables should be kept in a json data store in the folder: http://flake.art/1337/data.json and http://flake.art/beepal/data.json