page.tsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. 'use client';
  2. import { useRouter } from 'next/navigation';
  3. import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
  4. import { FileText, Layout, Upload, BookOpen } from 'lucide-react';
  5. interface AppTile {
  6. id: string;
  7. title: string;
  8. description: string;
  9. icon: React.ReactNode;
  10. href: string;
  11. color: string;
  12. }
  13. export default function DashboardPage() {
  14. const router = useRouter();
  15. const apps: AppTile[] = [
  16. {
  17. id: 'files',
  18. title: 'Files',
  19. description: 'Manage and organize your uploaded files',
  20. icon: <FileText className="w-8 h-8" />,
  21. href: '/files',
  22. color: 'bg-blue-500'
  23. },
  24. {
  25. id: 'layout-configurations',
  26. title: 'Layout Configurations',
  27. description: 'Create and manage layout configurations',
  28. icon: <Layout className="w-8 h-8" />,
  29. href: '/layout-configurations',
  30. color: 'bg-green-500'
  31. },
  32. {
  33. id: 'imports',
  34. title: 'Imports',
  35. description: 'Import and manage data from external sources',
  36. icon: <Upload className="w-8 h-8" />,
  37. href: '/imports',
  38. color: 'bg-purple-500'
  39. },
  40. {
  41. id: 'api-docs',
  42. title: 'API Documentation',
  43. description: 'Explore API endpoints and documentation',
  44. icon: <BookOpen className="w-8 h-8" />,
  45. href: '/api-docs',
  46. color: 'bg-orange-500'
  47. }
  48. ];
  49. const handleAppClick = (href: string) => {
  50. router.push(href);
  51. };
  52. return (
  53. <div className="min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800">
  54. <div className="container mx-auto px-4 py-8">
  55. <div className="text-center mb-12">
  56. <h1 className="text-4xl font-bold text-gray-900 dark:text-white mb-4">
  57. Welcome to Vtorio Dashboard
  58. </h1>
  59. <p className="text-lg text-gray-600 dark:text-gray-300">
  60. Select an application to get started
  61. </p>
  62. </div>
  63. <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto">
  64. {apps.map((app) => (
  65. <Card
  66. key={app.id}
  67. className="group cursor-pointer transition-all duration-300 hover:shadow-lg hover:scale-105 dark:bg-gray-800 dark:border-gray-700"
  68. onClick={() => handleAppClick(app.href)}
  69. >
  70. <CardHeader className="text-center">
  71. <div className={`${app.color} w-16 h-16 rounded-full flex items-center justify-center text-white mx-auto mb-4 group-hover:scale-110 transition-transform duration-300`}>
  72. {app.icon}
  73. </div>
  74. <CardTitle className="text-xl font-semibold text-gray-900 dark:text-white">
  75. {app.title}
  76. </CardTitle>
  77. </CardHeader>
  78. <CardContent>
  79. <CardDescription className="text-center text-gray-600 dark:text-gray-300">
  80. {app.description}
  81. </CardDescription>
  82. </CardContent>
  83. </Card>
  84. ))}
  85. </div>
  86. <div className="mt-12 text-center">
  87. <p className="text-sm text-gray-500 dark:text-gray-400">
  88. Click on any application to access its features
  89. </p>
  90. </div>
  91. </div>
  92. </div>
  93. );
  94. }