diff --git a/src/bootstrap/configs/common-configs.ts b/src/bootstrap/configs/common-configs.ts new file mode 100644 index 0000000..740cd05 --- /dev/null +++ b/src/bootstrap/configs/common-configs.ts @@ -0,0 +1,6 @@ +const commonConfigs = { + appName: process.env.APP_NAME ?? "NEXT_BOILERPLATE", + toastTimeout: 3000, +}; + +export default commonConfigs; diff --git a/src/bootstrap/configs/route-configs.ts b/src/bootstrap/configs/route-configs.ts new file mode 100644 index 0000000..7718646 --- /dev/null +++ b/src/bootstrap/configs/route-configs.ts @@ -0,0 +1,26 @@ +import HomeIcon from "@/app/components/icons/home"; +import langKey from "@/bootstrap/i18n/dictionaries/lang-key"; +import { DocumentIcon } from "@heroicons/react/24/outline"; + +type RouteItem = { + langKey: string; + icon?: + | ((props: { className?: string } & Record) => JSX.Element) + | typeof DocumentIcon; + path: string; +}; + +const routeConfig: Record = { + home: { + langKey: langKey.global.home, + path: "/", + icon: HomeIcon, + }, + dashboard: { + langKey: langKey.global.dashboard, + path: "/dashboard", + icon: DocumentIcon, + }, +}; + +export default routeConfig; diff --git a/src/bootstrap/configs/server-configs.ts b/src/bootstrap/configs/server-configs.ts new file mode 100644 index 0000000..0c15b0e --- /dev/null +++ b/src/bootstrap/configs/server-configs.ts @@ -0,0 +1,18 @@ +import "server-only"; + +/** + * You can put all configs which shouldn't be mapped to the client side. + */ +const serverConfigs = { + env: { + backendApi: { + url: process.env.BACKEND_BASE_HOST as string, + }, + }, + cookies: { + authToken: "auth-token", + authProfile: "auth-profile", + }, +}; + +export default serverConfigs;