feat: integrate TanStack Router and update routing structure

- Added TanStack Router for improved routing management.
- Created route tree and individual routes for login, index, add-product, inventory, and view-product.
- Implemented authentication checks for the inventory route.
- Introduced a landing page component.
- Updated App component to utilize RouterProvider and ToastContainer for notifications.
- Refactored CSS to use Tailwind CSS, removing custom styles.
- Added API configuration for backend URL management.
- Implemented authentication utilities for user sign-in and sign-out.
- Integrated i18next for internationalization with English and German language support.
- Created localization files for English and German languages.
This commit is contained in:
2026-05-26 14:59:16 +02:00
parent b3c3be5590
commit d6e29a74af
21 changed files with 706 additions and 419 deletions
+5 -1
View File
@@ -1,10 +1,14 @@
import express from "express";
import dotenv from "dotenv";
import { generateToken } from "../../services/tokenService.js";
import { authenticate, generateToken } from "../../services/tokenService.js";
import { findUser, loginUser } from "./database/users.database.js";
dotenv.config();
const router = express.Router();
router.post("/verify-token", authenticate, async (req, res) => {
res.status(200);
});
router.post("/login", async (req, res) => {
const username = req.body.username;
const password = req.body.password;