Spaces:
Running
Running
File size: 56,546 Bytes
531b8a1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AuditAI - Internal Audit Assistant</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar-item.active {
background-color: #3b82f6;
color: white;
}
.sidebar-item.active:hover {
background-color: #2563eb;
}
.document-preview {
height: calc(100vh - 200px);
}
.chat-messages {
height: calc(100vh - 250px);
overflow-y: auto;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.dropzone {
border: 2px dashed #cbd5e0;
transition: all 0.3s ease;
}
.dropzone.active {
border-color: #3b82f6;
background-color: #eff6ff;
}
.skeleton-loader {
animation: pulse 2s infinite;
background-color: #e5e7eb;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.auth-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
.auth-modal.active {
display: flex;
}
.progress-bar {
transition: width 0.3s ease;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Authentication Modal -->
<div class="auth-modal" id="auth-modal">
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-gray-800" id="auth-modal-title">Sign In</h2>
<button class="text-gray-500 hover:text-gray-700" id="close-auth-modal">
<i class="fas fa-times"></i>
</button>
</div>
<div id="signin-form">
<div class="mb-4">
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="password" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button id="signin-btn" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
Sign In
</button>
<div class="mt-4 text-center">
<button id="show-signup" class="text-blue-600 hover:text-blue-800 text-sm">Don't have an account? Sign Up</button>
</div>
</div>
<div id="signup-form" class="hidden">
<div class="mb-4">
<label for="signup-name" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
<input type="text" id="signup-name" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label for="signup-email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="signup-email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label for="signup-password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="signup-password" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label for="signup-confirm-password" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
<input type="password" id="signup-confirm-password" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button id="signup-btn" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
Sign Up
</button>
<div class="mt-4 text-center">
<button id="show-signin" class="text-blue-600 hover:text-blue-800 text-sm">Already have an account? Sign In</button>
</div>
</div>
</div>
</div>
</div>
<!-- Main App Container (hidden until authenticated) -->
<div class="flex h-screen overflow-hidden" id="app-container" style="display: none;">
<!-- Sidebar -->
<div class="hidden md:flex md:flex-shrink-0">
<div class="flex flex-col w-64 bg-white border-r border-gray-200">
<div class="flex items-center justify-center h-16 px-4 bg-blue-600 text-white">
<div class="flex items-center">
<i class="fas fa-shield-alt mr-2 text-xl"></i>
<span class="text-xl font-semibold">AuditAI</span>
</div>
</div>
<div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
<div class="space-y-1">
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 active">
<i class="fas fa-home mr-3"></i>
Dashboard
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-excel mr-3"></i>
Data Analysis
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-contract mr-3"></i>
Contract Analysis
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-comments mr-3"></i>
Document Chat
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-invoice mr-3"></i>
Workpapers
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-clipboard-check mr-3"></i>
Audit Standards
</button>
</div>
<div class="mt-auto pt-4 border-t border-gray-200">
<div class="flex items-center px-4 py-3 text-sm font-medium text-gray-700">
<i class="fas fa-cog mr-3"></i>
Settings
</div>
<div class="flex items-center px-4 py-3 text-sm font-medium text-gray-700">
<i class="fas fa-question-circle mr-3"></i>
Help & Support
</div>
<button id="signout-btn" class="w-full flex items-center px-4 py-3 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md">
<i class="fas fa-sign-out-alt mr-3"></i>
Sign Out
</button>
</div>
</div>
</div>
</div>
<!-- Mobile sidebar -->
<div class="md:hidden fixed inset-0 z-40 hidden" id="mobile-sidebar">
<div class="fixed inset-0 bg-gray-600 bg-opacity-75" aria-hidden="true"></div>
<div class="relative flex flex-col w-full max-w-xs bg-white">
<div class="flex items-center justify-center h-16 px-4 bg-blue-600 text-white">
<div class="flex items-center">
<i class="fas fa-shield-alt mr-2 text-xl"></i>
<span class="text-xl font-semibold">AuditAI</span>
</div>
</div>
<div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
<div class="space-y-1">
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 active">
<i class="fas fa-home mr-3"></i>
Dashboard
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-excel mr-3"></i>
Data Analysis
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-contract mr-3"></i>
Contract Analysis
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-comments mr-3"></i>
Document Chat
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-file-invoice mr-3"></i>
Workpapers
</button>
<button class="sidebar-item w-full flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors duration-200 hover:bg-gray-100">
<i class="fas fa-clipboard-check mr-3"></i>
Audit Standards
</button>
</div>
<div class="mt-auto">
<button id="mobile-signout-btn" class="w-full flex items-center px-4 py-3 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md">
<i class="fas fa-sign-out-alt mr-3"></i>
Sign Out
</button>
</div>
</div>
</div>
</div>
<!-- Main content -->
<div class="flex flex-col flex-1 overflow-hidden">
<!-- Top navigation -->
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200">
<button class="md:hidden px-4 border-r border-gray-200 text-gray-500 focus:outline-none" id="mobile-sidebar-toggle">
<i class="fas fa-bars"></i>
</button>
<div class="flex-1 px-4 flex justify-between">
<div class="flex-1 flex">
<div class="w-full flex md:ml-0">
<div class="relative w-full max-w-xl">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-search text-gray-400"></i>
</div>
<input id="search" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" placeholder="Search" type="search">
</div>
</div>
</div>
<div class="ml-4 flex items-center md:ml-6">
<button class="p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
<i class="fas fa-bell"></i>
</button>
<div class="ml-3 relative">
<div>
<button type="button" class="max-w-xs flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="user-menu" aria-expanded="false" aria-haspopup="true">
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Main content area -->
<div class="flex-1 overflow-auto">
<!-- Dashboard -->
<div class="tab-content active p-6" id="dashboard">
<div class="mb-6">
<h2 class="text-2xl font-bold text-gray-800">Welcome back, <span id="user-name">Auditor</span></h2>
<p class="text-gray-600">Here's what's happening with your audits today.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Pending Audits</p>
<p class="text-2xl font-semibold text-gray-800">12</p>
</div>
<div class="p-3 rounded-full bg-blue-100 text-blue-600">
<i class="fas fa-clock text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Completed Audits</p>
<p class="text-2xl font-semibold text-gray-800">24</p>
</div>
<div class="p-3 rounded-full bg-green-100 text-green-600">
<i class="fas fa-check-circle text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">High Risk Findings</p>
<p class="text-2xl font-semibold text-gray-800">5</p>
</div>
<div class="p-3 rounded-full bg-red-100 text-red-600">
<i class="fas fa-exclamation-triangle text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">AI Processed</p>
<p class="text-2xl font-semibold text-gray-800">87</p>
</div>
<div class="p-3 rounded-full bg-purple-100 text-purple-600">
<i class="fas fa-robot text-xl"></i>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-medium text-gray-900">Recent Activities</h3>
<button class="text-sm text-blue-600 hover:text-blue-800">View All</button>
</div>
<div class="space-y-4">
<div class="flex items-start">
<div class="flex-shrink-0 pt-0.5">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">Jane Cooper</p>
<p class="text-sm text-gray-500">Uploaded new contract for analysis</p>
<div class="mt-1 flex items-center text-sm text-gray-500">
<i class="far fa-clock mr-1"></i>
<span>3h ago</span>
</div>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0 pt-0.5">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1519244703995-f4e0f30006d5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">Michael Smith</p>
<p class="text-sm text-gray-500">Completed financial audit workpaper</p>
<div class="mt-1 flex items-center text-sm text-gray-500">
<i class="far fa-clock mr-1"></i>
<span>5h ago</span>
</div>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0 pt-0.5">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">John Doe</p>
<p class="text-sm text-gray-500">Identified 3 high-risk findings in IT audit</p>
<div class="mt-1 flex items-center text-sm text-gray-500">
<i class="far fa-clock mr-1"></i>
<span>1d ago</span>
</div>
</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-medium text-gray-900">Quick Actions</h3>
</div>
<div class="grid grid-cols-2 gap-4">
<button class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors duration-200">
<div class="p-3 mb-2 rounded-full bg-blue-100 text-blue-600">
<i class="fas fa-file-excel text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-700">Analyze Data</span>
</button>
<button class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors duration-200">
<div class="p-3 mb-2 rounded-full bg-green-100 text-green-600">
<i class="fas fa-file-contract text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-700">Review Contract</span>
</button>
<button class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors duration-200">
<div class="p-3 mb-2 rounded-full bg-purple-100 text-purple-600">
<i class="fas fa-file-invoice text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-700">Generate Workpaper</span>
</button>
<button class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors duration-200">
<div class="p-3 mb-2 rounded-full bg-yellow-100 text-yellow-600">
<i class="fas fa-clipboard-check text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-700">Check Standards</span>
</button>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-medium text-gray-900">Recent Audit Findings</h3>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Audit ID</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Findings</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">AUD-2023-001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Financial</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">In Progress</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3 High, 5 Medium</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">AUD-2023-002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">IT</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2 High, 3 Medium</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-10</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">AUD-2023-003</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Operational</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1 High, 2 Medium</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-05</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Contract Analysis Tab -->
<div class="tab-content p-6" id="contract-analysis">
<div class="mb-6">
<h2 class="text-2xl font-bold text-gray-800">Contract Analysis</h2>
<p class="text-gray-600">Upload contracts for automatic summarization and analysis.</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="lg:col-span-2">
<div class="bg-white rounded-lg shadow p-6">
<div class="mb-6">
<h3 class="text-lg font-medium text-gray-900">Upload Document</h3>
<p class="text-sm text-gray-500 mt-1">Supported formats: PDF, Word, Excel</p>
</div>
<div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer">
<div class="flex flex-col items-center justify-center">
<i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i>
<p class="text-sm text-gray-600 mb-1">Drag and drop your document here</p>
<p class="text-xs text-gray-500 mb-4">or</p>
<label for="file-upload" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 cursor-pointer transition-colors duration-200">
Browse Files
</label>
<input id="file-upload" type="file" class="hidden" accept=".pdf,.doc,.docx,.xls,.xlsx">
</div>
</div>
<div id="upload-progress" class="mt-6 hidden">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Uploading...</span>
<span class="text-sm font-medium text-gray-700" id="progress-percentage">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="progress-bar" class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<div id="file-info" class="mt-6 hidden">
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
<div class="flex items-center">
<i class="fas fa-file-alt text-gray-500 mr-3"></i>
<div>
<p class="text-sm font-medium text-gray-900" id="file-name"></p>
<p class="text-xs text-gray-500" id="file-size"></p>
</div>
</div>
<button id="remove-file" class="text-red-500 hover:text-red-700">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="mt-6">
<button id="analyze-btn" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
Analyze Document
</button>
</div>
</div>
</div>
<div>
<div class="bg-white rounded-lg shadow p-6">
<div class="mb-6">
<h3 class="text-lg font-medium text-gray-900">Document Summary</h3>
<p class="text-sm text-gray-500 mt-1">Key details extracted from your document</p>
</div>
<div id="summary-placeholder" class="text-center py-8">
<i class="fas fa-file-alt text-4xl text-gray-300 mb-3"></i>
<p class="text-gray-500">Upload a document to see the summary</p>
</div>
<div id="document-summary" class="hidden">
<div class="space-y-4">
<div>
<h4 class="text-sm font-medium text-gray-700">Document Type</h4>
<p class="text-sm text-gray-900" id="summary-type">Contract Agreement</p>
</div>
<div>
<h4 class="text-sm font-medium text-gray-700">Parties</h4>
<p class="text-sm text-gray-900" id="summary-parties">ABC Corporation and XYZ Ltd.</p>
</div>
<div>
<h4 class="text-sm font-medium text-gray-700">Effective Date</h4>
<p class="text-sm text-gray-900" id="summary-date">June 1, 2023</p>
</div>
<div>
<h4 class="text-sm font-medium text-gray-700">Term</h4>
<p class="text-sm text-gray-900" id="summary-term">2 years</p>
</div>
<div>
<h4 class="text-sm font-medium text-gray-700">Key Clauses</h4>
<ul class="list-disc list-inside text-sm text-gray-900 space-y-1 mt-1" id="summary-clauses">
<li>Payment terms: Net 30 days</li>
<li>Termination notice: 60 days</li>
<li>Liability cap: $100,000</li>
</ul>
</div>
<div>
<h4 class="text-sm font-medium text-gray-700">Risk Assessment</h4>
<div class="mt-1">
<span class="px-2 py-1 text-xs font-medium rounded-full bg-yellow-100 text-yellow-800">Medium Risk</span>
<p class="text-xs text-gray-500 mt-1">2 potential risk areas identified</p>
</div>
</div>
</div>
<div class="mt-6">
<button class="w-full bg-white border border-gray-300 text-gray-700 py-2 px-4 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
<i class="fas fa-download mr-2"></i> Download Summary
</button>
</div>
</div>
</div>
</div>
</div>
<div class="mt-6 bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-medium text-gray-900">Recent Document Analyses</h3>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Document</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Risk Level</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Service Agreement.pdf</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Contract</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Medium</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900 mr-3">View</a>
<a href="#" class="text-blue-600 hover:text-blue-900">Download</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">NDA_Agreement.docx</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">NDA</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-10</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Low</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900 mr-3">View</a>
<a href="#" class="text-blue-600 hover:text-blue-900">Download</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Vendor_Contract.pdf</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Contract</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-05</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">High</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900 mr-3">View</a>
<a href="#" class="text-blue-600 hover:text-blue-900">Download</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Authentication logic
document.addEventListener('DOMContentLoaded', function() {
// Show auth modal by default
document.getElementById('auth-modal').classList.add('active');
// Toggle between sign in and sign up forms
document.getElementById('show-signup').addEventListener('click', function() {
document.getElementById('signin-form').classList.add('hidden');
document.getElementById('signup-form').classList.remove('hidden');
document.getElementById('auth-modal-title').textContent = 'Sign Up';
});
document.getElementById('show-signin').addEventListener('click', function() {
document.getElementById('signup-form').classList.add('hidden');
document.getElementById('signin-form').classList.remove('hidden');
document.getElementById('auth-modal-title').textContent = 'Sign In';
});
// Close auth modal
document.getElementById('close-auth-modal').addEventListener('click', function() {
document.getElementById('auth-modal').classList.remove('active');
});
// Sign in button
document.getElementById('signin-btn').addEventListener('click', function() {
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
if (email && password) {
// In a real app, you would validate credentials with a backend
localStorage.setItem('authenticated', 'true');
localStorage.setItem('userName', email.split('@')[0]);
document.getElementById('auth-modal').classList.remove('active');
document.getElementById('app-container').style.display = 'flex';
document.getElementById('user-name').textContent = email.split('@')[0];
} else {
alert('Please enter both email and password');
}
});
// Sign up button
document.getElementById('signup-btn').addEventListener('click', function() {
const name = document.getElementById('signup-name').value;
const email = document.getElementById('signup-email').value;
const password = document.getElementById('signup-password').value;
const confirmPassword = document.getElementById('signup-confirm-password').value;
if (!name || !email || !password || !confirmPassword) {
alert('Please fill in all fields');
return;
}
if (password !== confirmPassword) {
alert('Passwords do not match');
return;
}
// In a real app, you would send this data to a backend
localStorage.setItem('authenticated', 'true');
localStorage.setItem('userName', name);
document.getElementById('auth-modal').classList.remove('active');
document.getElementById('app-container').style.display = 'flex';
document.getElementById('user-name').textContent = name;
// Switch back to sign in form for next time
document.getElementById('signup-form').classList.add('hidden');
document.getElementById('signin-form').classList.remove('hidden');
document.getElementById('auth-modal-title').textContent = 'Sign In';
});
// Sign out buttons
document.getElementById('signout-btn').addEventListener('click', signOut);
document.getElementById('mobile-signout-btn').addEventListener('click', signOut);
function signOut() {
localStorage.removeItem('authenticated');
localStorage.removeItem('userName');
document.getElementById('app-container').style.display = 'none';
document.getElementById('auth-modal').classList.add('active');
// Reset forms
document.getElementById('email').value = '';
document.getElementById('password').value = '';
document.getElementById('signup-name').value = '';
document.getElementById('signup-email').value = '';
document.getElementById('signup-password').value = '';
document.getElementById('signup-confirm-password').value = '';
}
// Check if already authenticated
if (localStorage.getItem('authenticated') === 'true') {
document.getElementById('auth-modal').classList.remove('active');
document.getElementById('app-container').style.display = 'flex';
const userName = localStorage.getItem('userName') || 'Auditor';
document.getElementById('user-name').textContent = userName;
}
// Tab switching
const sidebarItems = document.querySelectorAll('.sidebar-item');
sidebarItems.forEach(item => {
item.addEventListener('click', function() {
sidebarItems.forEach(i => i.classList.remove('active'));
this.classList.add('active');
const tabId = this.textContent.trim().toLowerCase().replace(' ', '-');
const tabContents = document.querySelectorAll('.tab-content');
tabContents.forEach(content => content.classList.remove('active'));
document.getElementById(tabId).classList.add('active');
});
});
// Mobile sidebar toggle
document.getElementById('mobile-sidebar-toggle').addEventListener('click', function() {
document.getElementById('mobile-sidebar').classList.toggle('hidden');
});
// Document upload and analysis
const dropzone = document.getElementById('dropzone');
const fileInput = document.getElementById('file-upload');
const analyzeBtn = document.getElementById('analyze-btn');
const fileInfo = document.getElementById('file-info');
const fileName = document.getElementById('file-name');
const fileSize = document.getElementById('file-size');
const removeFileBtn = document.getElementById('remove-file');
const uploadProgress = document.getElementById('upload-progress');
const progressBar = document.getElementById('progress-bar');
const progressPercentage = document.getElementById('progress-percentage');
const summaryPlaceholder = document.getElementById('summary-placeholder');
const documentSummary = document.getElementById('document-summary');
// Drag and drop events
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropzone.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
dropzone.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
dropzone.addEventListener(eventName, unhighlight, false);
});
function highlight() {
dropzone.classList.add('active');
}
function unhighlight() {
dropzone.classList.remove('active');
}
dropzone.addEventListener('drop', handleDrop, false);
function handleDrop(e) {
const dt = e.dataTransfer;
const files = dt.files;
handleFiles(files);
}
fileInput.addEventListener('change', function() {
handleFiles(this.files);
});
function handleFiles(files) {
if (files.length > 0) {
const file = files[0];
displayFileInfo(file);
simulateUpload(file);
}
}
function displayFileInfo(file) {
fileName.textContent = file.name;
fileSize.textContent = formatFileSize(file.size);
fileInfo.classList.remove('hidden');
analyzeBtn.disabled = false;
}
function formatFileSize(bytes) {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
}
function simulateUpload(file) {
uploadProgress.classList.remove('hidden');
let progress = 0;
const interval = setInterval(() => {
progress += Math.random() * 10;
if (progress > 100) progress = 100;
progressBar.style.width = `${progress}%`;
progressPercentage.textContent = `${Math.round(progress)}%`;
if (progress === 100) {
clearInterval(interval);
setTimeout(() => {
uploadProgress.classList.add('hidden');
}, 500);
}
}, 200);
}
removeFileBtn.addEventListener('click', function() {
fileInput.value = '';
fileInfo.classList.add('hidden');
uploadProgress.classList.add('hidden');
analyzeBtn.disabled = true;
documentSummary.classList.add('hidden');
summaryPlaceholder.classList.remove('hidden');
});
analyzeBtn.addEventListener('click', function() {
// Simulate analysis
analyzeBtn.disabled = true;
analyzeBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Analyzing...';
setTimeout(() => {
analyzeBtn.disabled = false;
analyzeBtn.textContent = 'Analyze Document';
summaryPlaceholder.classList.add('hidden');
documentSummary.classList.remove('hidden');
// In a real app, you would populate these with actual data from the analysis
document.getElementById('summary-type').textContent = 'Contract Agreement';
document.getElementById('summary-parties').textContent = 'ABC Corporation and XYZ Ltd.';
document.getElementById('summary-date').textContent = 'June 1, 2023';
document.getElementById('summary-term').textContent = '2 years';
const clausesList = document.getElementById('summary-clauses');
clausesList.innerHTML = '';
const clauses = [
'Payment terms: Net 30 days',
'Termination notice: 60 days',
'Liability cap: $100,000',
'Confidentiality: Standard NDA terms apply',
'Governing law: State of Delaware'
];
clauses.forEach(clause => {
const li = document.createElement('li');
li.textContent = clause;
clausesList.appendChild(li);
});
}, 2000);
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=samehelmalt/auditai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |