feature: Add configs

This commit is contained in:
behnam 2025-04-21 10:30:55 +03:00
parent 4291fa832a
commit 28e115c6cb
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,6 @@
const commonConfigs = {
appName: process.env.APP_NAME ?? "NEXT_BOILERPLATE",
toastTimeout: 3000,
};
export default commonConfigs;

View File

@ -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<string, unknown>) => JSX.Element)
| typeof DocumentIcon;
path: string;
};
const routeConfig: Record<string, RouteItem> = {
home: {
langKey: langKey.global.home,
path: "/",
icon: HomeIcon,
},
dashboard: {
langKey: langKey.global.dashboard,
path: "/dashboard",
icon: DocumentIcon,
},
};
export default routeConfig;

View File

@ -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;