Files
myeasycms-v2/apps/web/config/app.config.ts
giancarlo 3ac4d3b00d Updated account deletion process and refactor packages
The primary update was on the process of account deletion where email notifications are now sent to users. The @kit/emails was also renamed to @kit/email-templates and adjustments were accordingly made on the relevant code and configuration files. In addition, package interaction was refactored to enhance readability and ease of maintenance. Some minor alterations were made on the User Interface, and code comments were updated.
2024-03-28 11:20:12 +08:00

51 lines
1.2 KiB
TypeScript

import { z } from 'zod';
const production = process.env.NODE_ENV === 'production';
enum Themes {
Light = 'light',
Dark = 'dark',
}
const AppConfigSchema = z.object({
name: z
.string({
description: `This is the name of your SaaS. Ex. "Makerkit"`,
})
.min(1),
title: z
.string({
description: `This is the default title tag of your SaaS.`,
})
.min(1),
description: z.string({
description: `This is the default description of your SaaS.`,
}),
url: z.string().url({
message: `Please provide a valid URL. Example: 'https://example.com'`,
}),
locale: z
.string({
description: `This is the default locale of your SaaS.`,
})
.default('en'),
theme: z.nativeEnum(Themes),
production: z.boolean(),
themeColor: z.string(),
themeColorDark: z.string(),
});
const appConfig = AppConfigSchema.parse({
name: process.env.NEXT_PUBLIC_PRODUCT_NAME,
title: 'Awesomely - Your SaaS Title',
description: 'Your SaaS Description',
url: process.env.NEXT_PUBLIC_SITE_URL,
locale: process.env.NEXT_PUBLIC_DEFAULT_LOCALE,
theme: Themes.Light,
production,
themeColor: '#ffffff',
themeColorDark: '#0a0a0a',
});
export default appConfig;