Skip to content

Commit 0c92140

Browse files
authored
Merge pull request #869 from karrioapi/karrio-preview-2025.5rc23
Karrio preview 2025.5rc23
2 parents dd4866a + 8bcb5aa commit 0c92140

File tree

79 files changed

+3371
-1016
lines changed

Some content is hidden

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

79 files changed

+3371
-1016
lines changed

.env.grafana-test

Lines changed: 0 additions & 25 deletions
This file was deleted.

.env.sample

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
# Core Server Settings
66
DEBUG_MODE=True
77
ADMIN_DASHBOARD=True
8-
ALLOWED_HOSTS=*,localhost,127.0.0.1
8+
ALLOWED_HOSTS=*,localhost,127.0.0.1,api.karrio.local,app.karrio.local,karrio.local
99
SECRET_KEY="n*s-ex6@ex_r1i%bk=3jd)p+lsick5bi*90!mbk7rc3iy_op1r"
1010
USE_HTTPS=False
11+
CSRF_TRUSTED_ORIGINS=http://localhost:5002,https://api.karrio.local,https://app.karrio.local
1112

1213
# Database Configuration (SQLite for Development)
1314
DATABASE_NAME=db.sqlite3
@@ -34,10 +35,10 @@ WORK_DIR=.karrio
3435
OIDC_RSA_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIBAAKCAgEA92+93Tyg6UvetkT0Li+RtjjeQX7mHMzvOL+HllDTfXAeh9GB\nlrgGrFR5ZTjtrmWiG3ditK3JoJGrVY4B0lFRi7d3nl8gPDR03bALEIfrB0TtiYGB\nTQ92sGBKmlRKAmAhTVXeWK+l5wdj7w8Lcoso3rpLFYSllcoJwDQ5qeP/wzJd0iYr\nyZpasx1huQZcOd/yP7Cvb9LAH8Nwqgk4WCbxHcmUVjUm1A5rNJYKCKM5uC6JvMGb\nm2mR/81SoPgU4qaW/v+L5chJoxnl7vWazKSjWcn2HkZIGshPFqpQpobIZhngC5/A\nXlXntf5CpYcauWPT3qvNJZxxJUPzziwyYFknxE72iURCSBNnGLYqDEjIHplFeTdU\nB40dsE7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MdgmzWj1s5Ctg1nwzH\n946EiX+fI/zfmDmVenySt3QqFXLFhR+TYJFSd3Q8WU2LlKtzsaiOV9H2LyuFDBu2\nlp0spsnrS0hAYw45zrgHtpU6wVpZpzNqxwMK7tv7nJ2fMyS+wPQt5uPHvrCXrxL7\nrFJMMCcN0JsoPsYzsshopQJKuFh2J8PzhOXlhJmj1OMmZfHQey4OsRRW+ZlqhYc0\nR6p0ZkjA+T9/aUeoOLWiuQkBKiwsXwMIM0B3krdDko5bx2PnobS7j+cDJk9qiKsF\nS1YVrA9Pq+gZ49OS9p2Gux/VO9tyzk43AoIBAQCxl3RcyaE0JWVByVhaA4Ej+zr4\nlD4UcJsjxPkW5a2k8d3xa63IDBU2yehZNGwQmmc1Y/DoQNMiO+Zagj4gawUWZRcf\nO6YSEHNhPzKMLIxFxpAXYTEcdpwgQ+eWrLP5EvAT2qyqC9Y1CnY6lyT8tLuZkrxv\nGc41na1aSr0FF2EIEzcDgxYWDSvfx2G/k23t7qIcLxYcyFhyvIyCN0JrtvcBB7zy\nALTL9QubmLGZaN+igOfDImdvDVO/BV4GV74OiGFJu1pAStiNmkmlK2J+wI9n3iHT\n3/1coqkpWG7gBcA/Exhh4oDjoaKEE00nPJ1m5Q0a65eb4kG4n2bx116hdZb4\n-----END RSA PRIVATE KEY-----"
3536

3637
# Email Configuration (Optional)
37-
# EMAIL_PORT=1025
38-
# EMAIL_USE_TLS=false
39-
# EMAIL_HOST=maildev
40-
# EMAIL_HOST_USER=admin@example.com
38+
EMAIL_PORT=1025
39+
EMAIL_USE_TLS=false
40+
EMAIL_HOST=localhost
41+
EMAIL_HOST_USER=admin@example.com
4142

4243
# Redis Configuration (Optional)
4344
# REDIS_HOST=localhost

