Update dependencies, refactor authentication, and enhance UI components

- Upgraded @reduxjs/toolkit to version 2.9.0 and added new dependencies including @techniker-me/pcast-api and moment.
- Refactored authentication logic and added middleware for improved request handling.
- Introduced new UI components such as buttons, loaders, and forms, along with a theme system following SOLID principles.
- Updated routing to include protected routes and improved the login form with better error handling.
- Removed unused CSS and organized the project structure for better maintainability.
This commit is contained in:
2025-09-04 01:10:03 -04:00
parent 04488c43c5
commit 1469c7f52f
85 changed files with 3610 additions and 125 deletions

View File

@@ -0,0 +1,6 @@
export default interface IUserDataStore {
setItem(key: string, value: string): void;
getItem(key: string): string | null;
removeItem(key: string): void;
clear(): void;
}

View File

@@ -0,0 +1,23 @@
import IUserDataStore from './IUserDataStore';
export class IndexedDB implements IUserDataStore {
static isSupported(): boolean {
return 'indexedDB' in window;
}
public getItem(key: string): string | null {
throw new Error('Not Implemented');
}
public setItem(key: string, value: string): void {
throw new Error('Not Implemented');
}
public removeItem(key: string): void {
throw new Error('Not Implemented');
}
public clear(): void {
throw new Error('Not Implemented');
}
}

View File

@@ -0,0 +1,23 @@
import IUserDataStore from './IUserDataStore';
export class LocalStorage implements IUserDataStore {
static isSupported(): boolean {
return 'localStorage' in window;
}
public getItem(key: string): string | null {
throw new Error('Not Implemented');
}
public setItem(key: string, value: string): void {
throw new Error('Not Implemented');
}
public removeItem(key: string): void {
throw new Error('Not Implemented');
}
public clear(): void {
throw new Error('Not Implemented');
}
}

View File

@@ -0,0 +1,23 @@
import IUserDataStore from './IUserDataStore';
export class ObjectStrore implements IUserDataStore {
static isSupported(): boolean {
return true;
}
public getItem(key: string): string | null {
throw new Error('Not Implemented');
}
public setItem(key: string, value: string): void {
throw new Error('Not Implemented');
}
public removeItem(key: string): void {
throw new Error('Not Implemented');
}
public clear(): void {
throw new Error('Not Implemented');
}
}

View File

@@ -0,0 +1,24 @@
import IUserDataStore from './IUserDataStore';
import {IndexedDB} from './IndexedDB';
import {LocalStorage} from './LocalStorage';
import {ObjectStrore} from './ObjectStore';
class UserDataStoreService {
private static _instance: IUserDataStore;
static {
if (IndexedDB.isSupported()) {
this._instance = new IndexedDB();
} else if (LocalStorage.isSupported()) {
this._instance = new LocalStorage();
} else {
this._instance = new ObjectStrore();
}
}
public static getInstance(): IUserDataStore {
return this._instance;
}
}
export default UserDataStoreService.getInstance();