Skip to content

Commit

Permalink
refactor(WIP): dashboard stack to shacdn|tailwind|radix|tanstack
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Oct 7, 2024
1 parent d0d9d0d commit 9d77534
Show file tree
Hide file tree
Showing 194 changed files with 14,923 additions and 2,507 deletions.
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"
}
}
2 changes: 1 addition & 1 deletion apps/dashboard/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
1 change: 1 addition & 0 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"scripts": {
"dev": "next dev",
"dev:oss": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand Down
4 changes: 0 additions & 4 deletions apps/dashboard/src/app/(dashboard)/apps/development/page.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/dashboard/src/app/(dashboard)/apps/page.tsx

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion apps/dashboard/src/app/[domain]/(dashboard)/apps/page.tsx

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions apps/dashboard/src/app/admin/carrier_connections/page.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions apps/dashboard/src/app/admin/organization_accounts/page.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/dashboard/src/app/admin/page.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions apps/dashboard/src/app/admin/surcharges/page.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions apps/dashboard/src/app/admin/user_accounts/page.tsx

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion apps/dashboard/src/app/test/(dashboard)/apps/page.tsx

This file was deleted.

11 changes: 11 additions & 0 deletions apps/platform/.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/platform/.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/platform/.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/platform/.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/platform/.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/platform/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/platform/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);
27 changes: 27 additions & 0 deletions apps/platform/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@karrio/platform",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --port 3002",
"dev:platform": "next dev --port 3002",
"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",
"tailwindcss": "^3.4.1",
"eslint": "^8",
"eslint-config-next": "14.2.8",
"tsconfig": "*"
}
}
8 changes: 8 additions & 0 deletions apps/platform/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/platform/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/platform/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.
9 changes: 9 additions & 0 deletions apps/platform/public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
1 change: 1 addition & 0 deletions apps/platform/public/carriers/aramex_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions apps/platform/public/carriers/aramex_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/platform/public/carriers/australiapost_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions apps/platform/public/carriers/australiapost_logo.svg
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 9d77534

Please sign in to comment.