nftchance / runner

Runner redefines how a small service business runs in 2022 by refocusing to maximum-scale operations from Day 1.
0 stars 1 forks source link

API features for UX improvement #22

Closed masonchain closed 2 years ago

masonchain commented 2 years ago

As we're moving further along on the front end, some things are necessary to iterate on in the backend to provide better UX.

More might come along but these are the main items I can currently think of. Feel free to make any changes at will and just let me know so I can implement.

nftchance commented 2 years ago

Unaccounted for will not be included. We aren't chasing quorum.

nftchance commented 2 years ago

Roadmap won't be in the API. I will figure out what the injest pattern is.

nftchance commented 2 years ago

Balance of user is returned from raw UserSerializer rather than being another call that is needed to be made.

(We will likely be adding a little button to the dashboard template that shows the balance at all times to gamify the experience of them making money + $run)

nftchance commented 2 years ago

Balance of user is returned from raw UserSerializer rather than being another call that is needed to be made.

(We will likely be adding a little button to the dashboard template that shows the balance at all times to gamify the experience of them making money + $run)

With this implementation, when a user is not logged in we will just show a button that prompts them logging in before being able to vote so that there is never a case where you "need" the balance before they are logged in.

nftchance commented 2 years ago

System messages are built upon:

    title = models.CharField(max_length=100)
    link_text = models.CharField(max_length=100)
    link_url = models.CharField(max_length=100)
    external = models.BooleanField(default=False)

    expired_at = models.DateTimeField(null=True, blank=True)

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

When querying the list:

^system/broadcast/$ [name='broadcast-list']

Only Broadcast messages that haven't expired will show. Right now, Broadcast messages can only be created within the admin section and can have an infinite run-time while others can have an expiration time set.

nftchance commented 2 years ago

Multiple messages can be returned at once. In which case, they should alternate between one another.

nftchance commented 2 years ago

The email list will have to wait until the primary API architecture has been merged.

nftchance commented 2 years ago

Can order the order proposal list by created_at and votes_total

To get this in a URL it would be: https://localhost:8000/proposal/?order_by=-created_at

nftchance commented 2 years ago

Tried implementing the most popular, but not only does it not make sense to have as an option, it is an absolute pain to add. Instead, you can sort by any field. So instead of most popular and least popular, we will replace it with 'time most remaining' and 'time last remaining.'

Along with this I went ahead and added searching to the fields of title and description.

Finally, tossed in field value checking of: id, title, description, approved

Last thing to do here is to make sure that we can filter by status.

nftchance commented 2 years ago

Was closed by the linked PR.

nftchance commented 2 years ago

Waitlist has been taken care of. You can now find the docs for all API endpoints at:

HTTP://localhost:8000/docs/
nftchance commented 2 years ago

I am unsure of the best way to implement the schema for the roadmap. On the one hand, it could be implemented in the API, which is laborious and like storing the same data in 4 different places. I am not a fan of this approach however if you zoom out then realistically, the workflow is this no matter what you do.

There does exist a way to just use the REST API from GitHub to get the project details. However, that still leaves many things to be desired and a workflow that is again less than ideal. Why? Because you have to have an authentication token...

This brings us to the point that I think the roadmap best serves by being static and more generalized than first planned. Kind of lame but not worth spending a lot of time on when we will have many changes in the roadmap. So, I guess it being bluntly straightforward is best anyways.

nftchance commented 2 years ago

Roadmap will be static on the front-end. No real reason to make it truly dynamic.