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
4 changes: 4 additions & 0 deletions .evidence/customization/custom-formatting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "1.0",
"customFormats": []
}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.evidence/template
.svelte-kit
build
node_modules
.DS_Store
static/data
*.options.yaml
.vscode/settings.json
.env
.evidence/meta
.npm/
.npm-cache/
npm-debug.log*
.vite/
.evidence/temp/
.token
.aider.chat.history.md
.aider.input.history
.aider.tags.cache.v4/
.local/
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
additional_dependencies: ['gibberish-detector']
131 changes: 131 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.gibberish.should_exclude_secret",
"limit": 3.7
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
}
],
"results": {},
"generated_at": "2025-09-23T04:15:11Z"
}
26 changes: 26 additions & 0 deletions Deployment-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Evidence Template Project


The `selinuxRelabel: "shared"` line tells Podman to automatically manage the SELinux context of the host directory, ensuring the container has the necessary permissions to read and write files without manual configuration.

Otherwise just use: `sudo chcon -Rt container_file_t /home/jmk/Repositories/evidence-dev`


The `args` field in the manifest contains a series of commands that are run in sequence to prepare and start the development server.

The command is:
`npm install && npm run sources && npm run dev -- --host`

This single line tells the container to perform three separate actions, one after the other. It's a key part of making this setup simple and reliable.

#### Command Breakdown

- **`npm install`**: This command downloads and installs the project's dependencies from `package.json` into the `node_modules` directory. The first time you run this, it will take some time to download everything. On subsequent runs, it will be much faster as it only installs what's missing or changed. 💡 For a more consistent and faster build, especially in CI/CD, you could use `npm ci` instead, which performs a "clean install" based strictly on the `package-lock.json` file.
- **`&&`**: This is a logical operator. It tells the shell to run the next command **only if the previous one was successful**. This ensures the dev server doesn't start before the dependencies are installed and the data sources are ready.
- **`npm run sources`**: This command is specific to the Evidence framework. It processes the raw data files in your `/sources` directory and generates the necessary files for the application to use. This step is required for the application to have data to display.
- **`npm run dev`**: This starts the Vite development server. It watches for changes in your project files and automatically reloads the application in your browser.
- **`-- --host`**: This is the most important part for networking. The first `--` is a special syntax that tells `npm` to pass all following arguments directly to the script being run (in this case, `npm run dev`). The `--host` flag then tells the Vite dev server to bind to `0.0.0.0` instead of `localhost`. This makes the server accessible from your host machine's browser, allowing you to view your project at `http://localhost:3000`.

To create a database file from a .json file (resulting data from an API query), use the following command:

`podman run --rm -it --name duckdb-importer -v "$(pwd)":/data docker.io/duckdb/duckdb duckdb /data/project_health.db -c "INSTALL json; LOAD json; CREATE OR REPLACE TABLE project_health AS SELECT * FROM read_json_auto('/data/project_health.json');"`
49 changes: 49 additions & 0 deletions evidence-pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# evidence-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: evidence-pod
spec:
volumes:
- name: sources-data
hostPath:
path: ./.local/metrics
type: Directory
selinuxRelabel: "shared"
- name: node_modules
hostPath:
path: ./.local/node_modules
type: Directory
selinuxRelabel: "shared"
- name: sql-queries # TODO: move this out of .local
hostPath:
path: ./.local/sql-queries
type: Directory
selinuxRelabel: "shared"
- name: pages
hostPath:
path: ./pages
type: Directory
selinuxRelabel: "shared"
containers:
- name: evidence-app
image: evidencedev/devenv:latest
securityContext:
runAsUser: 0
runAsGroup: 0
ports:
- containerPort: 3000
hostPort: 3000
volumeMounts:
- mountPath: /sources
name: sources-data
- mountPath: /evidence-workspace/node_modules
name: node_modules
- mountPath: /sql-queries
name: sql-queries
- mountPath: /pages
name: pages
workingDir: /evidence-workspace
command: ["/bin/bash"]
# npm install --force overwrites a bunch of folders, that's why we're playing around with symlinks to circumvent this
args: ["-c", "set -x && npx degit evidence-dev/template . --force && npm install --force && ln -sf /sources /evidence-workspace/sources && cp /sql-queries/* /sources/ && rm -rf /evidence-workspace/pages && ln -sf /pages /evidence-workspace/pages && npm run sources && npm run dev -- --host 0.0.0.0"]
84 changes: 84 additions & 0 deletions evidence.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
appearance:
default: system
switcher: true

