GithubHelp home page GithubHelp logo

kscalelabs / store Goto Github PK

View Code? Open in Web Editor NEW
26.0 0.0 26.0 19.91 MB

K-Scale Labs store

Home Page: https://kscale.store

License: MIT License

HTML 0.47% Makefile 0.40% Dockerfile 0.14% TypeScript 60.61% Python 37.37% Procfile 0.02% JavaScript 0.73% CSS 0.16% Shell 0.10%

store's Introduction

K-Scale Open Source Robotics

License Discord Wiki
python black ruff
CI Checks (Linting and Tests) Deploys latest code

K-Scale Store

This is the code for our online store. This is a simple store for buying and selling robots and robot parts.

If you would like to contribute, see the CONTRIBUTING.md file and check out the project tracker.

store's People

Contributors

codekansas avatar chennisden avatar winston-hsiao avatar is2ac2 avatar antonyr avatar gaurav-jo1 avatar senthil-athiban avatar dependabot[bot] avatar etcetfelix avatar shon3005 avatar vrtnis avatar nathanjzhao avatar omesh-omg avatar

Stargazers

uzair ghori avatar Krishna Keshava Das avatar Raj Patel avatar Raushan Choudhary avatar  avatar Yesha Vyas avatar Rahul Vishwakarma avatar Vaishnav Palve avatar Jayahari Adithya avatar JINXI LIANG(JOHNNY LIANG) avatar Pranit Patil avatar  avatar Ritik Jadhav avatar Nilanchal avatar Kang-Li (Stephen) Cheng avatar  avatar  avatar Kumar Deepanshu avatar Sahaj Singh avatar jimmycliff obonyo avatar Diwakar Kashyap avatar  avatar  avatar  avatar  avatar  avatar

store's Issues

Remove Redis

Redis is adding more headaches than it is worth at this stage, let's remove it and just use DynamoDB for everything. If it is slow we can add caching

Improve image uploading

Some requests (can consider breaking up into multiple issues):

  • Fix actually uploading to the S3 bucket
  • Fix MIME type for images uploaded to S3
  • Avoid abandoned images (i.e., images uploaded before the robot is ready)
  • Allow uploading JPEG files as well, not just PNGs
  • Show a frontend UI to crop the image before uploading it
  • Increase image upload size to something like 25 MB and crop later on
  • Drag-and-drop to upload images

Also, it seems that uploading the image doesn't work in prod. Maybe there is an issue with the S3 configuration? Here is what I see:

image

Affiliate links

Add the ability to post affiliate links for components. This is similar to what PCPartPicker does.

Make a new API key through the frontend UI

Users should be able to make a new API key through the frontend UI, so that we can use them to validate other user actions

  • On the "API Keys" page, the can see their currently-active API keys (including the one they are using to authenticate the current session)
  • Users can manage the permissions for their API keys
  • Users can add and delete API keys

Add BOM export option to spreadsheet

We would like to have a single button which lets us download the BOM for a full robot as a CSV file, which can then be sent to manufacturers.

  • Add the prices for listings, along with links on where those prices come from and when they were last updated. When there are multiple URLs available, we should be able to compare the prices and availability between each of them. At some point in the future we should be able to just automatically pull the latest price from each source instead.
  • Add a quantity field for children, to allow listings to have multiple children (for example, 8 motors)
  • Get the total price for a robot from it's children
  • Add a button to download the BOM as a CSV file

Setup local s3 bucket and document

Using awslocal from localstack since amazon doesn't provide any official local s3 software. Possibly also replace amazon/dynamodb-local with localstack?

Case insensitive search

  • Fix db writes to add a new field for searching with case-insensitive queries, and change the dynamo db searches to search on that field
  • Replace all table.scan operations with either a DynamoDB query method with pagination, or query with boto3 (since the AWS boto sdk provides low level pagination abstraction)

Source

Link to Stripe payments

Users should be able to link a robot to a Stripe payment form, to make it easy for people to purchase the robot from them.

Visualize URDF and MJCF files

