From b74ea9307ebaceac5587ab017c443615735ee9c2 Mon Sep 17 00:00:00 2001
From: Hafid Nur <73023445+hafidnrzs@users.noreply.github.com>
Date: Tue, 9 Dec 2025 18:35:25 +0700
Subject: [PATCH] feat(backoffice): authentication middleware, error pages, and
404 page
---
apps/backoffice/index.html | 2 +-
.../backoffice/src/app/(protected)/layout.tsx | 2 +-
.../(public)/auth/login/_hooks/use-login.ts | 25 +++-
.../src/app/(public)/auth/login/page.tsx | 8 +-
apps/backoffice/src/app/404.tsx | 23 ++++
apps/backoffice/src/app/error.tsx | 29 +++++
apps/backoffice/src/middleware.ts | 6 +-
apps/backoffice/vite.config.ts | 2 +-
libs/service/src/api/backoffice.ts | 63 ++++++++++
libs/service/src/hooks/auth/index.ts | 111 ++++++++++++------
10 files changed, 224 insertions(+), 47 deletions(-)
create mode 100644 apps/backoffice/src/app/404.tsx
create mode 100644 apps/backoffice/src/app/error.tsx
create mode 100644 libs/service/src/api/backoffice.ts
diff --git a/apps/backoffice/index.html b/apps/backoffice/index.html
index 52a9604..8ba1c9a 100644
--- a/apps/backoffice/index.html
+++ b/apps/backoffice/index.html
@@ -1,5 +1,5 @@
-
+
Backoffice
diff --git a/apps/backoffice/src/app/(protected)/layout.tsx b/apps/backoffice/src/app/(protected)/layout.tsx
index a1fb13e..957a288 100644
--- a/apps/backoffice/src/app/(protected)/layout.tsx
+++ b/apps/backoffice/src/app/(protected)/layout.tsx
@@ -23,7 +23,7 @@ export const AppLayout: FC = (): ReactElement => {
{/* Mobile menu button (shown on small screens) */}