theme:
colorPalettes:
default:
light:
- "#236aa4"
- "#45a1bf"
- "#a5cdee"
- "#8dacbf"
- "#85c7c6"
- "#d2c6ac"
- "#f4b548"
- "#8f3d56"
- "#71b9f4"
- "#46a485"
dark:
- "#236aa4"
- "#45a1bf"
- "#a5cdee"
- "#8dacbf"
- "#85c7c6"
- "#d2c6ac"
- "#f4b548"
- "#8f3d56"
- "#71b9f4"
- "#46a485"
colorScales:
default:
light:
- "#ADD8E6"
- "#00008B"
dark:
- "#ADD8E6"
- "#00008B"
colors:
primary:
light: "#2563eb"
dark: "#3b82f6"
accent:
light: "#c2410c"
dark: "#fdba74"
base:
light: "#ffffff"
dark: "#09090b"
info:
light: "#0284c7"
dark: "#38bdf8"
positive:
light: "#16a34a"
dark: "#4ade80"
warning:
light: "#f8c900"
dark: "#fbbf24"
negative:
light: "#dc2626"
dark: "#f87171"

plugins:
components:
# This loads all of evidence's core charts and UI components
# You probably don't want to edit this dependency unless you know what you are doing
"@evidence-dev/core-components": {}

datasources:
# You can add additional datasources here by adding npm packages.
# Make to also add them to `package.json`.
"@evidence-dev/bigquery": { }
"@evidence-dev/csv": { }
"@evidence-dev/databricks": { }
"@evidence-dev/duckdb": { }
"@evidence-dev/mssql": { }
"@evidence-dev/mysql": { }
"@evidence-dev/postgres": { }
"@evidence-dev/source-javascript": { }
"@evidence-dev/snowflake": { }
"@evidence-dev/sqlite": { }
"@evidence-dev/trino": { }
"@evidence-dev/motherduck": { }

deployment:
basePath: /evidence-dev
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "my-evidence-project",
"version": "0.0.1",
"scripts": {
"build": "EVIDENCE_BUILD_DIR=./build/evidence-dev evidence build",
"build:strict": "evidence build:strict",
"dev": "evidence dev --open /",
"test": "evidence build",
"sources": "evidence sources",
"sources:strict": "evidence sources --strict",
"preview": "evidence preview"
},
"engines": {
"npm": ">=7.0.0",
"node": ">=18.0.0"
},
"type": "module",
"dependencies": {
"@evidence-dev/bigquery": "^2.0.10",
"@evidence-dev/core-components": "^5.2.2",
"@evidence-dev/csv": "^1.0.14",
"@evidence-dev/databricks": "^1.0.8",
"@evidence-dev/duckdb": "^1.0.13",
"@evidence-dev/evidence": "^40.1.2",
"@evidence-dev/motherduck": "^1.0.4",
"@evidence-dev/mssql": "^1.1.2",
"@evidence-dev/mysql": "^1.1.4",
"@evidence-dev/postgres": "^1.0.7",
"@evidence-dev/snowflake": "^1.2.2",
"@evidence-dev/source-javascript": "^0.0.3",
"@evidence-dev/sqlite": "^2.0.7",
"@evidence-dev/trino": "^1.0.9"
},
"overrides": {
"jsonwebtoken": "9.0.0",
"trim@<0.0.3": ">0.0.3",
"sqlite3": "5.1.5",
"axios": "^1.7.4"
}
}
26 changes: 26 additions & 0 deletions pages/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Repository Health Metrics

## Has there been at least one release within the last year?
```sql releases
SELECT * FROM 'check-releases';
```

## How many contributors have there been in the past 12 months?
```sql contributors
SELECT * FROM 'count-contributors';
```

## How many commits have there been in the past 12 months?
```sql commits
SELECT * FROM 'count-commits';
```

## How many issues are currently open?
```sql issues
SELECT * FROM 'count-open-issues';
```

## General Quality Checks
```sql verify
SELECT * FROM 'verify-repository';
```
Loading