Alternative backend to the official Atopile component search-engine.
Rust, Axum, SQLX, Docker
Development of the Atopile Component Server is done with VSCode Devcontainers [https://code.visualstudio.com/docs/devcontainers/containers].
- Install the 'Dev Containers' extension in VSCode
- Copy .env.example to .env
- Press F1, 'Open In Container'
- Connect https://github.com/tvijverb/jlcpcb_scraper to the postgres docker container on port 5431 and scrape JLCPCB
- Start Axum
cargo watch -x 'run'
swagger page
localhost:3001/docs
post request request for parts
localhost:3001/jlc/v1
example request body
{"designator_prefix": "R", "mpn": "generic_resistor", "type": "resistor", "value": {"unit": "megaohm", "min_val": 5.01534, "max_val": 5.1166599999999995, "nominal": 5.0663}}
{"designator_prefix": "C", "mpn": "generic_capacitor", "type": "capacitor", "value": {"unit": "nanofarad", "min_val": 80.0, "max_val": 120.0, "nominal": 100.0}, "package": "0402"}
{"designator_prefix": "C", "mpn": "generic_inductor", "type": "inductor", "value": {"unit": "nanohenry", "min_val": 80.0, "max_val": 120.0, "nominal": 100.0}}
TODO