Skip to content

Latest commit

 

History

History
178 lines (164 loc) · 4.3 KB

README.md

File metadata and controls

178 lines (164 loc) · 4.3 KB

RC Part Picker

Build Page

Imgur Imgur

Add parts

Imgur

Part validation

Imgur

Part list

Imgur

Getting Started

  1. Clone repo
git clone https://github.com/BenTracyDotCom/RCPartPicker
  1. If you haven't got MongoDB installed, you'll need to set up a local instance. This project is currently only configured to work on a local MongoDB instance.
  1. Environment variables
  • Copy example.env to its own file called simply ".env".
  1. Install dependencies
npm install
  1. Start server
npm run server
  1. Start dev client
npm run dev
  1. Look for ToDos and mind the linter! She'll let you know if you're about to break something.

Parts Schema

An add-part modal to populate the database is the next construction item. Until then, you'll have to find an inelegant way to get parts into the database according to the following schema:

Airframes

name: String,
type: "airframe",
data: {
  engines: Number (determines required motors, props),
  wingspan: String(opt),
  anythingYouFindWorthNoting: String,
  includes: [
    {
      type: String (lowercase, must be valid part type!)
      name: String,
      qty: Number
    },
    {
      type: "esc" or "servo" etc,
      name: "Example Plane ESC",
      qty: 1
    }
  ],
  photoUrl: String,
  prices: [
    {
      host: String,
      url: String,
      price: String
    },
    {
      host: "domain name, might be used for trend analysis someday"
      url: "thisWillBeTheActiveLinkOnAllIncludedComponents.com",
      price: "thisWillBeComparedAndOnlyTheLowestWillShowWithItsAssociatedURL.99"
    }
  ]
}

Batteries

name: String,
type: "battery",
data: {
  voltage: String (e.g. "3S"),
  capacity: String (e.g. "2200mAh"),
  connector: String (e.g. "IC3"),
  c_rating: String (e.g. "30C")
},
photoUrl: String,
prices: [same as above]

ESC's

name: String,
type: "esc",
data: {
  battery: String range (e.g. "2s-4s"),
  connector: String (e.g. "IC3")
}
photoUrl: String,
prices: [same as above]

FC's

name: String,
type: "esc",
data: TODO
photoUrl: String,
prices: [same as above]

Motors

name: String,
type: "motor",
data: TODO
photoUrl: String,
prices: [same as above]

Propellers

name: String,
type: "propeller",
data: TODO
photoUrl: String,
prices: [same as above]

Receivers

name: String,
type: "receiver",
data: {
  protocol: String separated by commas (e.g. "DSM2, DSMX"),
  channels: Number,
  weight: String(opt),
  dimensions: String separated by x (e.g. "15mm x 49mm x 30mm")(opt)
},
photoUrl: String,
prices: [same as above]

Servos

name: String,
type: "servo",
data: TODO
photoUrl: String,
prices: [same as above]

Transmitters

name: String,
type: "transmitter",
data: {
  protocol: String(currently only "DSMX", "CRSF", and "ACCESS" are supported in the validator),
  channels: Number
},
photoUrl: String,
prices: [same as above]

Tech Stack

TypeScript Vite React NPM MongoDB TailwindCSS Axios Express

TODO:

  • Implement add-part modal to get parts into DB
  • Connect order-status checkmark status to build object to they persist
  • Write web scraper to check all DB part page URLs for current prices
  • Refactor airframe schema to accept part requirements