deptagency / algomart Goto Github PK
View Code? Open in Web Editor NEWAlgorand NFT Storefront platform
Home Page: https://demo.algomart.dev/
License: MIT License
Algorand NFT Storefront platform
Home Page: https://demo.algomart.dev/
License: MIT License
I tried uploading a preview video for an NFT that was very large for something like that and got an error but could only discover what it was after digging into the network requests: https://share.brandonontheinternet.com/X6ub9oZR
Steps to reproduce the behavior:
It uploads the video or tells me in the UI that the file is too large.
There are (and will be more instances where a button should behave as an AppLink or ExternalLink (for example, on DRL we have a button that kicks the user to a newsletter signup page on the main DRL site).
It would be nice if we could have buttons and text links (both in-app and external) render as button tag or anchor tag, but inherit the appropriate styling based on props.
Integrate the backend with the indexer picked in #40.
During checkout, do not wait for minting to complete and do not trigger transfer endpoint.
Currently, the /releases/[pack-slug]
page forces end users into a login redirect flow. Ideally, they should be able to access this page when authenticated, but not take any actions to purchase, claim, bid, or redeem.
When a user logs in, and owns nothing, and clicks "Find something cool" they're taken /brands instead of /releases:
Instead of regularly checking for statuses of payments, we can subscribe to Circle's notifications that will let us know when a resolved status has been reached, eliminating unnecessary polling before a resolution has been reached. However, Circle resolves a payment as paid in 3 days, and we are only checking non-resolved statuses, so the impact isn't too significant.
See the Circle API documentation on notifications and this documentation on payment status notifications in particular.
As an aside, it drives me nuts it says "sign in" if you intend to sign up.
That said, the flow is broken right now (at least on nfty-mart): https://share.brandonontheinternet.com/Kou7ZryJ
I just infinitely loop on the same sign in flow.
When LOG_LEVEL
is not set, the admin user will not be created when the npm run bootstrap
script is run. Therefore, it says it's successful in bootstrapping, but when you go to login with your username and password, it doesn't work.
Steps to reproduce the behavior:
This should be for a new project without a user.
LOG_LEVEL
apps/cms
npm run bootstrap
directus_users
; there's no user. It also will specify in the logs it created the user if it worked.When LOG_LEVEL
is warn
, the admin user is created as expected and you can login.
When you console log console.log({ userCount })
in the bootstrap file, it returns:
{
usersCount: '17:00:32 โจ Loaded extensions: price-conversion, pack-price\n0\n'
}
As Cloud Run imposes some limitations that are proving hard to workaround, let's switch to Compute Engine (or some other non-serverless GCP option).
[1636418886593] ERROR (185 on 643993e0280a): Bad Request
context: "AlgorandAdapter"
err: {
"type": "Error",
"message": "Bad Request",
"stack":
Error: Bad Request
at Request.callback (/app/node_modules/superagent/src/node/index.js:879:15)
at fn (/app/node_modules/superagent/src/node/index.js:1130:18)
at IncomingMessage.<anonymous> (/app/node_modules/superagent/src/node/parsers/json.js:19:7)
at IncomingMessage.emit (node:events:402:35)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
"status": 400,
"response": {
"req": {
"method": "POST",
"url": "http://3.134.119.141:4001/v2/transactions",
"data": {
"type": "Buffer",
"data": [
130,
163,
...
...
114,
101,
103
]
},
"headers": {
"x-algo-api-token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"content-type": "application/x-binary"
}
},
"header": {
"access-control-allow-origin": "*",
"content-type": "application/json; charset=UTF-8",
"vary": "Origin",
"date": "Tue, 09 Nov 2021 00:48:06 GMT",
"content-length": "714",
"connection": "close"
},
"status": 400,
"text": "{\"message\":\"TransactionPool.Remember: transaction OHLE3O3U2FAO6MO3V3CEVDLGDU3BLWTHUUI6V4MY2WZOE47DILMA: overspend (account A473OSLPGV7FEMMQ3VCAOX7PZNO44Y5X5VZQC34IJFL6LBHC2AMHCKH2CE,
data {_struct:{} Status:Offline MicroAlgos:{Raw:0} RewardsBase:0 RewardedMicroAlgos:{Raw:0} VoteID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
SelectionID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
VoteFirstValid:0 VoteLastValid:0 VoteKeyDilution:0 AssetParams:map[] Assets:map[] AuthAddr:AAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ
AppLocalStates:map[] AppParams:map[]
TotalAppSchema:{_struct:{} NumUint:0 NumByteSlice:0} TotalExtraAppPages:0}, tried to spend {100 0})\"}\n"
}
}
I don't have any idea what error text means.
Support using wallets outside of AlgoMart such as MyAlgo, Algorand Wallet, AlgoSigner. This also includes adding a feature to export the AlgoMart wallet to one of the aforementioned ones.
Various flows and questions that relates to this:
Change the checkout flow so that it only deals with payments and minting of assets. The asset transfer will be moved to after the pack opening screen. This is somewhat related to the wire payment epic #74
This way the checkout will speed up a bit and the minting process can happen in the background while the user opens their pack. We'll still need to wait for the pack's NFTs to be minted before triggering the transfer. This also means moving the passphrase entry to show after the pack opening, most likely in a modal (similar to how it shows for free packs today).
May need some design input here too as we'll need to show in the UI, where appropriate, that NFTs are still being minted. We'll also need to provide an option to transfer a pack on a user's list of transactions (i.e. /my/profile/transactions
).
/my/profile/transactions
/pack-opening/:id
May require some exploration before tackling this issue. Right now we only support showing images for packs in the UI. The field additional_images
, while it implies it only supports images, could be used to upload videos and other files. Ideally, if someone uploads a video here, the video should show up on its pack page (e.g. /releases/pack-slug
).
Keep in mind that until #20 is resolved, the upload size limit is about 32 MB.
Redeeming a pack with unminted assets will fail due to user invariant.
To avoid locking up Algos in unused accounts (0.1 Algo per account), we should defer sending the initial amount until a user acquires their first NFT. This will ensure we keep funds in the funding wallet for as long as possible and is great for storefronts that will mostly rely on auctions where the NFT volume is relatively low.
Right now the API requires a SendGrid account. To remove that vendor lock-in, we can switch to using Nodemailer and SMTP configuration. SendGrid, among many other email service providers, support using SMTP.
Then we can use SMTP "connection strings" like these:
SMTP_URL=smtp://user:password@host:port/?option=a
And later in code:
import nodemailer from "nodemailer";
const transporter = nodemailer.createTransport(process.env.SMTP_URL);
transporter
.sendMail({
from: "[email protected]",
to: "[email protected]",
subject: "My subject line",
html: "<p>Hello there</p>",
})
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});
We should add the details for the bank account created for the payment in the Profile section so the user can easily reference this information when initiating payment. It remains to be seen what this will look like.
Where should this information be added?
To support a model with a high amount of editions per NFT template, we'll need to either: a) switch to only use JIT minting or b) have to option to choose between JIT and AOT.
Seeing as b) might make the code overly complex, it probably makes more sense to only support JIT.
We did consider using JIT minting before. But due to various reasons we settled on AOT as it was easier to implement:
Follow the ARC3 standard to improve compatibility with other (future) NFT storefronts. This will involve storing NFT data in IPFS and also generating a metadata.json
file according to the ARC3 spec.
As a developer, I want to be able to get up and running via terminal commands only, so that I don't waste hours trying to figure out why the API can't talk to the CMS or why I don't see images in the app.
Image permissions step outlined here should be able to be replaced by a simple insert:
The user token step outlined here should be replaceable by updating the user record token column:
I propose we update the cms seed script to do both of these things.
API and Web docker images should be multistage to strip out any dev dependencies that aren't needed after building.
We currently specify the Cloud Run revision name when deploying via Github Actions, which helps alleviate revision name conflicts if a revision is issued in the Cloud Run console.
Unfortunately, this also prevents us from re-running terraform apply
for a given workflow if we've changed environment variables, as Terraform then detects that a revision with that name already exists with a different configuration. One use case for that is misconfiguration; if Github Secrets are not set right (or if we need to update external API keys), we SHOULD BE able to update the secrets and re-deploy without bumping the git commit.
We'll need some design clarification on this one before we tackle it. But basically, we'll want a page to list notifications that we also send out emails for (bought an NFT, won an auction, was outbid, etc). We may also want a fairly real-time toast notification.
Will need to extend the existing Notification model, or make new one. May also need to look into Elastic Search or similar to index packs and collectibles for quick lookup.
Some options include:
Ideally an open-source option that we can self-host. If possible, we want to avoid vendor lock-in.
In order to support payments from certain countries, we need to use 3DS verification, opposed to just cvv verification as is currently supported for card payments. This is for building out the necessary functionality to support this.
More details to come after #72 is complete.
Requires #112 to be available, so we can determine which country is used and determine what verification to use.
Use the preview_video
field from NFT Templates to show videos in the UI when displaying an NFT (instead of the preview_image
). Still use the image in thumbnails. This does not include showing videos for packs.
Keep in mind that until #20 is resolved, the upload size limit is about 32 MB.
Apparently AR is the recommended service over CR
Affects
When viewing a pack that only allows one purchase per customer the user will encounter an error if they have purchased other packs, but not the one per customer pack they are trying to view.
Steps to reproduce the behavior:
Be able to view and purchase the pack
Setup pages for individual NFT templates and NFT instances so they can be linked from, for example, the homepage. Will need some design guidelines here, but can infer most styles from existing content to start.
On the homepage you can add "featured" NFT templates (aka Collectibles). In the sample implementation, they do not link to anything, which may be unexpected. To have them link somewhere, we'll first need to add pages for them.
Additionally, NFT instances (that is, an NFT template that has been minted and has its own ASA index), might be useful to be shareable via links from a user's profile page.
Since we need to support 3DS verification, this is a for doing research and testing so we can know exactly what needs to happen for implementation.
Questions to look into
https://github.com/rocketinsights/algorand-marketplace/commit/f57df0cbf9686da9677166a46d62c88f157f244e added a lock file that then broke the docker images and terraform deploy, requiring https://github.com/rocketinsights/algorand-marketplace/commit/0f8549cb58b43ef930aa71819cf13bf45f2efc78 to fix it
Because the API deploy failed (due to migrations not running), Web and CMS were updated, but API was broken. There should be some process to check that the images build and run properly prior to deploy. Basically, Terraform should not be 'the test' and be able to leave the overall marketplace in a broken state.
To better comply with the wealth of emerging privacy laws, we should provide a consent notice that prompts the user to acknowledge the use of cookies on the website.
Create task for checking the Circle payments endpoint for successful wire transfer.
We cannot transfer the asset automatically without the passcode, so this may be for sending them an email to let them know payment was verified, and then they can login to make the transfer. We'll need a form for gathering the passcode and initiating the transfer, since payment will be complete.
We currently have a task for retrieving pending payments and looking up the payment status and updating it in the database. There will not be a payment created initially, so this cannot be used for checking for wire transfers.
The get payments endpoint has a query param for filtering by wire transfers (type
= wire
). The source.id
attribute matches the ID of the bank account initially created. The status will be paid
when the funds have settled.
This could be a manual step though, so this isn't necessary but a nice-to-have. But we'll need to mark the user as the owner of the pack once we get confirmation of payment.
Should there be a time limit to how long the user has to initiate wire transfer? AKA should we support bid expiration for these auctions. If we do, we should probably double check the status of payment right before assigning to next bidder, and maybe add time if the status is pending.
We need to check the price of the successful payment as well during this process.
This is for building out the functionality to support accepting wire payments.
A lot of the functionality was built for another project and just needs to be pulled into this project.
Including
When my token expires and I try to visit my/collectibles I get in an infinite redirect loop between login and the my/collectibles page.
Steps to reproduce the behavior:
I should either be logged in automagically or be forced to do it manually if it's not possible to programmatically renew the expiration.
I can't see the image preview for the NFT template.
Go to 'http://18.223.54.34:3000/releases', the image is just blank.
Go to 'http://18.223.54.34:3000/releases/11111', can see the image.
The image URI of the image is not correct.
Hi:
I'm getting Response code 401 (Unauthorized) when executing GET requests to the CMS. I've got the key set up in the services/api/.env, Just wondering what I'm missing here. I set up a wallet and have the mnemonic set and Circle is setup.
Cheers, Dave
3DS verification is an additional authentication step used for verification in the payment flow. Certain countries require 3DS verification, so we need to support this. This will change the flow a bit, as the user has to login to their bank and then be redirected to the app upon success/error. Circle supports 3DS verification, at least in the Sandbox environment, and has documentation on how to accomplish here.
An NFT template can be created in the CMS without a unique code, but that blank unique code cannot be changed without deleting or archiving the entry.
Due to the weird behaviors we've seen with Nullable lately, one question is if we can switch to using Zod and Zod to JSON Schema instead of TypeBox. If the nullable issues (#217) go away, then we should make the switch. Otherwise we'll need to explore other options to allow for some fields to be null in our API.
Another option is Superstruct, but would require some more work adapting to Fastify and Objection.
Either option can also replace validator-fns.
Not limited to these options, so some research would be helpful to identify other options.
Passphrase prompt should not happen until after pack opening.
Explore using Moonpay as an alternative to Circle.
There is a CMS setting "show_nfts" that is not being ingested in the DirectusAdapter. We should consume this and if it's present on a pack, show as depicted in the design.
To keep this simple, we can probably just say "This pack contains X collectibles". And for whatever number X is, show the generic mystery release item box with the question mark:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.