putz web services monorepo
- Install: Node 18+ (or 20),
pnpm,convexCLI (npm i -g convex). - Wokenet uses Convex for the db and Clerk for auth. You'll need accounts for both.
- Login to/create a convex account (
convex loginand follow the instructions). Create a new project calledwokenet. - Create a Clerk account if you don't already have one, and make a new application, also called
wokenet. - Copy env template:
cp .env.example .env.local. - Go to your Clerk app to get your frontend api url and publishable key (Application -> Configure -> API keys). Set them to
VITE_CLERK_FRONTEND_API_URLandVITE_CLERK_PUBLISHABLE_KEYrespectively. - Setup a JWT template for your Convex project. Go to Application -> Configure -> Sessions -> JWT templates, click "Add new template", title it
convex, and use the Convex template. Click save. - Open your Convex project and get the development key (in the dropdown next to the project dropdown, of the form
{adjective}-{animal}-###}). Use that to populate theCONVEX_DEPLOYMENTenvironment variable (dev:...) - Install deps:
pnpm install. - Run Convex backend:
pnpm convex:dev. If it says you need to add an environment key, click the link and do that. Leave this running. - In another terminal, run the frontend:
pnpm dev→ open http://localhost:5173 and create an account. - By default, this user won't be authorized to view any of the pages. Fix this by modifying your user in the Convex table to have
affiliation"PUTZ"andisAdmintrue. You should now have wokenet up and running locally - If you want to test with live location data, ask t11s.
- Go to https://geojson.io to construct your polygons.
- Once you're done, copy the coordinates into
convex/location_labels/location_labels_states.jsonorconvex/location_labels/location_labels_misc.json. - Test it by setting
VITE_SHOW_REGIONS=trueand spinning up wokenet. Your region should show up where you expect it.