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
12 changes: 6 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

## Scope

- [ ] `dashbore-api` (`apps/api/`)
- [ ] `dashbore-ui` (`apps/ui/`)
- [ ] `dashbore-common` (`packages/common/`)
- [ ] `dashbore-database` (`packages/database/`)
- [ ] `dashbore-business` (`packages/business/`)
- [ ] `dashbore-cache` (`packages/cache/`)
- [ ] `@dashbore/api` (`apps/api/`)
- [ ] `@dashbore/ui` (`apps/ui/`)
- [ ] `@dashbore/common` (`packages/common/`)
- [ ] `@dashbore/database` (`packages/database/`)
- [ ] `@dashbore/business` (`packages/business/`)
- [ ] `@dashbore/cache` (`packages/cache/`)
- [ ] Root / config

## Changes
Expand Down
18 changes: 9 additions & 9 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "dashbore-api",
"name": "@dashbore/api",
"module": "src/index.ts",
"type": "module",
"private": true,
"scripts": {
"dev:debug": "bun run --inspect src/index.ts",
"build": "bun build src/index.ts --outfile dist/index.js --target=bun",
"start": "bun run dist/index.js",
"postinstall": "bun run --filter=dashbore-database generate",
"dev": "bun run --filter=dashbore-database generate && bun run migrate && bun run --watch src/index.ts",
"postinstall": "bun run --filter=@dashbore/database generate",
"dev": "bun run --filter=@dashbore/database generate && bun run migrate && bun run --watch src/index.ts",
"test": "cross-env NODE_ENV=test bun run migrate && bun run seed && bun test --preload ./tests/preload.ts",
"migrate": "bun run --filter=dashbore-database migrate",
"seed": "bun run --filter=dashbore-database seed"
"migrate": "bun run --filter=@dashbore/database migrate",
"seed": "bun run --filter=@dashbore/database seed"
},
"devDependencies": {
"@types/bun": "latest",
Expand All @@ -25,11 +25,11 @@
"dependencies": {
"@hono/swagger-ui": "^0.5.1",
"@hono/zod-validator": "^0.4.3",
"@dashbore/business": "workspace:*",
"@dashbore/cache": "workspace:*",
"@dashbore/common": "workspace:*",
"@dashbore/database": "workspace:*",
"colorette": "^2.0.20",
"dashbore-business": "workspace:*",
"dashbore-cache": "workspace:*",
"dashbore-common": "workspace:*",
"dashbore-database": "workspace:*",
"hono": "^4.7.6",
"hono-openapi": "^0.4.6",
"zod": "^3.24.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import appFactory from "./factory/app.factory";
import useOpenApi from "./middleware/openapi.middleware";

import PermissionService from "@business/services/permission/permission.service";
import { PermissionService } from "@business/services/permission/permission.service";

import authRoute from "./routes/auth/auth.route";
import userRoute from "./routes/users/users.route";
Expand Down
6 changes: 3 additions & 3 deletions apps/api/src/middleware/auth.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import TokenService from "@business/services/token/token.service";
import UserService from "@business/services/user/user.service";
import UserUtil from "@business/util/user.util";
import { TokenService } from "@business/services/token/token.service";
import { UserService } from "@business/services/user/user.service";
import { UserUtil } from "@business/util/user.util";
import type { Context, Next } from "hono";
import { HTTPException } from "hono/http-exception";

Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/routes/auth/auth.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { createOpenApiPathBuilder } from "@/builder/openapi/openapi.builder";
import appFactory from "@/factory/app.factory";
import responseFactory from "@/factory/response.factory";
import AuthMiddleware from "@/middleware/auth.middleware";
import AuthService from "@business/services/auth/auth.service";
import TokenService from "@business/services/token/token.service";
import { AuthService } from "@business/services/auth/auth.service";
import { TokenService } from "@business/services/token/token.service";
import type { NormalizedUser } from "@business/services/user/user.service";
import { AuthValidation } from "@common/index";
import { zValidator } from "@hono/zod-validator";
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/routes/users/users.route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createOpenApiPathBuilder } from "@/builder/openapi/openapi.builder";
import PaginationBuilder from "@/builder/pagination/pagination.builder";
import RedisCache from "@cache/core/cache/redis.cache";
import CorePermissionKey from "@business/core/permission/core.permission";
import { RedisCache } from "@cache/core/cache/redis.cache";
import { CorePermissionKey } from "@business/core/permission/core.permission";
import appFactory from "@/factory/app.factory";
import PaginationUtil from "@/util/pagination.util";
import getPrismaClient from "@/util/prisma.util";
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/core/cache/cache.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RedisCache from "@cache/core/cache/redis.cache";
import { RedisCache } from "@cache/core/cache/redis.cache";
import { afterEach, describe, expect, test } from "bun:test";

describe("Redis Cache", () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/factory/redis.factory.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RedisFactory from "@cache/factory/redis.factory";
import { RedisFactory } from "@cache/factory/redis.factory";
import { describe, expect, test } from "bun:test";

describe("Redis Factory", () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/middleware/auth.middleware.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import appFactory from "@/factory/app.factory";
import AuthMiddleware from "@/middleware/auth.middleware";
import AuthService from "@business/services/auth/auth.service";
import { AuthService } from "@business/services/auth/auth.service";
import { describe, expect, it } from "bun:test";

describe("AuthMiddleware", () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/preload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PermissionService from "@business/services/permission/permission.service";
import { PermissionService } from "@business/services/permission/permission.service";
import { beforeAll } from "bun:test";
import { green } from "colorette";
import TestAuthUtil from "./util/testAuth";
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/routes/auth.route.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import app from "@/app";
import TokenService from "@business/services/token/token.service";
import { TokenService } from "@business/services/token/token.service";
import type { User } from "@database/index";
import { beforeEach, describe, expect, it } from "bun:test";
import { testClient } from "hono/testing";
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tests/services/token/token.test.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TokenService from "@business/services/token/token.service";
import { TokenService } from "@business/services/token/token.service";
import type { User } from "@database/index";
import { describe, expect, it } from "bun:test";

Expand Down
4 changes: 2 additions & 2 deletions apps/api/tests/util/testAuth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AuthService from "@business/services/auth/auth.service";
import TokenService from "@business/services/token/token.service";
import { AuthService } from "@business/services/auth/auth.service";
import { TokenService } from "@business/services/token/token.service";
import TestContext from "tests/test.context.spec";

async function login() {
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dashbore-ui",
"name": "@dashbore/ui",
"type": "module",
"private": true,
"scripts": {
Expand All @@ -23,7 +23,7 @@
"typescript": "^5"
},
"dependencies": {
"dashbore-common": "workspace:*",
"@dashbore/common": "workspace:*",
"@mantine/colors-generator": "^7.17.4",
"@mantine/core": "^7.17.4",
"@mantine/form": "^7.17.4",
Expand Down
119 changes: 40 additions & 79 deletions apps/ui/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,127 +8,88 @@
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

// Import Routes
import { Route as rootRouteImport } from './routes/__root'
import { Route as HomeRouteImport } from './routes/home'
import { Route as IndexRouteImport } from './routes/index'
import { Route as DashboardIndexRouteImport } from './routes/dashboard/index'

import { Route as rootRoute } from './routes/__root'
import { Route as HomeImport } from './routes/home'
import { Route as IndexImport } from './routes/index'
import { Route as DashboardIndexImport } from './routes/dashboard/index'

// Create/Update Routes

const HomeRoute = HomeImport.update({
const HomeRoute = HomeRouteImport.update({
id: '/home',
path: '/home',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const IndexRoute = IndexImport.update({
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const DashboardIndexRoute = DashboardIndexImport.update({
const DashboardIndexRoute = DashboardIndexRouteImport.update({
id: '/dashboard/',
path: '/dashboard/',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

// Populate the FileRoutesByPath interface

declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexImport
parentRoute: typeof rootRoute
}
'/home': {
id: '/home'
path: '/home'
fullPath: '/home'
preLoaderRoute: typeof HomeImport
parentRoute: typeof rootRoute
}
'/dashboard/': {
id: '/dashboard/'
path: '/dashboard'
fullPath: '/dashboard'
preLoaderRoute: typeof DashboardIndexImport
parentRoute: typeof rootRoute
}
}
}

// Create and export the route tree

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/home': typeof HomeRoute
'/dashboard': typeof DashboardIndexRoute
'/dashboard/': typeof DashboardIndexRoute
}

export interface FileRoutesByTo {
'/': typeof IndexRoute
'/home': typeof HomeRoute
'/dashboard': typeof DashboardIndexRoute
}

export interface FileRoutesById {
__root__: typeof rootRoute
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/home': typeof HomeRoute
'/dashboard/': typeof DashboardIndexRoute
}

export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/home' | '/dashboard'
fullPaths: '/' | '/home' | '/dashboard/'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/home' | '/dashboard'
id: '__root__' | '/' | '/home' | '/dashboard/'
fileRoutesById: FileRoutesById
}

export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
HomeRoute: typeof HomeRoute
DashboardIndexRoute: typeof DashboardIndexRoute
}

declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/home': {
id: '/home'
path: '/home'
fullPath: '/home'
preLoaderRoute: typeof HomeRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/dashboard/': {
id: '/dashboard/'
path: '/dashboard'
fullPath: '/dashboard/'
preLoaderRoute: typeof DashboardIndexRouteImport
parentRoute: typeof rootRouteImport
}
}
}

const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
HomeRoute: HomeRoute,
DashboardIndexRoute: DashboardIndexRoute,
}

export const routeTree = rootRoute
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()

/* ROUTE_MANIFEST_START
{
"routes": {
"__root__": {
"filePath": "__root.tsx",
"children": [
"/",
"/home",
"/dashboard/"
]
},
"/": {
"filePath": "index.tsx"
},
"/home": {
"filePath": "home.tsx"
},
"/dashboard/": {
"filePath": "dashboard/index.tsx"
}
}
}
ROUTE_MANIFEST_END */
Loading
Loading