- Clone repo
git clone https://github.com/BenTracyDotCom/RCPartPicker
- 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.
- https://www.mongodb.com/docs/manual/tutorial/getting-started/
- I highly recommend installing MongoDB Compass to manage data
- Environment variables
- Copy example.env to its own file called simply ".env".
- Install dependencies
npm install
- Start server
npm run server
- Start dev client
npm run dev
- Look for ToDos and mind the linter! She'll let you know if you're about to break something.
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:
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"
}
]
}
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]
name: String,
type: "esc",
data: {
battery: String range (e.g. "2s-4s"),
connector: String (e.g. "IC3")
}
photoUrl: String,
prices: [same as above]
name: String,
type: "esc",
data: TODO
photoUrl: String,
prices: [same as above]
name: String,
type: "motor",
data: TODO
photoUrl: String,
prices: [same as above]
name: String,
type: "propeller",
data: TODO
photoUrl: String,
prices: [same as above]
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]
name: String,
type: "servo",
data: TODO
photoUrl: String,
prices: [same as above]
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]
- 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