Skip to content

Commit daddfa0

Browse files
committed
refactor!: major repo fixes and cleanup, removed PrimeVue
1 parent 5f1845a commit daddfa0

60 files changed

Lines changed: 1319 additions & 658 deletions

Some content is hidden

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

apps/backend/src/api/auth/$.routes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* This file contains routes and sample routes for possible APIs usecases with Kinde.
33
*/
44

5+
import type { UserProfileType } from '#src/types.js'
56
// import type { ClaimTokenType, FlagType } from '@kinde-oss/kinde-typescript-sdk'
67
import { appFactory } from '#src/helpers/factory.js'
78
import { getSessionManager } from '#src/helpers/kinde.js'
@@ -17,7 +18,7 @@ export const authRoutesApp = appFactory.createApp()
1718
const kindeClient = await getKindeClient()
1819
const sessionManager = getSessionManager(c)
1920

20-
const [profile, token] = await Promise.all([
21+
const [profile, token]: [UserProfileType | null, string | null] = await Promise.all([
2122
kindeClient.getUserProfile(sessionManager).catch(() => null),
2223
kindeClient.getToken(sessionManager).catch(() => null),
2324
])
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { appFactory } from '#src/helpers/factory.js'
2-
import { getCachedConvexClient } from '#src/providers/baas/convex-main.js'
2+
import { getConvexClient } from '#src/providers/baas/convex-main.js'
33
import { getHelloMessage } from './hello.helper'
44

55
export const dummyHelloRouteApp = appFactory.createApp()
66
.get('', async (c) => {
7-
const convexClient = getCachedConvexClient()
7+
const convexClient = await getConvexClient().catch(() => null)
88

9-
return c.text(getHelloMessage(`i18n and Hono ${convexClient ? '(+ Convex detected)' : ''}`))
9+
return c.text(getHelloMessage(`i18n and Hono${convexClient ? ' (+ Convex detected)' : ''}`))
1010
})

apps/backend/src/providers/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export const providersInit = createMiddleware(async (c, next) => {
3232
if (!providersState.initialized) {
3333
await Promise.all([
3434
initKindeClient(),
35-
initConvexClient().catch(() => {}),
35+
// WARN: allows Convex to fail initializing, in case template user does not opt-in for Convex, please remove the catch or this whole line depends on your need in production
36+
initConvexClient().catch(() => { }),
3637
])
3738

3839
providersState.initialized = true

apps/backend/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import type { UserType } from '@kinde-oss/kinde-typescript-sdk'
12
import type { LambdaContext, LambdaEvent } from 'hono-adapter-aws-lambda'
23
import type { Session } from 'hono-sessions'
4+
import type { Simplify } from 'hono/utils/types'
35

46
export interface HonoEnv {
57
Bindings: {
@@ -11,3 +13,5 @@ export interface HonoEnv {
1113
session_key_rotation: boolean
1214
}
1315
}
16+
17+
export type UserProfileType = Simplify<UserType>

apps/frontend/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414
* + [VueUse Motion](https://motion.vueuse.org/)
1515
* Tanstack Query
1616
* Default is configured for client-side fetching usage, data is persisted to IndexedDB.
17-
* PrimeVue * UI library
18-
* [Shadcn/vue](https://www.shadcn-vue.com/) - Components-based UI library
19-
* > [Why two UI libraries?](./two-ui-libraries-explanation.md)
17+
* [Shadcn/vue](https://www.shadcn-vue.com/) - Components-first UI library
2018
* Configured for UnoCSS with [hyoban/unocss-preset-shadcn](https://github.com/hyoban/unocss-preset-shadcn).
21-
* Share the primary color and can work in parallel with PrimeVue.
22-
* Note: `lucide-vue-next` (icon pack of `shadcn-vue`) is not pre-installed, you can opt for one of following:
23-
* Install `lucide-vue-next`
24-
* Convert usage of `lucide-vue-next` icons to UnoCSS icons
19+
* To add components, use `pnpm shad-add <component>`
2520
* [ColorMode](https://github.com/nuxt-modules/color-mode)
2621
* Dark and Light mode with auto detection made easy with Nuxt.
2722
* [NuxtImage](https://image.nuxt.com/)

apps/frontend/app/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ConvexVueContext } from 'convex-vue'
33
44
defineOgImageComponent('NuxtSeo', {
55
title: `Hello! I'm starter-monorepo 👋`,
6-
description: 'Hono RPC, Nuxt, SST Ion, Kinde Auth, Tanstack Query, Shadcn, Primevue, UnoCSS',
6+
description: 'Monorepo with 🤖 AI initialize and localize | 🔥Hono + OpenAPI & RPC, Nuxt, Convex, SST Ion, Kinde Auth, Tanstack Query, Shadcn, UnoCSS, Spreadsheet I18n, Lingo.dev',
77
theme: '#bf83fc',
88
colorMode: 'dark',
99
})
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
@layer reset, normalize, tailwind-base, primevue, tailwind-utilities;
2-
1+
@layer reset, normalize, tailwind-base, tailwind-utilities;
32
@import '@unocss/reset/tailwind.css' layer(reset);
4-
53
@import './palette.css';
6-
@import './primevue.css';
74
@import './shadcn.css';
85

9-
106
html {
11-
--at-apply: 'bg-gray-300 text-surface-600 transition-background-color duration-500';
7+
--at-apply: 'bg-surface-0 text-surface-600 transition-background-color duration-500';
128
}
139

1410
html.dark {
15-
--at-apply: 'bg-gray-700 text-surface-200';
11+
--at-apply: 'bg-surface-900 text-surface-200';
1612
}
1713

18-
pre, code {
19-
--at-apply: 'font-mono'
14+
pre,
15+
code {
16+
--at-apply: 'font-mono';
2017
}

apps/frontend/app/assets/css/palette.css

Lines changed: 38 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,44 @@
1-
/* Main colors */
1+
/* Main colors - Modern Playful Palette */
22
:root {
3-
--primary-50: 36 100% 95%;
4-
--primary-100: 36 100% 88%;
5-
--primary-200: 37 100% 78%;
6-
--primary-300: 36 100% 78%;
7-
--primary-400: 36 100% 59%;
8-
--primary-500: 36 100% 50%;
9-
--primary-600: 36 100% 43%;
10-
--primary-700: 36 100% 35%;
11-
--primary-800: 36 100% 28%;
12-
--primary-900: 36 100% 23%;
13-
--primary-950: 36 100% 12%;
3+
/* Primary - Vibrant Teal */
4+
--primary-50: 185 80% 95%;
5+
--primary-100: 185 82% 88%;
6+
--primary-200: 185 84% 78%;
7+
--primary-300: 185 86% 68%;
8+
--primary-400: 185 88% 58%;
9+
--primary-500: 185 90% 48%;
10+
--primary-600: 185 92% 40%;
11+
--primary-700: 185 94% 32%;
12+
--primary-800: 185 96% 24%;
13+
--primary-900: 185 98% 16%;
14+
--primary-950: 185 100% 8%;
1415

15-
--secondary-50: 240 60% 98%;
16-
--secondary-100: 231 100% 95%;
17-
--secondary-200: 231 100% 88%;
18-
--secondary-300: 231 100% 80%;
19-
--secondary-400: 231 100% 72%;
20-
--secondary-500: 231 100% 64%;
21-
--secondary-600: 231 100% 56%;
22-
--secondary-700: 231 100% 48%;
23-
--secondary-800: 231 100% 40%;
24-
--secondary-900: 231 100% 32%;
25-
--secondary-950: 231 100% 24%;
16+
/* Secondary - Playful Coral */
17+
--secondary-50: 10 100% 96%;
18+
--secondary-100: 10 100% 92%;
19+
--secondary-200: 10 100% 84%;
20+
--secondary-300: 10 100% 76%;
21+
--secondary-400: 10 100% 68%;
22+
--secondary-500: 10 100% 60%;
23+
--secondary-600: 10 95% 52%;
24+
--secondary-700: 10 90% 44%;
25+
--secondary-800: 10 85% 36%;
26+
--secondary-900: 10 80% 28%;
27+
--secondary-950: 10 75% 18%;
2628

27-
--surface-0: 0 0% 100%;
28-
--surface-50: 210 40% 98%;
29-
--surface-100: 210 40% 96%;
30-
--surface-200: 214 32% 91%;
31-
--surface-300: 213 27% 84%;
32-
--surface-400: 215 20% 65%;
33-
--surface-500: 215 16% 47%;
34-
--surface-600: 215 19% 35%;
35-
--surface-700: 218 23% 23%;
36-
--surface-800: 217 33% 17%;
37-
--surface-900: 222 47% 11%;
38-
--surface-950: 231 77% 5%;
39-
}
40-
41-
/* Token mapping */
42-
:root {
43-
--primary: var(--primary-500);
44-
--primary-inverse: var(--surface-0);
45-
--primary-hover: var(--primary-600);
46-
--primary-active-color: var(--primary-600);
47-
48-
--primary-highlight-opacity: 0.1;
49-
--primary-highlight-inverse: var(--primary-700);
50-
--primary-highlight-hover-opacity: 0.2;
51-
}
52-
.dark{
53-
--primary: var(--primary-400);
54-
--primary-inverse: var(--surface-900);
55-
--primary-hover: var(--primary-300);
56-
--primary-active-color: var(--primary-300);
57-
58-
--primary-highlight-opacity: 0.2;
59-
--primary-highlight-inverse: var(--surface-0);
60-
--primary-highlight-hover-opacity: 0.3;
29+
/* Surface - Minimalist Grays */
30+
--surface-0: 0 0% 100%; /* Pure White */
31+
--surface-50: 210 20% 98%; /* Off-white */
32+
--surface-100: 210 18% 96%; /* Light Gray */
33+
--surface-200: 210 16% 93%; /* Light Gray */
34+
--surface-300: 210 15% 88%; /* Gray */
35+
--surface-400: 210 14% 75%; /* Medium Gray */
36+
--surface-500: 210 13% 60%; /* Dark Gray */
37+
--surface-600: 210 15% 45%; /* Darker Gray */
38+
--surface-700: 210 18% 30%; /* Very Dark Gray */
39+
--surface-800: 210 20% 18%; /* Near Black */
40+
--surface-900: 210 25% 10%; /* Dark Background */
41+
--surface-950: 210 30% 5%; /* Pure Black (almost) */
6142
}
6243

6344
/* Black/white monotone shortcut */

apps/frontend/app/assets/css/primevue.css

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
/* violet theme */
1+
/* modern playful theme */
22
:root {
3-
--background: 0 0% 100%;
4-
--foreground: 224 71.4% 4.1%;
3+
--background: var(--surface-0);
4+
--foreground: var(--surface-900);
55

6-
--muted: 220 14.3% 95.9%;
7-
--muted-foreground: 220 8.9% 46.1%;
6+
--muted: var(--surface-100);
7+
--muted-foreground: var(--surface-400);
88

9-
--popover: 0 0% 100%;
10-
--popover-foreground: 224 71.4% 4.1%;
9+
--popover: var(--surface-0);
10+
--popover-foreground: var(--surface-900);
1111

12-
--card: 0 0% 100%;
13-
--card-foreground: 224 71.4% 4.1%;
12+
--card: var(--surface-0);
13+
--card-foreground: var(--surface-900);
1414

15-
--border: 220 13% 91%;
16-
--input: 220 13% 91%;
15+
--border: var(--surface-200);
16+
--input: var(--surface-200);
1717

18-
/* Inherit primary color from palette */
19-
/* --primary: 262.1 83.3% 57.8%; */
20-
--primary-foreground: 210 20% 98%;
18+
--primary: var(--primary-500);
19+
--primary-foreground: var(--surface-0);
2120

22-
--secondary: 220 14.3% 95.9%;
23-
--secondary-foreground: 220.9 39.3% 11%;
21+
--secondary: var(--secondary-500);
22+
--secondary-foreground: var(--surface-900);
2423

25-
--accent: 220 14.3% 95.9%;
26-
--accent-foreground: 220.9 39.3% 11%;
24+
--accent: var(--secondary-100);
25+
--accent-foreground: var(--secondary-900);
2726

2827
--destructive: 0 84.2% 60.2%;
2928
--destructive-foreground: 210 20% 98%;
@@ -33,30 +32,29 @@
3332
--radius: 10px;
3433
}
3534
.dark {
36-
--background: 224 71.4% 4.1%;
37-
--foreground: 210 20% 98%;
35+
--background: var(--surface-900);
36+
--foreground: var(--surface-0);
3837

39-
--muted: 215 27.9% 16.9%;
40-
--muted-foreground: 217.9 10.6% 64.9%;
38+
--muted: var(--surface-800);
39+
--muted-foreground: var(--surface-300);
4140

42-
--popover: 224 71.4% 4.1%;
43-
--popover-foreground: 210 20% 98%;
41+
--popover: var(--surface-900);
42+
--popover-foreground: var(--surface-0);
4443

45-
--card: 224 71.4% 4.1%;
46-
--card-foreground: 210 20% 98%;
44+
--card: var(--surface-900);
45+
--card-foreground: var(--surface-0);
4746

48-
--border: 215 27.9% 16.9%;
49-
--input: 215 27.9% 16.9%;
47+
--border: var(--surface-700);
48+
--input: var(--surface-700);
5049

51-
/* Inherit primary color from primevue.css */
52-
/* --primary: 263.4 70% 50.4%; */
53-
--primary-foreground: 210 20% 98%;
50+
--primary: var(--primary-400);
51+
--primary-foreground: var(--surface-900);
5452

55-
--secondary: 215 27.9% 16.9%;
56-
--secondary-foreground: 210 20% 98%;
53+
--secondary: var(--secondary-400);
54+
--secondary-foreground: var(--surface-0);
5755

58-
--accent: 215 27.9% 16.9%;
59-
--accent-foreground: 210 20% 98%;
56+
--accent: var(--secondary-800);
57+
--accent-foreground: var(--secondary-100);
6058

6159
--destructive: 0 62.8% 30.6%;
6260
--destructive-foreground: 210 20% 98%;
@@ -65,5 +63,5 @@
6563
}
6664

6765
* {
68-
@apply border-border;
66+
--at-apply: border-border;
6967
}

0 commit comments

Comments
 (0)