Initial commit

This commit is contained in:
2026-03-28 17:16:33 +03:00
commit fe9aff3fec
167 changed files with 23898 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
/**
* Auth Configuration
* Controls whether authentication is required for the app
*/
export const authConfig = {
// If true, users must login to access the app
// If false, app is public with optional login
isAuthRequired: process.env.NEXT_PUBLIC_AUTH_REQUIRED === "true",
// Public routes that don't require authentication (when auth is required)
publicRoutes: ["/signin", "/signup", "/forgot-password"],
// Routes that should always be protected (even when auth is optional)
protectedRoutes: ["/admin", "/settings", "/profile"],
};
export const isPublicRoute = (pathname: string): boolean => {
return authConfig.publicRoutes.some((route) => pathname.includes(route));
};
export const isProtectedRoute = (pathname: string): boolean => {
return authConfig.protectedRoutes.some((route) => pathname.includes(route));
};