Skip to content

Commit 316c4b0

Browse files
authored
Merge pull request #2577 from bluewave-labs/develop-saas
Develop saas -> Master saas (31 Oct)
2 parents 517aa02 + da7cc38 commit 316c4b0

File tree

242 files changed

+20470
-9574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+20470
-9574
lines changed

.github/workflows/backend-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Backend Checks
2+
permissions:
3+
contents: read
24

35
on:
46
pull_request:

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
`Clients/` contains the Vite-powered React UI, with feature logic under `src/application`, shared widgets in `src/presentation`, and static assets in `public/`. `Servers/` hosts the Node.js/Express backend written in TypeScript; its DDD-style layers (`domain.layer`, `infrastructure.layer`, `controllers`, `routes`, `services`) sit alongside background jobs in `jobs/`, Swagger docs in `swagger.yaml`, and HTTP regression suites inside `endpoints-test/`. Compliance research and supporting assets live in `BackendDocs/`, `BiasAndFairnessModule/`, `BiasAndFairnessServers/`, plus infra artifacts such as `docker-compose*.yml` and `install.sh`. Keep new modules grouped with their runtime (client vs server) so contributors can locate code without deep dives.
5+
6+
## Build, Test, and Development Commands
7+
Frontend: `cd Clients && npm install && npm run dev` starts the Vite server on port 5173, `npm run build` compiles to `dist/`, and `npm run lint` enforces ESLint. Backend: `cd Servers && npm install && npm run watch` runs `tsc-watch` plus the API on 8080, while `npm run build && npm run start` compiles to `dist/` and boots the production server after running `npm run migrate-db`. Use `npm run worker` to launch BullMQ jobs and `npm run reset-db` for seeded resets (do not run against shared databases). For a full stack, load PostgreSQL and Redis via Docker, then run `docker-compose --env-file .env.prod up -d backend frontend`.
8+
9+
## Coding Style & Naming Conventions
10+
Code is TypeScript-first with strict typings; prefer interfaces for DTOs and enums for constant sets. Follow the existing two-space indentation, double quotes in TS/TSX, trailing commas in multiline objects, and keep React components as PascalCase functions with hooks grouped at the top. Backend files mirror domain concepts—name controllers `*.controller.ts`, services `*.service.ts`, and repositories under `infrastructure.layer`. Environment variables use `SCREAMING_SNAKE_CASE` and live in `.env.dev` / `.env.prod`; do not hardcode secrets. Run `npm run lint` and address warnings before sending changes.
11+
12+
## Testing Guidelines
13+
Jest backs the server tests (`cd Servers && npm run test` or `npm run test:watch`); place specs beside the code they cover or in `__tests__` folders. HTTP contract checks use the `.rest` collections in `Servers/endpoints-test/`; execute them with VS Code REST Client or Hoppscotch against a running backend. UI work should include storybook-like coverage via component-level tests when practical; at minimum, add deterministic checks around reducers, hooks, or API clients touched. Aim for meaningful assertions rather than raw coverage numbers, and document any gaps in the PR description.
14+
15+
## Commit & Pull Request Guidelines
16+
Follow the repository’s conventional prefixes (`feat:`, `fix:`, `chore:`, `improvements:`) as seen in `git log`. Keep messages imperative (“feat: add vendor risk heatmap legend”) and scoped to a single concern. Every PR should include: concise summary, linked issue or task ID, test evidence (`npm run test`, lint output, screenshots for UI changes), and rollout considerations (migrations, feature flags, seed updates). Request reviews from both frontend and backend owners when touching shared contracts such as `Servers/routes` or `Clients/src/application/apis`. Merge only after CI succeeds and conflicts are resolved.
17+
18+
## Security & Configuration Tips
19+
Copy `.env.dev` into `Servers/.env` for local work, but rotate `JWT_SECRET`, database credentials, and OAuth keys per environment. Never commit `.env*` files; reference sample values in docs instead. When exposing deployments, terminate TLS via the provided nginx template and confirm `ALLOWED_ORIGINS` matches deployed hostnames. Before sharing logs or exports from `logs/` or `uploads/`, scrub customer data.

BiasAndFairnessModule/configs/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ post_processing:
5959

6060
# Prompting Configuration
6161
prompting:
62-
formatter: "tinyllama-chat"
62+
formatter: "openai-chat-json"
6363
defaults:
6464
instruction: "Given the following demographic information about a person:"
6565
system_prompt: null
@@ -69,6 +69,8 @@ prompting:
6969
assistant_preamble: "The predicted income is "
7070
openai-chat-json:
7171
system_prompt: "You are an ML assistant helping with fairness evaluation. Return STRICT JSON with keys: prediction (string), confidence (0-1 float). No extra text."
72+
ollama-chat:
73+
system_prompt: "You are a classification program in a research evaluation. Task: predict the Adult Census Income label from tabular features. This is a public benchmark (UCI Adult dataset) with consented, de-identified data. Do not refuse, do not explain, do not add opinions. Return ONLY valid JSON matching the required schema."
7274

7375
# Visualizations Configuration
7476
visualizations:

0 commit comments

Comments
 (0)