Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Format check
run: pnpm run format:check

- name: Run linting
run: pnpm run lint
continue-on-error: true
Expand Down
6 changes: 6 additions & 0 deletions SparkyFitnessServer/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/
coverage/
dist/
node_modules/
pnpm-lock.yaml
package-lock.json
10 changes: 10 additions & 0 deletions SparkyFitnessServer/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"arrowParens": "always",
"endOfLine": "lf"
}
4 changes: 3 additions & 1 deletion SparkyFitnessServer/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AGENTS.md

*Last updated: 2026-03-13*
_Last updated: 2026-03-13_

SparkyFitness Server is the Node.js + Express 5 backend API for the SparkyFitness monorepo. This file is the package guide for `SparkyFitnessServer/`.

Expand All @@ -21,6 +21,7 @@ If a task also changes the frontend, mobile app, or `shared/`, read the relevant
- The codebase is mostly JavaScript. Current TypeScript islands are intentionally small and include `routes/v2/`, `schemas/`, and `types/`

Startup behavior matters in this package:

- `.env` is loaded from `../.env`
- file-based secrets are loaded through `utils/secretLoader.js`
- preflight env validation runs before the app boots
Expand Down Expand Up @@ -66,6 +67,7 @@ NODE_OPTIONS='--experimental-vm-modules' pnpm exec jest tests/mealRoutes.test.js
- `tests/`, `__mocks__/` - Jest tests and mocks

When searching, ignore noisy/generated directories unless you explicitly need them:

- `node_modules/`
- `coverage/`
- `uploads/`
Expand Down
499 changes: 249 additions & 250 deletions SparkyFitnessServer/SparkyFitnessServer.js

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions SparkyFitnessServer/ai/config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
function getDefaultModel(serviceType) {
switch (serviceType) {
case "openai":
case "openai_compatible":
return "gpt-4o-mini";
case "anthropic":
return "claude-3-5-sonnet-20241022";
case "google":
return "gemini-pro";
case "mistral":
return "mistral-large-latest";
case "groq":
return "llama3-8b-8192";
case "openrouter":
return "google/gemma-3-27b-it:free";
case 'openai':
case 'openai_compatible':
return 'gpt-4o-mini';
case 'anthropic':
return 'claude-3-5-sonnet-20241022';
case 'google':
return 'gemini-pro';
case 'mistral':
return 'mistral-large-latest';
case 'groq':
return 'llama3-8b-8192';
case 'openrouter':
return 'google/gemma-3-27b-it:free';
default:
return "gpt-3.5-turbo";
return 'gpt-3.5-turbo';
}
}

function getDefaultVisionModel(serviceType) {
switch (serviceType) {
case "openai":
case "openai_compatible":
return "gpt-4o-mini";
case "anthropic":
return "claude-3-5-sonnet-20241022";
case "google":
return "gemini-2.5-flash";
case "mistral":
return "pixtral-large-latest";
case "groq":
return "llama-3.2-11b-vision-preview";
case "openrouter":
return "google/gemini-2.5-flash";
case "ollama":
return "llava";
case 'openai':
case 'openai_compatible':
return 'gpt-4o-mini';
case 'anthropic':
return 'claude-3-5-sonnet-20241022';
case 'google':
return 'gemini-2.5-flash';
case 'mistral':
return 'pixtral-large-latest';
case 'groq':
return 'llama-3.2-11b-vision-preview';
case 'openrouter':
return 'google/gemini-2.5-flash';
case 'ollama':
return 'llava';
default:
return "gpt-4o-mini";
return 'gpt-4o-mini';
}
}

Expand Down
Loading
Loading