We have already provided an implementation where users are able to upload URDF and MJCF files on the backend. We should support this behavior on the frontend, and, when a user clicks on a listing, we should be able to visualize the URDFs that are available for that listing.

  • Implement frontend flow for uploading URDF and MJCF files
  • Automatically generate a snapshot of the robot model as a PNG which can be shown in the preview window
  • When a user visits a listing, they should be able to interact with the URDF

User settings page

We want a user settings pahge for logged in users to

  • resend verify email
  • change email
  • change password

Relatedly need

  • forgot password link

User is STILL duplicated on creation

In dev, the User object is still created twice. Idea for how to fix: before inserting User objected into database, check that an associated User email entry (w/ the appropriate user id) is present!

Request to Work on Landing Page

I hope you're doing well. I am interested in contributing to this project and would like to work on designing and implementing a landing page.

Here are a few points I'd like to cover:

Purpose and goals of the landing page.
Key features and sections to include.
Any specific design guidelines or assets (e.g., logo, color scheme, typography).
Preferred tools or frameworks (if any).
Any other requirements or expectations.
I am excited about the opportunity to contribute and would appreciate your guidance and feedback. Please let me know if this is something I can take on and if you have any additional information to share.

Looking forward to your response!

do something about jest always failing

It would be nice if our frontend tests were more than just linting. However, Jest is very fickle to get working with our current stack of dependencies.

Add admin account type

Moderator account should be able to manage other peoples' listings. Admins can make people moderators.

  • Add permissions on the backend marking users as admins or moderators
  • If a user is an admin, they should be able to make other users moderators
  • If a user is a moderator, they should be able to edit other peoples' listings

Interoperability with Onshape

  • We should be able to go directly from Onshape to a BOM on our website
  • Potentially we should also be able to refresh the BOM automatically (i.e., they are "linked" somehow)

Forms look downright awful

image

  • Input fields are way too wide
  • Description should be textarea
  • Buttons have inconsistent widths

Many of these issues are universal to every form. Judicious CSS styling should solve the problem.

Bug: env variable interpolation cannot be relied upon for default values

While debugging an error related to sending the email for user registration, I encountered an issue with the config loading.
For context, I did not export or set the env var ROBOLIST_REDIS_HOST as I did not think it to be necessary since it is set to a default value in RedisSettings.
Main Issue
The output of settings.redis.host is an empty string, leading to the backend server not being able to connect to Redis.
I believe the problem is with the omegaconf library, and I've opened an issue about it on their repo, which you may view in more detail here: Link to issue
Image of issue:
Screenshot 2024-06-23 095543

The current best workaround is to explicitly set the environment variable in .env:
ROBOLIST_REDIS_HOST=127.0.0.1
Other areas using interpolation are all the environment variables related to the email settings, so the email functionality may be affected as well without setting them, though I haven't tested that yet.
I recommend explicitly setting every environment variable, and updating the contributing.md page to reflect that for now, as this likely isn't an important enough problem to fix for now.

This, however, brings up the question of why use lazy loading when pulling config settings?
I suppose a good reason I can think of is for the ability to change the Redis and email settings without having to reload the fast api server in production. But there might be other reasons to lazy load that I'm not thinking of. Like I said, likely not important to fix, but I am curious.

OmegaConf version: 2.3.0
Python version: Python 3.11.9
Operating system: Ubuntu 22.04.4 LTS

Add 2-factor authentication

Support 2-factor authentication somehow

This will likely be part of a general overhaul of how we are authenticating users

Don't create user until they verify their email

Not sure if this is desirable (since slightly nonstandard registration flow) but it is the best way to do things, I feel.

Back in the old Rust implementation, the registration flow worked like this:

Send registration link to email -> Create account with registration link

so that any account created is email-verified by definition.

  • The auth code becomes drastically more simplified; we do not need to deal with the difference between verified and unverified users.
  • A malicious actor cannot try and trick a user with false verification emails sent at the same time as the real ones (because even if the malicious actor generates registration codes, ultimately the real user is still the one using them).
  • And a malicious actor cannot "email-squat", that is, create an unverified account with someone else's email, thereby preventing the real owner of that email from registering with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.