feat: introduce new app routes with modular structure and enhanced features

Added modular app routes including `login`, `dashboard`, `categories`, `trends`, and `upload`. Introduced reusable components such as `ContentList`, `ContentSkeleton`, and `AppSidebar` for improved UI consistency. Enhanced authentication with `AuthProvider` and implemented lazy loading, dynamic layouts, and infinite scrolling for better performance.
This commit is contained in:
Mathis HERRIOT
2026-01-14 13:52:08 +01:00
parent 0c045e8d3c
commit 0b07320974
41 changed files with 2341 additions and 43 deletions

View File

@@ -0,0 +1,15 @@
export interface LoginResponse {
message: string;
userId: string;
}
export interface AuthStatus {
isAuthenticated: boolean;
user: null | {
id: string;
username: string;
displayName?: string;
avatarUrl?: string;
};
isLoading: boolean;
}

View File

@@ -0,0 +1,46 @@
import type { User } from "./user";
export interface Content {
id: string;
title: string;
slug: string;
description?: string;
url: string;
thumbnailUrl?: string;
type: "image" | "video";
mimeType: string;
size: number;
width?: number;
height?: number;
duration?: number;
views: number;
usageCount: number;
favoritesCount: number;
tags: (string | Tag)[];
category?: Category;
authorId: string;
author: User;
createdAt: string;
updatedAt: string;
}
export interface Tag {
id: string;
name: string;
slug: string;
}
export interface Category {
id: string;
name: string;
slug: string;
description?: string;
}
export interface PaginatedResponse<T> {
data: T[];
total: number;
limit: number;
offset: number;
}

View File

@@ -0,0 +1,15 @@
export interface User {
id: string;
username: string;
email: string;
displayName?: string;
avatarUrl?: string;
role: "user" | "admin";
createdAt: string;
}
export interface UserProfile extends User {
bio?: string;
favoritesCount: number;
uploadsCount: number;
}