An app to track part manufacturing and assembly at FRC Team 4786 Nicolet FEAR
- SvelteKit
- Drizzle ORM
- PostgreSQL
- TailwindCSS
- shadcn-svelte
- Zod
- Superforms
Some important paths:
src/lib/components/- Reusable components for use across the appsrc/lib/onshape/- Helpers for integrating with the Onshape API and panelsrc/lib/server/db/- Database setup, helpers, and schemassrc/routes/(authed)- Routes that require the user to be authenticatedsrc/routes/auth- Routes that relate to the auth flow
- Clone this repo
- Install npm
- Install
mkcertand runmkcert localhost - Install Docker Compose
- Create a
.envfile based off of.env.example - Run
npm install - Create a Onshape App in the Developer Portal with these important settings:
Name: `FEAR BAGs (DEV)`
Primary format: `com.nicoletfear.bag.dev`
Summary: The dev version of Nicolet FEAR's Manufacturing Hub software.
Redirect URLs: `https://localhost:5173/api/auth/oauth2/callback/onshape`
- Create an extension in this App with the following settings:
Name: FEAR BAG
Location: Element right panel
Context: Inside part studio
Action URL: `https://localhost:5173/onshape/part-studio-panel?documentId={$documentId}&workspaceId={$workspaceOrVersionId}&elementId={$elementId}`
- Run
npm run db:startto start the database - In another terminal run
npm run db:pushto push the schema to the database - Then run
npm run devto start the development server
Before committing code, you should do a few checks:
npm run lintto check prettier and eslintnpm run formatto format your codenpm run testto test your code against its tests
See package.json for all commands
npm run db:studio- Run Drizzle Studio to interact with the database in the browser
This project is not even close to done. All todos and issues are in documented in the Github issues section.
- Failing to query the database
This can be for a number of reasons. First check that you have ran npm run db:start. If you have, check docker ps, and look at the ports section. If it is empty, try docker compose down and then docker compose up -d.