|
| 1 | +# Contributing to sfetch |
| 2 | + |
| 3 | +## Running locally for development |
| 4 | + |
| 5 | +**Prerequisites:** Docker Desktop, Node.js 20+, Salesforce CLI with an authenticated org. |
| 6 | + |
| 7 | +```bash |
| 8 | +git clone https://github.com/SSheppDev/SFetch.git |
| 9 | +cd SFetch |
| 10 | +cp .env.example .env |
| 11 | +# Edit .env — set POSTGRES_PASSWORD at minimum |
| 12 | +``` |
| 13 | + |
| 14 | +Start Postgres only (so the API can run outside Docker during dev): |
| 15 | + |
| 16 | +```bash |
| 17 | +docker compose up postgres -d |
| 18 | +``` |
| 19 | + |
| 20 | +Run the API and UI in watch mode: |
| 21 | + |
| 22 | +```bash |
| 23 | +npm install |
| 24 | +npm run dev:api # Express API on :7743 |
| 25 | +npm run dev:ui # Vite dev server on :5173 |
| 26 | +``` |
| 27 | + |
| 28 | +The Vite dev server proxies `/api` requests to the Express backend, so the full app works at `http://localhost:5173`. |
| 29 | + |
| 30 | +## Project structure |
| 31 | + |
| 32 | +``` |
| 33 | +src/api/src/ |
| 34 | + auth/ SF token reader |
| 35 | + db/ Postgres pool + init SQL |
| 36 | + routes/ Express route handlers |
| 37 | + salesforce/ Bulk API client |
| 38 | + sync/ Delta sync, reconciliation, DDL, scheduler |
| 39 | +
|
| 40 | +src/ui/src/ |
| 41 | + components/ Shared UI components |
| 42 | + pages/ One file per page |
| 43 | + lib/ API client, utilities |
| 44 | +``` |
| 45 | + |
| 46 | +## Submitting a pull request |
| 47 | + |
| 48 | +1. Fork the repo and create a branch from `main` |
| 49 | +2. Make your changes — keep commits focused and descriptive |
| 50 | +3. Open a PR with a clear description of what changed and why |
| 51 | +4. PRs that add features should include a note on how to test them manually |
| 52 | + |
| 53 | +## Reporting bugs |
| 54 | + |
| 55 | +Open a GitHub issue with: |
| 56 | +- What you expected to happen |
| 57 | +- What actually happened |
| 58 | +- Relevant logs (`docker compose logs api`) |
| 59 | +- Your OS and Docker version |
0 commit comments