When given a custom device design by the MakeDevice frontend, this server performs PCB auto-routing between modules, and generates:
- Gerber files & drill data for PCB manufacture
- BOM and CPL files for PCB assembly
- Device firmware for commissioning
Make sure to use up-to-date backend_module_data/ generated by MakeDevice modules
On each push to main, a github workflow builds a docker image. This can be downloaded to run the production server locally with no setup.
- Start the docker service
sudo service docker start - Pull the latest container package
docker pull ghcr.io/devices-lab/makedevice-backend:latest - Run the container
docker run -p 3333:3333 ghcr.io/devices-lab/makedevice-backend:latest
Caution
To free up space by permanently deleting ALL docker containers, images, volumes (not just MakeDevice ones), you can run docker system prune --all --volumes --force
Alternatively, the python code can be run by following these steps
sudo apt-get install \
binutils \
build-essential \
cmake \
git \
libusb-1.0-0-dev \
pkg-config \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlibgit clone --depth=1 https://github.com/raspberrypi/pico-sdk.git pico-sdk && \
git clone https://github.com/raspberrypi/picotool.git picotool && \
cd picotool && mkdir build && cd build && \
cmake .. -DPICO_SDK_PATH=../../pico-sdk && \
make && \
rm -rf ../../pico-sdk && cd ../..You must use Python version 3.11, or lower, otherwise it won't work with some outdated dependencies (such as gerbonara). To control Python versions you may use the pyenv tool.
brew install pyenvpyenv install 3.11.0pyenv global 3.11.0to set globally orpyenv local 3.11.0to set in the current directory.
In the case this tools doesn't change your Python version (happens on an M-chip Mac), add eval "$(pyenv init --path)" to your ~/.zshrc and re-open the terminal.
- Create a virtual environment with
python3 -m venv venv - Activate it with
source venv/bin/activate - Install dependencies
python3 -m pip install -r requirements.txt
- Activate the virtual python environment with
source venv/bin/activate - Run an offline test case for a JSON from
data/, such aspython3 run.py office-vm_net_map_0.3
- You could instead run
python3 run.py office-vm_net_map_0.3 videoto generate a video of the test case
- Activate the virtual python environment with
source venv/bin/activate - Run the Flask development server with
python3 -u server.py
- Alternatively, run the production server with
gunicorn server:app --workers 4 --bind 0.0.0.0:3333 --capture-output --log-level debug
See the /data directory
See CHANGELOG for latest updates and progress
There is a GitHub project (Kanban board) for MakeDevice planning, with features and their integration status.
Each module available in MakeDevice should have a central JSON file with the following information
- Name
- Humam readable description
- Version
- Module size
- Designer name
- Functional name, i.e.
rotary-buttonorRGB-ring - Number of functional components
- MCU part number
- Last update date
- 3D file paths
- Alternate 3D file paths
- Kitten bot module floating on top
- No components, just pads
- Module type (programmer/target/connector)
- Firmware descriptions
- List of GerberSockets
- Design rules - whether can extend to board edge, or not
- Stack-up in a given module
- Info about enclosure aperture (whether or not they are included in the GerberSockers layer)
- List of functional substitutes using the functional naming scheme
When a PCB design has been yet designed with GerberSockets, you can import your current PCB and socketify it.
- Collision detection
- Alignment, centering, auto-alignment
- AI prompt integration, possible with the JSON format for each module
- Distinction between 2D/3D preview - with enclosures, components/KittenBot modules
- Better UI and general flow of things
- Eventually, follow the MakeCode/CreateAI UI theme
- Add tex editor
- Support multiple keep-out zones
- Generate enclosures
- Silkscreen text
- More things...