PubParts.xyz is a website to display a collection of open source or otherwise aftermarket OneWheel parts.
Want to contribute to this repository? Here's some steps to get set up.
- Install NodeJS version 24.x
- Clone this repository
- Navigate to the local clone directory and run
npm installto install dependencies - In the repository root, create a
.envfile containing the contents of the.env.examplefile - Start debugging via either:
${workspaceRoot}/node_modules/.bin/gatsby develop- In Visual Studio Code, you can run
Debug: Start Debugging
Generate Prisma client and apply the schema to a Postgres DB:
npm run db:pushUse npm run db:generate only when the Prisma schema changes or after a fresh install that does not already have a generated client.
A development-only DB admin page is available at:
/admin
This page supports add, edit, and delete operations for catalog parts, resources, and shop items, and is only enabled when NODE_ENV=development.
It uses the dev-only API endpoint:
/api/admin-db
Parts are synced via:
- Build-time sync during deploy (
npm run db:sync). - Immediate sync trigger when inventory is updated from an admin panel.
Production pages are built from snapshot files during gatsby build, so DB changes do not appear on the live site until a new deploy runs.
To trigger that deploy automatically after a successful admin save in development, set this env var:
NETLIFY_BUILD_HOOK_URL=<your-netlify-build-hook-url>
When configured, each successful admin mutation will call the Netlify build hook so production refreshes from the latest DB snapshot on the next deploy.
Now that you've set up the development environment, be sure to check out the contributing guidelines.