jayasrees commited on
Commit
414e495
·
1 Parent(s): 155dd44

Initial commit

Browse files
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements files into the container
8
+ COPY requirements.txt .
9
+ COPY backend/requirements.txt backend/requirements.txt
10
+
11
+ # Install any needed packages specified in requirements.txt
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+ RUN pip install --no-cache-dir -r backend/requirements.txt
14
+
15
+ # Copy the rest of the application's code into the container
16
+ COPY . .
17
+
18
+ # Make port 5000 available to the world outside this container
19
+ EXPOSE 5000
20
+
21
+ # Make port 8501 available for the streamlit app
22
+ EXPOSE 8501
23
+
24
+ # Define environment variable
25
+ ENV FLASK_APP=backend/app.py
26
+
27
+ # Run the Flask app and Streamlit app
28
+ CMD ["sh", "-c", "flask run --host=0.0.0.0 & streamlit run ui/app.py"]
frontend/app.js CHANGED
@@ -438,8 +438,6 @@ function initSummaryPage() {
438
  <article class="summary-item"><span>File</span><strong>${escapeHtml(meta.fileName || "-")}</strong></article>
439
  <article class="summary-item"><span>Scan Mode</span><strong>${escapeHtml(summary.scanMode || "-")}</strong></article>
440
  <article class="summary-item"><span>Threshold</span><strong>${escapeHtml(summary.threshold ?? "-")}</strong></article>
441
- <article class="summary-item"><span>Vendor</span><strong>${escapeHtml(summary.vendor || "Not found")}</strong></article>
442
- <article class="summary-item"><span>Vendee</span><strong>${escapeHtml(summary.vendee || "Not found")}</strong></article>
443
  <article class="summary-item"><span>Clauses</span><strong>${escapeHtml(summary.clauses ?? 0)}</strong></article>
444
  <article class="summary-item"><span>Pairs Compared</span><strong>${escapeHtml(summary.pairsCompared ?? 0)}</strong></article>
445
  <article class="summary-item"><span>Total Issues</span><strong>${escapeHtml(summary.issuesFound ?? 0)}</strong></article>
 
438
  <article class="summary-item"><span>File</span><strong>${escapeHtml(meta.fileName || "-")}</strong></article>
439
  <article class="summary-item"><span>Scan Mode</span><strong>${escapeHtml(summary.scanMode || "-")}</strong></article>
440
  <article class="summary-item"><span>Threshold</span><strong>${escapeHtml(summary.threshold ?? "-")}</strong></article>
 
 
441
  <article class="summary-item"><span>Clauses</span><strong>${escapeHtml(summary.clauses ?? 0)}</strong></article>
442
  <article class="summary-item"><span>Pairs Compared</span><strong>${escapeHtml(summary.pairsCompared ?? 0)}</strong></article>
443
  <article class="summary-item"><span>Total Issues</span><strong>${escapeHtml(summary.issuesFound ?? 0)}</strong></article>
frontend/favicon.ico ADDED
frontend/index.html ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Semantix • Legal Semantic Intelligence</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet" />
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
12
+ <style>
13
+ :root {
14
+ --navy: #0f172a;
15
+ }
16
+
17
+ .tail-container {
18
+ font-family: "Inter", system-ui, sans-serif;
19
+ }
20
+
21
+ .heading-font {
22
+ font-family: "Space Grotesk", sans-serif;
23
+ }
24
+
25
+ .hero-bg {
26
+ background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
27
+ }
28
+
29
+ .card {
30
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
31
+ }
32
+
33
+ .card:hover {
34
+ transform: translateY(-4px);
35
+ box-shadow: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.1);
36
+ }
37
+
38
+ .document-3d {
39
+ perspective: 1200px;
40
+ transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
41
+ }
42
+
43
+ .document-3d:hover {
44
+ transform: rotateX(12deg) rotateY(12deg) scale(1.03);
45
+ }
46
+
47
+ .document-inner {
48
+ box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4), 0 0 80px -20px rgb(129 140 248 / 0.6), inset 0 4px 12px rgba(255, 255, 255, 0.3);
49
+ }
50
+
51
+ .scan-line {
52
+ position: absolute;
53
+ top: 0;
54
+ left: 0;
55
+ width: 100%;
56
+ height: 4px;
57
+ background: linear-gradient(90deg, transparent, #a5b4fc, transparent);
58
+ animation: scan 4s linear infinite;
59
+ opacity: 0.6;
60
+ }
61
+
62
+ .switcher button.active {
63
+ background: #ffffff;
64
+ color: #111827;
65
+ box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
66
+ }
67
+
68
+ @keyframes scan {
69
+ 0% {
70
+ transform: translateY(-100%);
71
+ }
72
+
73
+ 100% {
74
+ transform: translateY(380px);
75
+ }
76
+ }
77
+
78
+ @media (max-width: 768px) {
79
+ .nav-mobile-hide {
80
+ display: none;
81
+ }
82
+ }
83
+ </style>
84
+ </head>
85
+ <body class="tail-container bg-zinc-50 text-slate-900">
86
+ <header class="bg-white border-b border-slate-200 sticky top-0 z-50">
87
+ <div class="max-w-7xl mx-auto px-6 md:px-8 py-5 flex items-center justify-between gap-4">
88
+ <div class="flex items-center gap-x-3">
89
+ <div class="w-9 h-9 bg-gradient-to-br from-indigo-600 to-violet-600 rounded-2xl flex items-center justify-center text-white font-bold text-2xl leading-none pt-0.5">S</div>
90
+ <a href="#home" class="heading-font text-3xl font-semibold tracking-tighter text-slate-900">Semantix</a>
91
+ </div>
92
+
93
+ <nav class="nav-mobile-hide md:flex items-center gap-x-10 text-sm font-medium">
94
+ <a href="#home" class="hover:text-indigo-600 transition-colors">Home</a>
95
+ <a href="#about" class="hover:text-indigo-600 transition-colors">About</a>
96
+ <a href="#service" class="hover:text-indigo-600 transition-colors">Service</a>
97
+ <a href="#contact" class="hover:text-indigo-600 transition-colors">Contact</a>
98
+ </nav>
99
+
100
+ <a href="#authView" class="px-5 py-2.5 text-sm font-semibold bg-indigo-600 hover:bg-indigo-700 text-white rounded-2xl transition-colors">Get Started</a>
101
+ </div>
102
+ </header>
103
+
104
+ <main>
105
+ <section id="home" class="hero-bg min-h-screen flex items-center relative overflow-hidden">
106
+ <div class="absolute inset-0 bg-[radial-gradient(at_50%_30%,rgba(129,140,248,0.15),transparent)]"></div>
107
+
108
+ <div class="max-w-7xl mx-auto px-6 md:px-8 grid md:grid-cols-12 gap-14 items-center relative z-10 py-16">
109
+ <div class="md:col-span-7">
110
+ <div class="inline-flex items-center gap-x-2 bg-white/10 backdrop-blur-md border border-white/20 text-white text-xs font-medium px-4 py-2 rounded-3xl mb-6">
111
+ <span class="relative flex h-3 w-3">
112
+ <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
113
+ <span class="relative inline-flex rounded-full h-3 w-3 bg-emerald-500"></span>
114
+ </span>
115
+ AI LEGAL INTELLIGENCE
116
+ </div>
117
+
118
+ <h1 class="heading-font text-5xl md:text-7xl leading-none font-semibold tracking-tighter text-white max-w-2xl">
119
+ Legal Document Analysis
120
+ </h1>
121
+
122
+
123
+
124
+ <div class="mt-12 flex justify-center md:justify-start">
125
+ <div class="document-3d relative inline-block">
126
+ <div class="document-inner w-[300px] md:w-[320px] h-[360px] md:h-[380px] bg-white rounded-3xl overflow-hidden border border-white/40 relative">
127
+ <div class="h-12 bg-gradient-to-r from-indigo-600 to-violet-600 flex items-center px-6 text-white text-sm font-medium">
128
+ CONTRACT • PAGE 1
129
+ </div>
130
+
131
+ <div class="p-6 space-y-3 text-[10px] leading-tight text-slate-700 font-mono">
132
+ <div class="h-2.5 bg-slate-200 rounded w-3/4"></div>
133
+ <div class="h-2.5 bg-slate-200 rounded w-11/12"></div>
134
+ <div class="h-2.5 bg-slate-200 rounded w-5/6"></div>
135
+ <div class="h-2.5 bg-slate-200 rounded w-full"></div>
136
+ <div class="h-2.5 bg-slate-200 rounded w-3/4"></div>
137
+ <div class="h-2.5 bg-slate-200 rounded w-10/12"></div>
138
+ </div>
139
+
140
+ <div class="absolute inset-0 bg-gradient-to-br from-indigo-400/10 to-violet-400/10 flex items-center justify-center">
141
+ <i class="fa-solid fa-wand-magic-sparkles text-white text-[120px] opacity-30"></i>
142
+ </div>
143
+ <div class="scan-line"></div>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+
149
+ <div class="md:col-span-5">
150
+ <section id="authView" class="bg-white rounded-3xl shadow-2xl p-8 md:p-10 card">
151
+ <div class="form-header mb-8">
152
+ <div class="switcher grid grid-cols-2 bg-slate-100 p-1 rounded-2xl mb-3" role="tablist" aria-label="Auth mode">
153
+ <button id="loginTab" class="active px-7 py-3 text-sm font-semibold rounded-[14px]" type="button">Login</button>
154
+ <button id="signupTab" class="px-7 py-3 text-sm font-semibold rounded-[14px]" type="button">Sign Up</button>
155
+ </div>
156
+ <p id="formSubtitle" class="text-slate-500 text-sm">Enter your credentials to access your account.</p>
157
+ </div>
158
+
159
+ <form id="authForm" class="space-y-5" novalidate>
160
+ <div id="nameField" class="hidden">
161
+ <label class="text-xs uppercase tracking-widest text-slate-500 block mb-1" for="fullName">Full Name</label>
162
+ <input id="fullName" name="fullName" type="text" placeholder="Jayasree" class="w-full bg-zinc-50 border border-slate-200 focus:border-indigo-500 rounded-2xl px-5 py-4 outline-none" />
163
+ </div>
164
+ <div>
165
+ <label class="text-xs uppercase tracking-widest text-slate-500 block mb-1" for="email">Email</label>
166
+ <input id="email" name="email" type="email" placeholder="you@lawfirm.in" autocomplete="email" required class="w-full bg-zinc-50 border border-slate-200 focus:border-indigo-500 rounded-2xl px-5 py-4 outline-none" />
167
+ </div>
168
+ <div>
169
+ <label class="text-xs uppercase tracking-widest text-slate-500 block mb-1" for="password">Password</label>
170
+ <input id="password" name="password" type="password" placeholder="Minimum 6 characters" autocomplete="current-password" required class="w-full bg-zinc-50 border border-slate-200 focus:border-indigo-500 rounded-2xl px-5 py-4 outline-none" />
171
+ </div>
172
+ <button id="submitBtn" type="submit" class="w-full bg-indigo-600 hover:bg-indigo-700 transition-colors text-white font-semibold py-4 rounded-3xl">Login</button>
173
+ </form>
174
+ <p id="message" class="text-center text-sm mt-6 text-slate-500"></p>
175
+ </section>
176
+ </div>
177
+ </div>
178
+ </section>
179
+
180
+ <section id="about" class="py-20 bg-white">
181
+ <div class="max-w-4xl mx-auto px-8 text-center">
182
+ <h2 class="heading-font text-4xl md:text-5xl font-semibold tracking-tighter mb-6">Reliable. Precise. Intelligent.</h2>
183
+ <p class="text-lg text-slate-600 max-w-2xl mx-auto">
184
+ Semantix delivers clear, accurate semantic analysis of legal documents, helping you catch issues instantly and work with confidence.
185
+ </p>
186
+ </div>
187
+ </section>
188
+
189
+ <section id="service" class="py-24 bg-slate-50">
190
+ <div class="max-w-7xl mx-auto px-8">
191
+ <h2 class="heading-font text-center text-4xl md:text-5xl font-semibold tracking-tighter mb-16">Built for serious legal work</h2>
192
+ <div class="grid md:grid-cols-3 gap-8">
193
+ <div class="bg-white p-10 rounded-3xl card text-center">
194
+ <div class="text-5xl mb-6">🔐</div>
195
+ <h3 class="font-semibold text-xl">Enterprise Security</h3>
196
+ <p class="text-slate-500 mt-3">Your documents stay private and protected.</p>
197
+ </div>
198
+ <div class="bg-white p-10 rounded-3xl card text-center">
199
+ <div class="text-5xl mb-6">🧠</div>
200
+ <h3 class="font-semibold text-xl">Smart Analysis</h3>
201
+ <p class="text-slate-500 mt-3">Understands legal language like a senior counsel.</p>
202
+ </div>
203
+ <div class="bg-white p-10 rounded-3xl card text-center">
204
+ <div class="text-5xl mb-6">📈</div>
205
+ <h3 class="font-semibold text-xl">Instant Insights</h3>
206
+ <p class="text-slate-500 mt-3">Visual dashboard with line-level clarity.</p>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </section>
211
+
212
+ <section id="contact" class="py-20 bg-slate-900 text-white text-center">
213
+ <div class="max-w-7xl mx-auto px-8">
214
+ <p class="text-sm uppercase tracking-widest text-slate-400">Made for legal professionals</p>
215
+ <h2 class="heading-font text-4xl mt-4">Ready for flawless contracts?</h2>
216
+ <a href="mailto:hello@semantix.ai" class="inline-block mt-10 px-10 py-4 bg-white text-slate-900 font-semibold rounded-3xl hover:bg-indigo-50 transition-colors">Contact Us</a>
217
+ <p class="mt-20 text-xs text-slate-500">© 2026 Semantix • Legal Semantic Intelligence</p>
218
+ </div>
219
+ </section>
220
+ </main>
221
+
222
+ <script src="app.js"></script>
223
+ </body>
224
+ </html>
frontend/issues.html CHANGED
@@ -29,10 +29,9 @@
29
  <main class="flow-main">
30
  <section class="container flow-card">
31
  <div class="upload-header">
32
- <h1>Line-Level Analysis</h1>
33
  <span id="userBadge" class="user-badge"></span>
34
  </div>
35
- <p class="upload-subtitle">Inconsistencies, contradictions, and duplications with page and line references.</p>
36
 
37
  <div id="issueStats" class="stats-grid"></div>
38
  <div id="lineIssueTables"></div>
 
29
  <main class="flow-main">
30
  <section class="container flow-card">
31
  <div class="upload-header">
32
+ <h1>Analysis</h1>
33
  <span id="userBadge" class="user-badge"></span>
34
  </div>
 
35
 
36
  <div id="issueStats" class="stats-grid"></div>
37
  <div id="lineIssueTables"></div>
frontend/upload.html CHANGED
@@ -72,9 +72,7 @@
72
  </div>
73
  </form>
74
 
75
- <div id="loadingState" class="loading-panel hidden" aria-live="polite">
76
- <div class="spinner"></div>
77
- <p>Analyzing document. Please wait...</p>
78
  </div>
79
 
80
  <p id="uploadMessage" class="message" aria-live="polite"></p>
 
72
  </div>
73
  </form>
74
 
75
+ <div id="loadingState" class="loading-panel hidden" aria-live="polite"></div>
 
 
76
  </div>
77
 
78
  <p id="uploadMessage" class="message" aria-live="polite"></p>