.github/workflows/tests.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- name: Checkout submodules
1818
run: |
19-
git submodule sync --recursive
20-
git submodule update --init --recursive || true
21-
# Continue even if some submodules fail due to permissions
22-
git submodule foreach --recursive 'git submodule update --init || true'
19+
git submodule update --init community
2320
- name: Run Tests
2421
run: |
2522
./bin/setup-sdk-env -v &&
@@ -37,10 +34,7 @@ jobs:
3734
- uses: actions/checkout@v2
3835
- name: Checkout submodules
3936
run: |
40-
git submodule sync --recursive
41-
git submodule update --init --recursive || true
42-
# Continue even if some submodules fail due to permissions
43-
git submodule foreach --recursive 'git submodule update --init || true'
37+
git submodule update --init community
4438
- name: Run Tests
4539
env:
4640
ENABLE_ALL_PLUGINS_BY_DEFAULT: true
@@ -57,10 +51,7 @@ jobs:
5751
- uses: actions/checkout@v2
5852
- name: Checkout submodules
5953
run: |
60-
git submodule sync --recursive
61-
git submodule update --init --recursive || true
62-
# Continue even if some submodules fail due to permissions
63-
git submodule foreach --recursive 'git submodule update --init || true'
54+
git submodule update --init community
6455
- uses: actions/setup-node@v3
6556
with:
6657
node-version: 22.x

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- Runtime apps live under `apps/`: `apps/api` hosts the Django service, `apps/dashboard` and `apps/web` power the Next.js UIs, and `apps/www` serves public marketing pages.
5+
- Shared Python code is grouped in `modules/` (core logic, connectors, pricing, etc.), while shared TypeScript utilities live in `packages/`; carrier extensions live in `plugins/` and community-maintained variants sit in `community/`.
6+
- Automation scripts live in `bin/`, and container workflows use the manifests in `docker/` alongside `docker-compose.yml`.
7+
8+
## Build, Test, and Development Commands
9+
- Bootstrap once with `./bin/setup-dev-env` to create the Python virtualenv and install common tooling.
10+
- Run `./bin/start-dev` to launch the API (port 5002) and dashboard (port 3002); `npm run dev -w @karrio/dashboard` targets the dashboard alone, and `docker compose up` inside `docker/` brings up the full stack.
11+
- Front-end builds flow through Turbo: `npm run build` executes `turbo run build`, and `npm run lint` fans out ESLint across all workspaces.
12+
13+
## Coding Style & Naming Conventions
14+
- Python follows PEP 8 with 4-space indentation—format via `black` and keep typing clean with `mypy` (both listed in `requirements.dev.txt`).
15+
- Use snake_case for modules/functions (e.g., `modules/pricing/rate.py`) and PascalCase for classes; mirror existing mapper naming in `modules/connectors`.
16+
- TypeScript and React code are formatted with Prettier (`npm run format`) and linted through `packages/eslint-config-custom`; prefer 2-space indentation and explicit exports.
17+
18+
## Testing Guidelines
19+
- Activate the environment with `source bin/activate-env` before invoking tests.
20+
- Run `./bin/run-server-tests` for the API suites; carrier adapters must stay on Python's `unittest` with canonical files like `test_rate.py` and classes shaped as `Test<Carrier><Feature>`.
21+
- Validate connectors via `python -m unittest discover -v -f modules/connectors/<carrier>/tests`, and guard SDK changes with `./bin/run-sdk-tests`; include the debug prints and tuple assertions mandated in `CARRIER_INTEGRATION_GUIDE.md`.
22+
23+
## Commit & Pull Request Guidelines
24+
- Keep commits focused and follow the short `type: summary` style already used (`fix:`, `feat:`, `chore:`); reference issues with `refs #123` or `fixes #123`.
25+
- Rebase on `main`, rerun lint/test commands, and attach screenshots or CLI transcripts whenever behaviour changes.
26+
- Fill out the PR template, link discussions, enable "Allow edits from maintainers," and list the verification steps reviewers can replay.
27+
28+
## Configuration Tips
29+
- Workspace-specific `.env` files drive local overrides; duplicate provided templates and never commit secrets.
30+
- Use `./bin/create-new-env` when you need a fresh sample configuration, and load additional variables through Docker compose overrides or CI secrets to keep builds reproducible.

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# Karrio 2025.5rc23
2+
3+
## Changes
4+
5+
### Feat
6+
7+
- feat: adds a button to copy docs pages for LLMs
8+
9+
### Fix
10+
11+
- fix: redirection issue when signin page is accessed directly
12+
- fix: the readability of certain features on the documentation when in dark mode
13+
14+
### Chore
15+
16+
- chore: set up Posthog for docs analytics
17+
18+
### DevX
19+
20+
- devx: prevent node constant override to latest version and set a minimum version for karrio development
21+
- devx: debugging and improving dev and HTTPS support both for development and production deployment
22+
- devx: introduce AGENTS.md using cursor
23+
124
# Karrio 2025.5rc22
225

