Skip to content

Commit

Permalink
Merge pull request #725 from karrioapi/karrio-2024.12-rc1
Browse files Browse the repository at this point in the history
[release-candidate] Karrio 2024.12 rc1
  • Loading branch information
danh91 authored Nov 27, 2024
2 parents da16f32 + b41c8a3 commit 762d075
Show file tree
Hide file tree
Showing 480 changed files with 100,717 additions and 42,522 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,32 @@ jobs:
docker push karrio/dashboard:${{ env.tag }}
docker tag karrio/dashboard:${{ env.tag }} karrio/dashboard:latest-rc
docker push karrio/dashboard:latest-rc
insiders-build:
needs: changes
if: ${{ needs.changes.outputs.version == 'true' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- id: get_tag
run: |
cat ./apps/api/karrio/server/VERSION
echo "tag=$(cat ./apps/api/karrio/server/VERSION)" >> "$GITHUB_ENV"
- name: Build insider server image
run: |
echo 'Build and push karrio-insiders server:${{ env.tag }}...'
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u USERNAME --password-stdin
./bin/build-insiders-image ${{ env.tag }} &&
docker push ghcr.io/karrioapi/server:${{ env.tag }} || exit 1
- name: Build insider dashboard image
run: |
echo 'Build and push karrio-insiders dashboard:${{ env.tag }}...'
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u USERNAME --password-stdin
KARRIO_IMAGE=ghcr.io/karrioapi/dashboard ./bin/build-dashboard-image ${{ env.tag }} &&
docker push ghcr.io/karrioapi/dashboard:${{ env.tag }} || exit 1
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,16 @@ apps/api/karrio/server/staticfiles/*
.karrio/
packages/karriojs/api/generated
!docker/.env

# Meta-repo private directories
meta/private/

# Testing
coverage/
.coverage
htmlcov/
.pytest_cache/

# Temporary files
*.tmp
*.backup
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "insiders"]
path = ee/insiders
url = [email protected]:karrioapi/karrio-insiders.git
[submodule "ee/platform"]
path = ee/platform
url = [email protected]:karrioapi/karrio-platform.git
20 changes: 0 additions & 20 deletions .vscode/karrio.code-workspace

This file was deleted.

48 changes: 48 additions & 0 deletions .vscode/workspace.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"folders": [
{
"name": "📦 Karrio (Root)",
"path": ".."
},
{
"name": "🔒 Karrio Insiders",
"path": "../ee/insiders"
},
{
"name": "🏢 Karrio Platform",
"path": "../ee/platform"
}
],
"settings": {
"files.exclude": {
"**/node_modules": true,
"**/__pycache__": true,
"**/*.pyc": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"editor.formatOnPaste": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"editor.formatOnSave": true,
"python.defaultInterpreterPath": "../.venv/karrio",
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/templates/**/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
"python.analysis.autoImportCompletions": true,
},
"extensions": {
"recommendations": [
"ms-python.python",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"github.copilot"
]
}
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Karrio 2024.12-rc1

## Changes

### Feat

- feat(WIP): introduce new customizable dashboard with a new stack shacdn|tailwind|radix|tanstack
- feat: Introduce advanced Karrio CLI features with API connectivity and data query
- feat: make rate limit configurable using env vars (#589)

### Fix

- fix:`usps` API proxy and payment authentication (#709)
- fix: version freeze git reference for `dockerless` install (#721)
- fix: invalid reference useSystemConnection causing permission error (#706)
- fix: Consolidate`fedex` duties payor definition with missing account number with live tests (#718, #697)
- fix: issue with `shipping_date` and `shipment_date` being set to None and options getting overridden

# Karrio 2024.9.15

## Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/api/karrio/server/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.9.15
2024.12-rc1
12 changes: 8 additions & 4 deletions apps/api/karrio/server/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@
"karrio.server.core.permissions.AllowEnabledAPI",
]


# Rate limiting configuration
# Set these environment variables to customize rate limits:
# - ANON_RATE_LIMIT: Rate limit for anonymous users (default: "60/minute")
# - USER_RATE_LIMIT: Rate limit for authenticated users (default: "600/minute")
# - CARRIER_REQUEST_RATE_LIMIT: Rate limit for carrier requests (default: "300/minute")
REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES": PERMISSION_CLASSES,
"DEFAULT_AUTHENTICATION_CLASSES": AUTHENTICATION_CLASSES,
Expand All @@ -421,9 +425,9 @@
"rest_framework.throttling.ScopedRateThrottle",
),
"DEFAULT_THROTTLE_RATES": {
"anon": "60/minute",
"user": "600/minute",
"carrier_request": "300/minute",
"anon": config("ANON_RATE_LIMIT", default="60/minute"),
"user": config("USER_RATE_LIMIT", default="600/minute"),
"carrier_request": config("CARRIER_REQUEST_RATE_LIMIT", default="300/minute"),
},
"DEFAULT_FILTER_BACKENDS": ("django_filters.rest_framework.DjangoFilterBackend",),
"EXCEPTION_HANDLER": "karrio.server.core.exceptions.custom_exception_handler",
Expand Down
16 changes: 9 additions & 7 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "api",
"version": "1.0.0",
"scripts": {
"dev": "cd ../..; ./bin/start-server"
}
}
{
"name": "@karrio/api",
"version": "1.0.0",
"scripts": {
"dev": "cd ../..; ./bin/start-server",
"dev:oss": "cd ../..; ./bin/start-server",
"dev:platform": "cd ../..; ./bin/start-server"
}
}
11 changes: 11 additions & 0 deletions apps/board/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[*]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
19 changes: 19 additions & 0 deletions apps/board/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# karrio dashboard environment variables
NEXT_PUBLIC_DASHBOARD_VERSION=2024.X

# karrio server
# KARRIO_URL=http://localhost:5002
NEXT_PUBLIC_KARRIO_PUBLIC_URL=http://localhost:5002

# Required for MULTI_TENANT
NEXT_PUBLIC_MULTI_TENANT=false
KARRIO_ADMIN_API_KEY=XXX

# next-auth config
NEXTAUTH_URL=http://localhost:3002
# NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET="n*s-ex6@ex_r1i%bk=3jd)p+lsick5bi*90!mbk7rc3iy_op1r"

# Sentry
# NEXT_PUBLIC_SENTRY_DSN=https://xxxxx
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
4 changes: 4 additions & 0 deletions apps/board/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["next", "next/core-web-vitals"],
}
2 changes: 2 additions & 0 deletions apps/board/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
36 changes: 36 additions & 0 deletions apps/board/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions apps/board/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
44 changes: 44 additions & 0 deletions apps/board/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { withSentryConfig } from "@sentry/nextjs";
import path from "path";

const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || "";

/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: BASE_PATH,
reactStrictMode: true,
transpilePackages: [
"@karrio/core",
"@karrio/hooks",
"@karrio/ui",
"@karrio/lib",
"@karrio/types",
"@karrio/insiders",
],
sentry: {
disableServerWebpackPlugin: true,
disableClientWebpackPlugin: true,
},
sassOptions: {
includePaths: [path.join("src", "app", "styles")],
},
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.externals.push("pino-pretty", "encoding");
return config;
},
};

const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore

silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};

export default withSentryConfig(nextConfig, sentryWebpackPluginOptions);
26 changes: 26 additions & 0 deletions apps/board/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@karrio/board",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --port 3002",
"dev:board": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@karrio/core": "*",
"@karrio/hooks": "*",
"@karrio/lib": "*",
"@karrio/types": "*",
"@karrio/ui": "*",
"@karrio/insiders": "*"
},
"devDependencies": {
"postcss": "^8",
"eslint": "^8",
"eslint-config-next": "14.2.8",
"tsconfig": "*"
}
}
8 changes: 8 additions & 0 deletions apps/board/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
Binary file added apps/board/public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/board/public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 762d075

Please sign in to comment.