Add API endpoints and frontend components for tool management and analytics

Implement CRUD operations for tools and ratings, introduce analytics endpoints, and develop frontend components for displaying tools, ratings, and analytics data.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 776963d0-f75d-42e2-a57b-cc36bdff8495
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: feaa4ce1-5aed-4cc0-bcea-47855b615b48
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0683fb79-a27c-485c-9333-5f4b288c4567/776963d0-f75d-42e2-a57b-cc36bdff8495/rx9K7bW
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
cheffe01
2026-05-25 13:04:53 +00:00
parent 1de22a6979
commit 036973ea32
111 changed files with 11006 additions and 96 deletions
@@ -1,10 +1,177 @@
/**
* Generated by orval v8.5.3 🍺
* Generated by orval v8.9.1 🍺
* Do not edit manually.
* Api
* API specification
* ToolRate API — Tool listing and rating platform
* OpenAPI spec version: 0.1.0
*/
export interface HealthStatus {
status: string;
}
export interface Tool {
id: number;
name: string;
description: string;
category: string;
/** @nullable */
websiteUrl?: string | null;
features?: string[];
tags?: string[];
createdAt: string;
updatedAt: string;
}
export interface ToolWithStats {
id: number;
name: string;
description: string;
category: string;
/** @nullable */
websiteUrl?: string | null;
features?: string[];
tags?: string[];
createdAt: string;
updatedAt: string;
ratingCount: number;
/** @nullable */
avgUsefulness: number | null;
/** @nullable */
avgUsability: number | null;
/** @nullable */
avgCombined: number | null;
}
export interface ToolInput {
/** @minLength 1 */
name: string;
/** @minLength 1 */
description: string;
/** @minLength 1 */
category: string;
websiteUrl?: string;
features?: string[];
tags?: string[];
}
export interface ToolUpdate {
/** @minLength 1 */
name?: string;
description?: string;
category?: string;
websiteUrl?: string;
features?: string[];
tags?: string[];
}
export interface Rating {
id: number;
toolId: number;
/**
* @minimum 1
* @maximum 5
*/
usefulness: number;
/**
* @minimum 1
* @maximum 5
*/
usability: number;
/** @nullable */
comment?: string | null;
/** @nullable */
reviewerName?: string | null;
createdAt: string;
}
export interface RatingInput {
/**
* @minimum 1
* @maximum 5
*/
usefulness: number;
/**
* @minimum 1
* @maximum 5
*/
usability: number;
comment?: string;
reviewerName?: string;
}
export interface AnalyticsSummary {
totalTools: number;
totalRatings: number;
/** @nullable */
avgUsefulness: number | null;
/** @nullable */
avgUsability: number | null;
/** @nullable */
avgCombined: number | null;
categoriesCount: number;
mostRatedTool?: ToolWithStats;
}
export interface TopToolEntry {
tool: ToolWithStats;
score: number;
ratingCount: number;
}
export interface CategoryStats {
category: string;
toolCount: number;
totalRatings: number;
/** @nullable */
avgUsefulness: number | null;
/** @nullable */
avgUsability: number | null;
}
export interface ScoreBucket {
score: number;
count: number;
}
export interface RatingDistribution {
usefulness: ScoreBucket[];
usability: ScoreBucket[];
}
export interface ErrorResponse {
error: string;
}
export type ListToolsParams = {
category?: string;
search?: string;
sort?: ListToolsSort;
};
export type ListToolsSort = typeof ListToolsSort[keyof typeof ListToolsSort];
export const ListToolsSort = {
newest: 'newest',
top_rated: 'top_rated',
most_reviewed: 'most_reviewed',
} as const;
export type GetTopToolsParams = {
limit?: number;
metric?: GetTopToolsMetric;
};
export type GetTopToolsMetric = typeof GetTopToolsMetric[keyof typeof GetTopToolsMetric];
export const GetTopToolsMetric = {
usefulness: 'usefulness',
usability: 'usability',
combined: 'combined',
} as const;
export type GetRatingDistributionParams = {
toolId?: number;
};