# SwitchEV — Shared ## Jira Workflow All work in this repo should reference the relevant Jira ticket (project: `SEV`). Mention the ticket key in commit messages and PR titles (e.g. `SEV-23: Build shared validation schemas`). Quick fixes with no ticket are fine — just proceed directly. **Relevant Epics (use as parent when creating new tickets):** - **SEV-7** — Backend API & Database *(primary — shared Go packages, validation, types)* - **SEV-6** — Authentication & User Management *(shared auth constants, role definitions)* **JQL shortcut:** `project = SEV AND parent in (SEV-7, SEV-6) ORDER BY status` Use the Jira MCP tools (`mcp__atlassian-switchev__jira_*`) to search, create, and update tickets directly. ## Project SwitchEV is an EV conversion marketplace. This repo contains shared constants, validation schemas, and type definitions used across the api/ and frontend sites. ## Purpose - Shared constants (roles, statuses, tiers, specialties) - Validation schemas (reusable between frontend and API) - Type definitions ## Usage Keep this package minimal. Only add code here if it is genuinely shared between multiple repos. ## Git Hosting & CI/CD - **Gitea:** `git.debyl.io/SwitchEV/shared` — PRs, code review - **MCP:** Use the `gitea-personal` MCP server at `git.debyl.io` for PRs and all Gitea operations; fallback is `tea` CLI - **CI:** No Gitea Actions workflow — shared library; tests run in consuming repos (api) ### Git Workflow 1. Create a working branch off main, make changes, commit, and push 2. Create a PR via the `gitea-personal` MCP (or `tea` CLI as fallback) 3. Wait for CI to pass (if applicable) 4. Ask the user for code review before merging 5. Merge the PR (remote branch is auto-deleted) 6. Locally: `git checkout main && git pull && git fetch --prune` ### tea CLI Reference (fallback) ```bash tea pr create --repo SwitchEV/shared --login git.debyl.io --head --base main --title "Title" --description "Body" tea pr list --repo SwitchEV/shared --login git.debyl.io tea pr merge --repo SwitchEV/shared --login git.debyl.io --style merge ``` ### Branch Protection Main branch is protected via Gitea: - Direct push to main is blocked — all changes go through PRs - No required approvals (single-maintainer repo) - **Auto-delete branch after merge** is enabled — remote branches are cleaned up automatically - Locally, `git fetch --prune` cleans up stale remote-tracking branches