326
## Changes

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ We <3 contributions big and small. In priority order (although everything is app
109109

110110
- Ask general question on [Github Discussions](https://github.com/orgs/karrioapi/discussions)
111111
- Submit a [feature request](https://github.com/orgs/karrioapi/discussions)
112+
- Review the [Repository Guidelines](AGENTS.md) for project-specific conventions
112113
- Open a PR (see our instructions on [developing Karrio locally](https://docs.karrio.io/contributing/development))
113114

114115
### Contributors

apps/api/karrio/server/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.5rc22
1+
2025.5rc23

apps/dashboard/.env.https

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# =============================================================================
2+
# KARRIO DASHBOARD CONFIGURATION - HTTPS LOCAL DEVELOPMENT
3+
# =============================================================================
4+
5+
# Core Dashboard Settings
6+
NEXT_PUBLIC_DASHBOARD_VERSION=2025.X
7+
8+
# =============================================================================
9+
# SERVER INTEGRATION
10+
# =============================================================================
11+
12+
# Karrio API Server Configuration - HTTPS Local Domains
13+
KARRIO_URL=https://api.karrio.local
14+
NEXT_PUBLIC_KARRIO_PUBLIC_URL=https://api.karrio.local
15+
16+
# =============================================================================
17+
# AUTHENTICATION CONFIGURATION
18+
# =============================================================================
19+
20+
# Next.js Authentication Settings - HTTPS Local Domains
21+
AUTH_TRUST_HOST=true
22+
NEXTAUTH_URL=https://app.karrio.local
23+
NEXTAUTH_SECRET="n*s-ex6@ex_r1i%bk=3jd)p+lsick5bi*90!mbk7rc3iy_op1r"
24+
JWT_APP_SECRET_KEY="n*s-ex6@ex_r1i%bk=3jd)p+lsick5bi*90!mbk7rc3iy_op1r"
25+
26+
# =============================================================================
27+
# MULTI-TENANCY CONFIGURATION
28+
# =============================================================================
29+
30+
# Multi-tenant Settings (Enterprise)
31+
NEXT_PUBLIC_MULTI_TENANT=false
32+
KARRIO_ADMIN_API_KEY=XXX
33+
34+
# =============================================================================
35+
# THIRD-PARTY INTEGRATIONS
36+
# =============================================================================
37+
38+
# Address Autocomplete Service
39+
NEXT_PUBLIC_ADDRESS_AUTO_COMPLETE_SERVICE=google # values: canadapost, google
40+
NEXT_PUBLIC_ADDRESS_AUTO_COMPLETE_SERVICE_KEY=xxxxxxxxxxx
41+
42+
# =============================================================================
43+
# ERROR TRACKING & MONITORING
44+
# =============================================================================
45+
46+
# Sentry Configuration
47+
# NEXT_PUBLIC_SENTRY_DSN=https://xxxxx
48+
SENTRY_IGNORE_API_RESOLUTION_ERROR=1

apps/dashboard/.env.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# =============================================================================
2-
# KARRIO DASHBOARD CONFIGURATION
2+
# KARRIO DASHBOARD CONFIGURATION - LOCAL DEVELOPMENT
33
# =============================================================================
44

55
# Core Dashboard Settings
@@ -9,15 +9,15 @@ NEXT_PUBLIC_DASHBOARD_VERSION=2025.X
99
# SERVER INTEGRATION
1010
# =============================================================================
1111

12-
# Karrio API Server Configuration
13-
# KARRIO_URL=http://localhost:5002
12+
# Karrio API Server Configuration - Localhost
13+
KARRIO_URL=http://localhost:5002
1414
NEXT_PUBLIC_KARRIO_PUBLIC_URL=http://localhost:5002
1515

1616
# =============================================================================
1717
# AUTHENTICATION CONFIGURATION
1818
# =============================================================================
1919

20-
# Next.js Authentication Settings
20+
# Next.js Authentication Settings - Localhost
2121
AUTH_TRUST_HOST=true
2222
NEXTAUTH_URL=http://localhost:3002
2323
NEXTAUTH_SECRET="n*s-ex6@ex_r1i%bk=3jd)p+lsick5bi*90!mbk7rc3iy_op1r"

apps/dashboard/next.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { withSentryConfig } from "@sentry/nextjs";
33
import { readdirSync, statSync } from "fs";
44
import { fileURLToPath } from "url";
55
import path from "path";
6-
76
const __dirname = path.dirname(fileURLToPath(import.meta.url));
87
const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || "";
98

0 commit comments

Comments
 (0)