aiinfinite latest code

This commit is contained in:
2026-10-07 17:31:08 +05:30
commit e6cca0fe46
50 changed files with 28776 additions and 0 deletions
+129
View File
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Learn about AI Infinite - Empowering businesses with AI-driven document processing and data extraction." />
<meta name="keywords" content="AI Infinite, about us, document processing, data extraction, AI automation" />
<title>About Us - AI Infinite</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" />
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800 font-sans">
<!-- Navigation (matched to Invoice page) -->
<!-- Updated Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center">
<!-- Logo / Brand -->
<a href="{{ url_for('home_logged_in') if logged_in else url_for('index') }}" class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo" class="h-12 md:h-16 w-auto" />
<span class="text-xl font-bold text-gray-800"></span>
</a>
<!-- Combined Right-side Links -->
<div class="hidden md:flex items-center ml-auto space-x-12">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-semibold">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<!-- Mobile Menu Button -->
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<!-- Mobile Menu Content -->
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Main Content -->
<section class="py-24 bg-gray-50 mt-16">
<div class="container mx-auto px-6 space-y-20">
<!-- What We Do -->
<div data-aos="fade-up">
<h2 class="text-4xl font-bold text-center mb-6">What We Do</h2>
<p class="text-lg text-gray-600 text-center max-w-3xl mx-auto">AI Infinite empowers businesses to streamline document processing using advanced OCR and machine learning. Our tools automate data extraction from invoices, passports, and more—reducing manual work by up to 90%.</p>
</div>
<!-- Our Vision -->
<div data-aos="fade-up" data-aos-delay="100">
<h2 class="text-4xl font-bold text-center mb-6">Our Vision</h2>
<p class="text-lg text-gray-600 text-center max-w-3xl mx-auto">We envision a world where AI is as intuitive and accessible as the internet. Our mission is to embed AI seamlessly into workflows, making automation a natural extension of every business process.</p>
</div>
<!-- Get in Touch Form -->
<div data-aos="fade-up" data-aos-delay="200">
<h2 class="text-4xl font-bold text-center mb-6">Get in Touch</h2>
<p class="text-lg text-gray-600 text-center mb-6">Have questions? Reach out to our team today.</p>
<form action="#submit" method="POST" class="max-w-2xl mx-auto space-y-4">
<input type="email" name="email" placeholder="Your Work Email*" required class="w-full p-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500">
<input type="tel" name="phone" placeholder="Contact Number" class="w-full p-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500">
<textarea name="message" rows="4" placeholder="How Can We Help You?*" required class="w-full p-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500"></textarea>
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-3 rounded-lg font-semibold transition">Send Message</button>
</form>
</div>
<!-- Request a Demo -->
<div class="text-center" data-aos="fade-up" data-aos-delay="300">
<h3 class="text-2xl font-bold mb-4">Talk to an AI Expert</h3>
<p class="text-gray-600 mb-6 max-w-xl mx-auto">Book a free 15-minute call with our automation specialists to explore integrations, pricing, or see a live demo.</p>
<a href="#demo" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded-lg text-lg transition transform hover:scale-105">Request a Demo</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-gray-200 py-10">
<div class="container mx-auto px-6 text-center space-y-4">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" class="h-10 mx-auto" alt="AI Infinite">
<p>
<a href="#api-docs" class="hover:underline mx-2">API</a> |
<a href="#help" class="hover:underline mx-2">Help Center</a> |
<a href="#blog" class="hover:underline mx-2">Blog</a> |
<a href="#careers" class="hover:underline mx-2">Careers</a>
</p>
<p class="text-sm">+91 82753 67267 | connect@aiindia.ai | Pune, Maharashtra 411009</p>
<div class="text-lg">
<a href="https://twitter.com/AiIndia2?s=09" class="mx-2 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="https://www.linkedin.com/company/ai-india/" class="mx-2 hover:text-white"><i class="fab fa-linkedin"></i></a>
<a href="#" class="mx-2 hover:text-white"><i class="fab fa-medium"></i></a>
</div>
<p class="text-sm">© 2025 AI Infinite Technologies Inc.</p>
</div>
</footer>
<!-- Scripts -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({ duration: 800, once: true });
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
</script>
</body>
</html>
+178
View File
@@ -0,0 +1,178 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Admin Dashboard – AI Infinite</title>
<!-- Google Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<!-- DataTables CSS -->
<link
href="https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css"
rel="stylesheet"
/>
<style>
body {
font-family: 'Roboto', sans-serif;
background-color: #f0f2f5;
padding: 2rem;
}
h2 {
color: #007BFF;
margin-bottom: 1.5rem;
font-weight: 700;
}
.dataTables_wrapper .dataTables_filter input {
width: 250px;
margin-left: 0.5rem;
}
.alert-fixed {
position: fixed;
top: 1rem;
right: 1rem;
z-index: 1050;
}
</style>
</head>
<body>
<div class="container-fluid">
<h2>Admin Dashboard</h2>
<!-- Alert placeholder -->
<div id="alert-area"></div>
<table
id="users-table"
class="table table-striped table-bordered align-middle"
style="width:100%"
>
<thead class="table-primary">
<tr>
<th>Username</th>
<th>Email</th>
<th>Phone</th>
<th>Invoices<br>Extracted</th>
<th>API Key</th>
<th>Account Limit</th>
<th>Update</th>
</tr>
</thead>
<tbody>
{% for user in user_activity %}
<tr>
<td>{{ user.username }}</td>
<td>{{ user.email }}</td>
<td>{{ user.phone or '—' }}</td>
<td>{{ user.invoices_extracted }}</td>
<td>
{% if user.api_keys %}
<code>{{ user.api_keys[0].api_key }}</code>
{% else %}
<em>N/A</em>
{% endif %}
</td>
<td>
<input
type="number"
id="limit-{{ user.user_id }}"
class="form-control form-control-sm text-center"
value="{{ user.account_limit }}"
min="1"
/>
</td>
<td class="text-center">
<button
class="btn btn-sm btn-success"
onclick="updateUserLimit('{{ user.user_id }}')"
>
Update
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ url_for('logout') }}" class="btn btn-danger mt-3">
<i class="fas fa-sign-out-alt"></i> Logout
</a>
</div>
<!-- JS dependencies -->
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
></script>
<script
src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"
></script>
<script
src="https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap5.min.js"
></script>
<script>
// Initialize DataTable
$(document).ready(function() {
$('#users-table').DataTable({
pageLength: 10,
lengthChange: false,
language: {
search: "<strong>Filter:</strong>"
},
columnDefs: [
{ orderable: false, targets: [2,5,6] } // disable sort on Phone, Limit, Update
]
});
});
// Show bootstrap alert
function showAlert(type, message) {
const html = `
<div class="alert alert-${type} alert-dismissible fade show alert-fixed" role="alert">
${message}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>`;
$('#alert-area').append(html);
setTimeout(() => {
$('.alert-fixed').alert('close');
}, 3000);
}
// AJAX update
function updateUserLimit(userId) {
const newLimit = $('#limit-' + userId).val();
if (newLimit < 1) {
showAlert('danger', 'Limit must be ≥ 1');
return;
}
fetch('/admin/update-user-limit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ user_id: userId, new_account_limit: newLimit })
})
.then(res => res.json())
.then(data => {
if (data.message) {
showAlert('success', data.message);
} else {
showAlert('danger', data.error || 'Update failed');
}
})
.catch(err => {
console.error(err);
showAlert('danger', 'Network error');
});
}
</script>
</body>
</html>
+192
View File
@@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forgot Password - AIInfinite</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
:root {
--white: #ffffff;
--text-dark: #1a1a1a;
--primary-color: #003087;
--secondary-color: #666666;
--background-light: #f0f2f5;
--error-color: #d32f2f;
--success-color: #155724;
}
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
color: var(--text-dark);
background: var(--background-light);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.auth-form {
background: var(--white);
padding: 4rem;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
margin: 2rem;
animation: slideIn 0.5s ease-in-out;
}
@keyframes slideIn {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.form-title {
font-size: 2.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
text-align: center;
}
.form-subtitle {
color: var(--secondary-color);
margin-bottom: 2rem;
text-align: center;
}
.auth-form-group {
margin-bottom: 1.5rem;
}
.auth-form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: var(--secondary-color);
}
.auth-form-group input {
width: 100%;
padding: 1rem;
border: 2px solid var(--background-light);
border-radius: 8px;
font-size: 1rem;
transition: all 0.3s ease;
}
.auth-form-group input:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 8px rgba(0, 48, 135, 0.2);
}
.btn-primary {
width: 100%;
padding: 1rem;
background: var(--primary-color);
color: var(--white);
border: none;
border-radius: 8px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.3s ease;
}
.btn-primary:hover {
background: #002366;
}
.switch-auth {
text-align: center;
margin-top: 2rem;
}
.btn-link {
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
}
.btn-link:hover {
text-decoration: underline;
}
.security-note {
color: var(--secondary-color);
font-size: 0.9rem;
margin-top: 1rem;
text-align: center;
}
.flash-messages {
list-style: none;
padding: 0;
margin: 1rem 0;
}
.flash-message {
padding: 1rem;
margin: 1rem 0;
border-radius: 8px;
font-weight: 500;
text-align: center;
}
.flash-message.success {
background-color: #d4edda;
color: var(--success-color);
}
.flash-message.error {
background-color: #f8d7da;
color: var(--error-color);
}
@media (max-width: 768px) {
.auth-form {
padding: 2rem;
margin: 1rem;
}
.form-title {
font-size: 1.8rem;
}
}
</style>
</head>
<body>
<div class="auth-form">
<h1 class="form-title">Reset Password</h1>
<p class="form-subtitle">Enter your email to receive reset instructions</p>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<ul class="flash-messages">
{% for category, message in messages %}
<li class="flash-message {{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('forgot_password') }}" method="POST">
<div class="auth-form-group">
<label for="email">Email Address</label>
<input type="email" id="email" name="email" required>
</div>
<button type="submit" class="btn-primary">Send Reset Link</button>
<div class="switch-auth">
<p>Remember your password? <a href="{{ url_for('login') }}" class="btn-link">Sign In</a></p>
<p class="security-note"><i class="fas fa-lock"></i> Secured with SSL Encryption</p>
</div>
</form>
</div>
</body>
</html>
+271
View File
@@ -0,0 +1,271 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login to AIInfinite</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
:root {
--white: #ffffff;
--text-dark: #1a1a1a;
--primary-color: #003087;
--secondary-color: #666666;
--background-light: #f0f2f5;
--error-color: #d32f2f;
--success-color: #155724;
}
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
color: var(--text-dark);
background: var(--background-light);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.auth-form {
background: var(--white);
padding: 4rem;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
margin: 2rem;
animation: slideIn 0.5s ease-in-out;
}
@keyframes slideIn {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.form-title {
font-size: 2.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
text-align: center;
}
.form-subtitle {
color: var(--secondary-color);
margin-bottom: 2rem;
text-align: center;
}
.auth-form-group {
margin-bottom: 1.5rem;
}
.auth-form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: var(--secondary-color);
}
.auth-form-group input {
width: 100%;
padding: 1rem;
border: 2px solid var(--background-light);
border-radius: 8px;
font-size: 1rem;
transition: all 0.3s ease;
}
.auth-form-group input:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 8px rgba(0, 48, 135, 0.2);
}
.auth-form-checkbox {
margin-bottom: 1.5rem;
display: flex;
align-items: center;
font-size: 0.95rem;
color: var(--secondary-color);
}
.auth-form-checkbox input {
margin-right: 8px;
}
.btn-primary {
width: 100%;
padding: 1rem;
background: var(--primary-color);
color: var(--white);
border: none;
border-radius: 8px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.3s ease;
}
.btn-primary:hover {
background: #002366;
}
.switch-auth {
text-align: center;
margin-top: 2rem;
}
.btn-link {
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
}
.btn-link:hover {
text-decoration: underline;
}
.security-note {
color: var(--secondary-color);
font-size: 0.9rem;
margin-top: 1rem;
text-align: center;
}
.flash-messages {
list-style: none;
padding: 0;
margin: 1rem 0;
}
.flash-message {
padding: 1rem;
margin: 1rem 0;
border-radius: 8px;
font-weight: 500;
text-align: center;
}
.flash-message.success {
background-color: #d4edda;
color: var(--success-color);
}
.flash-message.error {
background-color: #f8d7da;
color: var(--error-color);
}
@media (max-width: 768px) {
.auth-form {
padding: 2rem;
margin: 1rem;
}
.form-title {
font-size: 1.8rem;
}
/* ===== FORCE DMH BUTTON TOP RIGHT ===== */
.btn-dmh-global {
position: fixed;
top: 20px;
right: 20px;
/* 🔴 RIGHT SIDE */
padding: 10px 24px;
background-color: #003087 !important;
color: #ffffff !important;
border-radius: 6px;
font-size: 0.95rem;
font-weight: 600;
text-decoration: none !important;
z-index: 9999;
}
.btn-dmh-global:hover {
background-color: #002366 !important;
}
}
</style>
</head>
<body>
<a href="{{ url_for('login') }}" class="btn-dmh-global"
style="position:fixed;top:20px;right:20px;background:blue;color:white;padding:10px;">
DMH
</a>
<div class="auth-form">
<!-- <a href="{{ url_for('login') }}" class="btn-primary">
DMH
</a> -->
<h1 class="form-title">Login to AI Infinite</h1>
<p class="form-subtitle">Securely access your account</p>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<ul class="flash-messages">
{% for category, message in messages %}
<li class="flash-message {{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('login') }}" method="POST">
<div class="auth-form-group">
<label for="username">Username/Email</label>
<input type="text" id="username" name="username" required>
</div>
<div class="auth-form-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
</div>
<!-- 👇 Remember Me Checkbox -->
<div class="auth-form-checkbox">
<input type="checkbox" id="remember" name="remember" value="yes">
<label for="remember">Remember Me</label>
</div>
<!-- <button type="submit" class="btn-primary">Sign In</button> -->
<div class="login-actions">
<button type="submit" class="btn-primary">
Sign In
</button>
</div>
<div class="switch-auth">
<p>Don't have an account? <a href="{{ url_for('signup') }}" class="btn-link">Create Account</a></p>
<p><a href="{{ url_for('forgot_password') }}" class="btn-link">Forgot Password?</a></p>
<p class="security-note"><i class="fas fa-lock"></i> Secured with SSL Encryption</p>
</div>
</form>
</div>
</body>
</html>
+197
View File
@@ -0,0 +1,197 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reset Password - AI Infinite</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
:root {
--white: #ffffff;
--text-dark: #1a1a1a;
--primary-color: #003087;
--secondary-color: #666666;
--background-light: #f0f2f5;
--error-color: #d32f2f;
--success-color: #155724;
}
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
color: var(--text-dark);
background: var(--background-light);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.auth-form {
background: var(--white);
padding: 4rem;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
margin: 2rem;
animation: slideIn 0.5s ease-in-out;
}
@keyframes slideIn {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.form-title {
font-size: 2.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
text-align: center;
}
.form-subtitle {
color: var(--secondary-color);
margin-bottom: 2rem;
text-align: center;
}
.auth-form-group {
margin-bottom: 1.5rem;
}
.auth-form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: var(--secondary-color);
}
.auth-form-group input {
width: 100%;
padding: 1rem;
border: 2px solid var(--background-light);
border-radius: 8px;
font-size: 1rem;
transition: all 0.3s ease;
}
.auth-form-group input:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 8px rgba(0, 48, 135, 0.2);
}
.btn-primary {
width: 100%;
padding: 1rem;
background: var(--primary-color);
color: var(--white);
border: none;
border-radius: 8px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.3s ease;
}
.btn-primary:hover {
background: #002366;
}
.switch-auth {
text-align: center;
margin-top: 2rem;
}
.btn-link {
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
}
.btn-link:hover {
text-decoration: underline;
}
.security-note {
color: var(--secondary-color);
font-size: 0.9rem;
margin-top: 1rem;
text-align: center;
}
.flash-messages {
list-style: none;
padding: 0;
margin: 1rem 0;
}
.flash-message {
padding: 1rem;
margin: 1rem 0;
border-radius: 8px;
font-weight: 500;
text-align: center;
}
.flash-message.success {
background-color: #d4edda;
color: var(--success-color);
}
.flash-message.error {
background-color: #f8d7da;
color: var(--error-color);
}
@media (max-width: 768px) {
.auth-form {
padding: 2rem;
margin: 1rem;
}
.form-title {
font-size: 1.8rem;
}
}
</style>
</head>
<body>
<div class="auth-form">
<h1 class="form-title">Reset Password</h1>
<p class="form-subtitle">Enter your new password</p>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<ul class="flash-messages">
{% for category, message in messages %}
<li class="flash-message {{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('reset_password') }}" method="POST">
<div class="auth-form-group">
<label for="password">New Password</label>
<input type="password" id="password" name="password" required>
</div>
<div class="auth-form-group">
<label for="confirm_password">Confirm New Password</label>
<input type="password" id="confirm_password" name="confirm_password" required>
</div>
<button type="submit" class="btn-primary">Reset Password</button>
<div class="switch-auth">
<p>Back to <a href="{{ url_for('login') }}" class="btn-link">Login</a></p>
<p class="security-note"><i class="fas fa-lock"></i> Secured with SSL Encryption</p>
</div>
</form>
</div>
</body>
</html>
+229
View File
@@ -0,0 +1,229 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Sign Up – AI Infinite</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
/>
<style>
:root {
--white: #ffffff;
--text-dark: #1a1a1a;
--primary: #003087;
--primary-hover: #002366;
--secondary: #666666;
--bg-light: #f0f2f5;
--error: #d32f2f;
--success: #155724;
--input-border: #ddd;
}
* { box-sizing: border-box; }
body {
font-family: 'Inter', sans-serif;
margin: 0; padding: 0;
color: var(--text-dark);
background: var(--bg-light);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.auth-form {
background: var(--white);
padding: 3rem;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0,0,0,0.1);
width: 100%;
max-width: 480px;
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.form-title {
font-size: 2rem;
font-weight: 600;
text-align: center;
margin-bottom: 0.25rem;
}
.form-sub {
color: var(--secondary);
text-align: center;
margin-bottom: 1.5rem;
}
.form-group {
margin-bottom: 1.25rem;
}
.form-group label {
display: block;
font-weight: 500;
margin-bottom: 0.5rem;
color: var(--secondary);
}
.form-group input {
width: 100%;
padding: 0.85rem 1rem;
border: 1.5px solid var(--input-border);
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
border-color: var(--primary);
box-shadow: 0 0 6px rgba(0, 48, 135, 0.2);
outline: none;
}
.form-group input:invalid {
border-color: var(--error);
}
.btn-primary {
width: 100%;
padding: 0.9rem;
background: var(--primary);
color: var(--white);
font-size: 1.05rem;
font-weight: 600;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover {
background: var(--primary-hover);
}
.switch-auth {
text-align: center;
margin-top: 1.75rem;
}
.btn-link {
color: var(--primary);
text-decoration: none;
font-weight: 600;
}
.btn-link:hover {
text-decoration: underline;
}
.security-note {
color: var(--secondary);
font-size: 0.85rem;
margin-top: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
}
.security-note i {
margin-right: 0.4rem;
}
.flash-messages {
list-style: none;
padding: 0;
margin: 1rem 0;
}
.flash-message {
padding: 0.9rem 1rem;
margin-bottom: 0.75rem;
border-radius: 8px;
font-weight: 500;
text-align: center;
}
.flash-message.success {
background: #d4edda;
color: var(--success);
}
.flash-message.error {
background: #f8d7da;
color: var(--error);
}
@media (max-width: 500px) {
.auth-form { padding: 2rem; }
.form-title { font-size: 1.7rem; }
}
</style>
</head>
<body>
<div class="auth-form">
<h1 class="form-title">Sign Up for AI Infinite</h1>
<p class="form-sub">Create your account to get started</p>
{% with msgs = get_flashed_messages(with_categories=true) %}
{% if msgs %}
<ul class="flash-messages">
{% for cat, msg in msgs %}
<li class="flash-message {{ cat }}">{{ msg }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('signup') }}" method="POST" novalidate>
<div class="form-group">
<label for="username">Username</label>
<input
type="text"
id="username"
name="username"
required
minlength="3"
placeholder="Choose a username"
/>
</div>
<div class="form-group">
<label for="email">Email address</label>
<input
type="email"
id="email"
name="email"
required
placeholder="you@example.com"
/>
</div>
<div class="form-group">
<label for="phone">Phone number</label>
<input
type="tel"
id="phone"
name="phone"
required
pattern="^\+\d{1,3}\s?\d{4,14}$"
placeholder="+91 98765 43210"
/>
</div>
<div class="form-group">
<label for="password">Password</label>
<input
type="password"
id="password"
name="password"
required
minlength="6"
placeholder="Create a secure password"
/>
</div>
<button type="submit" class="btn-primary">Sign Up</button>
<div class="switch-auth">
<p>
Already have an account?
<a href="{{ url_for('login') }}" class="btn-link">Log In</a>
</p>
<p class="security-note">
<i class="fas fa-lock"></i> Secured with SSL Encryption
</p>
</div>
</form>
</div>
</body>
</html>
View File
+396
View File
@@ -0,0 +1,396 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Dashboard - AI Infinite</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Global Styles (unchanged) */
:root {
--primary-color: #007bff;
--background-light: #f8f9fa;
--text-dark: #333;
--white: #fff;
}
body {
font-family: Arial, sans-serif;
color: var(--text-dark);
margin: 0;
padding: 0;
line-height: 1.6;
background-color: var(--background-light);
}
.navbar {
background-color: #f7f7f7;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
display: flex;
align-items: center;
}
.navbar-toggler {
padding: 0.25rem 0.5rem;
border: none;
}
.navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 123, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-container {
display: flex;
min-height: calc(100vh - 60px);
}
.sidebar {
width: 250px;
background-color: var(--white);
border-right: 1px solid #dee2e6;
padding: 1.5rem;
position: fixed;
height: 100%;
z-index: 1000;
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.sidebar.active {
transform: translateX(0);
}
.sidebar .nav-link {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-dark);
padding: 0.75rem 1rem;
margin: 0.3rem 0;
border-radius: 5px;
text-decoration: none;
transition: background-color 0.3s;
}
.sidebar .nav-link:hover {
background-color: var(--background-light);
}
.sidebar .nav-link.active {
background-color: #e9ecef;
font-weight: bold;
}
.container {
max-width: 800px;
margin: 2rem auto;
padding: 0 1rem;
flex-grow: 1;
}
.card {
background-color: var(--white);
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
margin-top: 1.5rem;
}
.card-title {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.form-label {
font-weight: 500;
color: var(--text-dark);
}
.form-control {
border-radius: 5px;
border: 1px solid #ccc;
padding: 0.75rem;
width: 100%;
margin-bottom: 1rem;
}
.btn-primary {
background-color: var(--primary-color);
color: var(--white);
padding: 0.75rem 1.5rem;
border: none;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s;
width: 100%;
}
.btn-primary:hover {
background-color: #0056b3;
}
.loading-container {
display: none;
justify-content: center;
align-items: center;
gap: 10px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.dot {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: var(--primary-color);
animation: bounce 1.5s infinite ease-in-out;
}
.dot:nth-child(1) {
animation-delay: 0s;
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.modal-body {
padding: 1rem;
max-height: 300px;
overflow-y: auto;
}
.modal-body p {
margin-bottom: 1rem;
}
.btn-secondary {
background-color: #6c757d;
color: var(--white);
padding: 0.5rem 1rem;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.btn-secondary:hover {
background-color: #5a6268;
}
@media (max-width: 768px) {
.sidebar {
width: 220px;
}
.container {
max-width: 90%;
margin: 1rem auto;
}
.navbar {
flex-direction: column;
align-items: flex-start;
}
}
@media (max-width: 480px) {
.card {
padding: 1rem;
}
.card-title {
font-size: 1.25rem;
}
.btn-primary {
padding: 0.5rem 1rem;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="container-fluid">
<button class="navbar-toggler" id="sidebarToggle"><span class="navbar-toggler-icon"></span></button>
<a href="{{ url_for('index') }}" class="navbar-brand">
<a src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo"
style="height: 40px;">
</a>
</div>
</nav>
<div class="main-container">
<div class="sidebar">
<div class="nav flex-column">
<a class="nav-link" href="{{ url_for('home_logged_in') }}"><i class="fas fa-home"></i> Home
</a>
<a class="nav-link active" href="{{ url_for('dashboard') }}"><i class="fas fa-tachometer-alt"></i>
Dashboard Overview</a>
<a href="{{ url_for('view_history') }}" class="nav-link"><i class="fas fa-history"></i> View Document
History</a>
<a href="javascript:void(0);" class="nav-link" id="generate-api-key-btn"><i class="fas fa-key"></i>
Generate API Key</a>
<a href="javascript:void(0);" class="nav-link" id="view-api-key-btn"><i class="fas fa-eye"></i> View API
Key</a>
<a class="nav-link" href="{{ url_for('logout') }}"><i class="fas fa-sign-out-alt"></i> Logout</a>
</div>
</div>
<div class="container">
<!-- Flash Messages -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
<strong>{{ message }}</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<!-- Upload Document Card -->
<div class="card">
<div class="card-body">
<h5 class="card-title">Upload Document</h5>
<form id="upload-form" action="{{ url_for('upload_image') }}" method="POST"
enctype="multipart/form-data">
<div class="mb-3">
<label for="doc_type" class="form-label">Select Document Type</label>
<select class="form-control" id="doc_type" name="doc_type" required>
<option value="invoice">Invoice</option>
<option value="passport">Passport</option>
</select>
</div>
<div class="mb-3">
<label for="file" class="form-label">Choose Document File (PDF or Image)</label>
<input type="file" class="form-control" id="file" name="file"
accept="image/*,application/pdf" required>
</div>
<button type="submit" class="btn btn-primary">Upload and Extract</button>
</form>
</div>
</div>
<div class="loading-container" id="loading-container">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
</div>
</div>
<!-- Modal for API Key Display -->
<div class="modal fade" id="apiKeyModal" tabindex="-1" aria-labelledby="apiKeyModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="apiKeyModalLabel">Your API Key</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Your API Key: <span id="api-key-value"></span></p>
<button class="btn btn-secondary" onclick="copyToClipboard()">Copy</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Sidebar Toggle
document.getElementById('sidebarToggle').addEventListener('click', function () {
document.querySelector('.sidebar').classList.toggle('active');
});
// Generate API Key
document.getElementById('generate-api-key-btn').addEventListener('click', function () {
fetch("{{ url_for('generate_api_key') }}", {
method: "POST",
headers: { "Content-Type": "application/json" },
credentials: "same-origin"
})
.then(response => response.json())
.then(data => {
if (data.success) {
document.getElementById('api-key-value').innerText = data.api_key;
new bootstrap.Modal(document.getElementById('apiKeyModal')).show();
} else {
alert('Error: ' + data.error);
}
})
.catch(error => alert("An error occurred while generating the API key."));
});
// View API Key
document.getElementById('view-api-key-btn').addEventListener('click', function () {
fetch("{{ url_for('get_api_key') }}", {
method: "GET",
credentials: "same-origin"
})
.then(response => response.json())
.then(data => {
if (data.success) {
document.getElementById('api-key-value').innerText = data.api_key;
new bootstrap.Modal(document.getElementById('apiKeyModal')).show();
} else {
alert('Error: ' + data.error);
}
})
.catch(error => alert("An error occurred while fetching the API key."));
});
// Copy to Clipboard
function copyToClipboard() {
const apiKey = document.getElementById('api-key-value').innerText;
navigator.clipboard.writeText(apiKey).then(() => {
alert('API Key copied to clipboard');
}, () => {
alert('Failed to copy API Key');
});
}
// Loading Animation
document.getElementById('upload-form').addEventListener('submit', function () {
document.getElementById('loading-container').style.display = 'flex';
});
</script>
</body>
</html>
+425
View File
@@ -0,0 +1,425 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Dashboard - AI Infinite</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Global Styles (unchanged) */
:root {
--primary-color: #007bff;
--background-light: #f8f9fa;
--text-dark: #333;
--white: #fff;
}
body {
font-family: Arial, sans-serif;
color: var(--text-dark);
margin: 0;
padding: 0;
line-height: 1.6;
background-color: var(--background-light);
}
.navbar {
background-color: #f7f7f7;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
display: flex;
align-items: center;
}
.navbar-toggler {
padding: 0.25rem 0.5rem;
border: none;
}
.navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 123, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-container {
display: flex;
min-height: calc(100vh - 60px);
}
.sidebar {
width: 250px;
background-color: var(--white);
border-right: 1px solid #dee2e6;
padding: 1.5rem;
position: fixed;
height: 100%;
z-index: 1000;
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.sidebar.active {
transform: translateX(0);
}
.sidebar .nav-link {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-dark);
padding: 0.75rem 1rem;
margin: 0.3rem 0;
border-radius: 5px;
text-decoration: none;
transition: background-color 0.3s;
}
.sidebar .nav-link:hover {
background-color: var(--background-light);
}
.sidebar .nav-link.active {
background-color: #e9ecef;
font-weight: bold;
}
.container {
max-width: 800px;
margin: 2rem auto;
padding: 0 1rem;
flex-grow: 1;
}
.card {
background-color: var(--white);
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
margin-top: 1.5rem;
}
.card-title {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.form-label {
font-weight: 500;
color: var(--text-dark);
}
.form-control {
border-radius: 5px;
border: 1px solid #ccc;
padding: 0.75rem;
width: 100%;
margin-bottom: 1rem;
}
.btn-primary {
background-color: var(--primary-color);
color: var(--white);
padding: 0.75rem 1.5rem;
border: none;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s;
width: 100%;
}
.btn-primary:hover {
background-color: #0056b3;
}
.loading-container {
display: none;
justify-content: center;
align-items: center;
gap: 10px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.dot {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: var(--primary-color);
animation: bounce 1.5s infinite ease-in-out;
}
.dot:nth-child(1) {
animation-delay: 0s;
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.modal-body {
padding: 1rem;
max-height: 300px;
overflow-y: auto;
}
.modal-body p {
margin-bottom: 1rem;
}
.btn-secondary {
background-color: #6c757d;
color: var(--white);
padding: 0.5rem 1rem;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.btn-secondary:hover {
background-color: #5a6268;
}
@media (max-width: 768px) {
.sidebar {
width: 220px;
}
.container {
max-width: 90%;
margin: 1rem auto;
}
.navbar {
flex-direction: column;
align-items: flex-start;
}
}
@media (max-width: 480px) {
.card {
padding: 1rem;
}
.card-title {
font-size: 1.25rem;
}
.btn-primary {
padding: 0.5rem 1rem;
}
}
</style>
</head>
<body>
<nav class="navbar navbar-light bg-white shadow-sm">
<div class="container-fluid d-flex align-items-center justify-content-center position-relative">
<!-- Sidebar Toggle (Left) -->
<button class="navbar-toggler position-absolute start-0 ms-3" id="sidebarToggle">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Center Logo -->
<a href="{{ url_for('index') }}" class="navbar-brand m-0">
<img src="{{ url_for('static', filename='logos/logo.png') }}" alt="AI Infinite Logo"
class="navbar-logo">
</a>
</div>
</nav>
<div class="main-container">
<div class="sidebar">
<div class="nav flex-column">
<a class="nav-link" href="{{ url_for('home_logged_in') }}"><i class="fas fa-home"></i> Home
</a>
<a class="nav-link active" href="{{ url_for('dmh_dashboard') }}"><i class="fas fa-tachometer-alt"></i>
Dashboard Overview</a>
<a href="{{ url_for('view_history') }}" class="nav-link"><i class="fas fa-history"></i> View Document
History</a>
<a href="javascript:void(0);" class="nav-link" id="generate-api-key-btn"><i class="fas fa-key"></i>
Generate API Key</a>
<a href="javascript:void(0);" class="nav-link" id="view-api-key-btn"><i class="fas fa-eye"></i> View API
Key</a>
<a class="nav-link" href="{{ url_for('logout') }}"><i class="fas fa-sign-out-alt"></i> Logout</a>
</div>
</div>
<div class="container">
<!-- Flash Messages -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
<strong>{{ message }}</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<!-- Upload Document Card -->
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card shadow">
<div class="card-body">
<h4 class="card-title text-center mb-4">
Upload Invoice
</h4>
<form id="upload-form" action="{{ url_for('upload_image') }}" method="POST"
enctype="multipart/form-data">
<!-- hidden document type -->
<input type="hidden" name="doc_type" value="invoice">
<div class="mb-3">
<label for="file" class="form-label">
Choose Invoice File (PDF or Image)
</label>
<input type="file" class="form-control" id="file" name="file"
accept="image/*,application/pdf" required>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-lg">
Upload and Extract
</button>
</div>
<div class="text-center mt-3" id="loading-container" style="display:none;">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Modal for API Key Display -->
<div class="modal fade" id="apiKeyModal" tabindex="-1" aria-labelledby="apiKeyModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="apiKeyModalLabel">Your API Key</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Your API Key: <span id="api-key-value"></span></p>
<button class="btn btn-secondary" onclick="copyToClipboard()">Copy</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Sidebar Toggle
document.getElementById('sidebarToggle').addEventListener('click', function () {
document.querySelector('.sidebar').classList.toggle('active');
});
// Generate API Key
document.getElementById('generate-api-key-btn').addEventListener('click', function () {
fetch("{{ url_for('generate_api_key') }}", {
method: "POST",
headers: { "Content-Type": "application/json" },
credentials: "same-origin"
})
.then(response => response.json())
.then(data => {
if (data.success) {
document.getElementById('api-key-value').innerText = data.api_key;
new bootstrap.Modal(document.getElementById('apiKeyModal')).show();
} else {
alert('Error: ' + data.error);
}
})
.catch(error => alert("An error occurred while generating the API key."));
});
// View API Key
document.getElementById('view-api-key-btn').addEventListener('click', function () {
fetch("{{ url_for('get_api_key') }}", {
method: "GET",
credentials: "same-origin"
})
.then(response => response.json())
.then(data => {
if (data.success) {
document.getElementById('api-key-value').innerText = data.api_key;
new bootstrap.Modal(document.getElementById('apiKeyModal')).show();
} else {
alert('Error: ' + data.error);
}
})
.catch(error => alert("An error occurred while fetching the API key."));
});
// Copy to Clipboard
function copyToClipboard() {
const apiKey = document.getElementById('api-key-value').innerText;
navigator.clipboard.writeText(apiKey).then(() => {
alert('API Key copied to clipboard');
}, () => {
alert('Failed to copy API Key');
});
}
// Loading Animation
document.getElementById("upload-form").addEventListener("submit", function () {
document.getElementById("loading-container").style.display = "block";
});
</script>
</body>
</html>
+534
View File
@@ -0,0 +1,534 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="AI Infinite: Automate data extraction from PDFs, invoices, passports, and more with our AI-powered parser. Save time, boost productivity, and integrate seamlessly with your tools." />
<meta name="keywords" content="AI document parser, data extraction, PDF parser, invoice extraction, passport extraction, OCR, AI Infinite, automation" />
<title>AI Infinite - Revolutionize Your Workflow with AI-Powered Data Extraction</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800">
!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="AI Infinite: Automate data extraction from PDFs, invoices, passports, and more with our AI-powered parser. Save time, boost productivity, and integrate seamlessly with your tools." />
<meta name="keywords" content="AI document parser, data extraction, PDF parser, invoice extraction, passport extraction, OCR, AI Infinite, automation" />
<title>AI Infinite - Revolutionize Your Workflow with AI-Powered Data Extraction</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800">
<!-- Updated Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center">
<!-- Logo / Brand -->
<a href="{{ url_for('home_logged_in') if logged_in else url_for('index') }}"
class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}"
alt="AI Infinite Logo"
class="h-12 md:h-16 w-auto" />
</a>
<!-- Combined Right-side Links -->
<div class="hidden md:flex items-center ml-auto space-x-12">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-semibold">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<!-- Mobile Menu Button -->
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<!-- Mobile Menu Content -->
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="relative h-[80vh] flex items-center justify-center text-center text-white pt-20"
style='background-image: url("https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80");
background-size: cover;
background-position: center;
background-repeat: no-repeat;'>
<div class="absolute inset-0 bg-black opacity-50"></div>
<div class="relative container mx-auto px-4 z-10">
<h1 class="text-4xl sm:text-5xl font-bold mb-4" data-aos="fade-up">AI-Powered Data Extraction</h1>
<p class="text-lg sm:text-2xl mb-8" data-aos="fade-up" data-aos-delay="100">Unlock actionable insights from your documents with cutting-edge AI. Streamline processes, reduce manual tasks, and drive efficiency like never before with AI Infinite.</p>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded text-xl transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="200">Get Started</a>
</div>
</section>
<!-- How It Works Section -->
<section class="py-16 bg-gray-50">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">How It Works</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-12">
<!-- Step 1 -->
<div class="flex flex-col items-center text-center" data-aos="fade-up" data-aos-delay="0">
<div class="p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-upload text-blue-600 text-4xl animate-bounce"></i>
</div>
<h3 class="text-xl font-semibold mb-2">1. Upload</h3>
<p>Drag & drop your documents or choose files from your device. We support PNG, JPG, PDF, and more.</p>
</div>
<!-- Step 2 -->
<div class="flex flex-col items-center text-center" data-aos="fade-up" data-aos-delay="200">
<div class="p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-microchip text-blue-600 text-4xl animate-bounce"></i>
</div>
<h3 class="text-xl font-semibold mb-2">2. Detect</h3>
<p>Our AI scans the document to identify key fields like names, dates, totals, IDs, and other important details.</p>
</div>
<!-- Step 3 -->
<div class="flex flex-col items-center text-center" data-aos="fade-up" data-aos-delay="400">
<div class="p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-file-export text-blue-600 text-4xl animate-bounce"></i>
</div>
<h3 class="text-xl font-semibold mb-2">3. Extract</h3>
<p>Receive clean, structured data in JSON or Excel format—perfect for automation, integration, and analytics.</p>
</div>
</div>
<div class="text-center mt-8 text-sm text-gray-600">
</div>
</div>
</section>
<!-- Core Features Section -->
<section id="features" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">Core Features</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8">
<!-- Feature 1 -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="100">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-file-alt fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">Multi-format Support</h3>
<p class="text-center text-gray-600">Extract data from PDFs, scanned images, and camera‑captured documents easily.</p>
</div>
<!-- Feature 2 -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="200">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-table fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">Export to Excel/JSON</h3>
<p class="text-center text-gray-600">Download your output in Excel or machine‑readable JSON format—ready for integration.</p>
</div>
<!-- Feature 3 -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="300">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-lock fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">Enterprise‑grade Security</h3>
<p class="text-center text-gray-600">End‑to‑end encryption and secure data handling ensure your privacy and safety.</p>
</div>
<!-- Feature 4 (Updated) -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="400">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-robot fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">Trained AI Models</h3>
<p class="text-center text-gray-600">Leverages AI models trained on diverse invoice data for superior accuracy.</p>
</div>
<!-- Feature 5 -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="500">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-plug fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">API & Dashboard Access</h3>
<p class="text-center text-gray-600">Seamlessly integrate with our APIs or manage your documents through a user‑friendly dashboard.</p>
</div>
<!-- Feature 6 -->
<div class="p-8 bg-gray-50 rounded-lg shadow hover:shadow-lg transform hover:scale-105 transition duration-300" data-aos="fade-up" data-aos-delay="600">
<div class="text-blue-600 mb-4 text-center">
<i class="fas fa-cogs fa-3x"></i>
</div>
<h3 class="text-xl font-semibold text-center mb-2">Custom Fields</h3>
<p class="text-center text-gray-600">Define and extract any fields unique to your workflows.</p>
</div>
</div>
</div>
</section>
<!-- Who It's For Section -->
<section class="py-16 bg-gray-50">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">Who It's For</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="p-6 bg-white rounded-lg shadow" data-aos="fade-up">
<h3 class="text-xl font-semibold mb-3">Businesses & Enterprises</h3>
<p class="text-gray-600">Automate invoice processing, compliance tracking, or identity validation to save time and reduce errors.</p>
</div>
<div class="p-6 bg-white rounded-lg shadow" data-aos="fade-up">
<h3 class="text-xl font-semibold mb-3">Developers & Startups</h3>
<p class="text-gray-600">Integrate our robust APIs into your applications and streamline your workflows with ease.</p>
</div>
<div class="p-6 bg-white rounded-lg shadow" data-aos="fade-up">
<h3 class="text-xl font-semibold mb-3">Government & Institutions</h3>
<p class="text-gray-600">Digitize records, IDs, and multi-language documents securely while optimizing workflow efficiency.</p>
</div>
</div>
</div>
</section>
<!-- Contact Form Section -->
<div class="container mx-auto max-w-4xl px-4 py-8 bg-white rounded-lg shadow-[0_10px_25px_rgba(0,0,0,0.5)] relative flex flex-col md:flex-row justify-between items-start" data-aos="fade-up" style="margin-bottom: -200px;">
<div class="w-full md:w-1/2 p-4 z-10 relative">
<h2 class="text-2xl font-bold text-blue-900 mb-4">Have more questions?</h2>
<p class="text-gray-500 text-sm mb-4">GET IN TOUCH</p>
<form id="query-form" action="/submit" method="post" class="space-y-4">
<div>
<label for="work-email" class="block text-sm font-medium text-gray-700">Your work email*</label>
<input type="email" id="work-email" name="email" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" required>
</div>
<div>
<label for="contact-number" class="block text-sm font-medium text-gray-700">Contact number</label>
<input type="tel" id="contact-number" name="contact" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label for="help-message" class="block text-sm font-medium text-gray-700">How can we help you?*</label>
<textarea id="help-message" name="message" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 h-24 resize-y" required></textarea>
</div>
<button type="submit" class="w-full md:w-auto bg-blue-900 text-white px-4 py-2 rounded-md hover:bg-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
Submit Query >>
</button>
</form>
</div>
<div class="w-full md:w-1/2 p-4 border-l border-gray-300 md:border-l-2 z-10 relative">
<h3 class="text-xl font-semibold text-blue-900 mb-2">Talk to an AI expert</h3>
<p class="text-gray-600 mb-4">Get a free 15-minute consultation with our Automation experts. We can discuss Pricing, Integrations or try the app live on your documents.</p>
<!-- Button to trigger the popup modal -->
<button id="demo-btn" class="bg-blue-900 text-white px-4 py-2 rounded-md hover:bg-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 flex items-center">
Request a Demo
<span class="ml-2"><i class="fas fa-user"></i><i class="fas fa-user ml-1"></i></span>
</button>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-gray-200 pt-64 pb-8">
<div class="container mx-auto px-4 text-center">
<p class="mb-2">© 2025 AI Infinite. All rights reserved.</p>
<p class="mb-2">
<a href="#" class="hover:underline mx-2">Features</a>|
<a href="#" class="hover:underline mx-2">Integrations</a>|
<a href="#" class="hover:underline mx-2">Pricing</a>|
<a href="#" class="hover:underline mx-2">Blog</a>|
<a href="#" class="hover:underline mx-2">Help Center</a>|
<a href="#" class="hover:underline mx-2">API</a>
</p>
<p class="mb-2">
<a href="#" class="hover:underline mx-2">Terms</a>|
<a href="#" class="hover:underline mx-2">Privacy Policy</a>|
<a href="#" class="hover:underline mx-2">Security</a>|
<a href="#" class="hover:underline mx-2">GDPR</a>
</p>
<p>
Follow us:
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-twitter"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-linkedin"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-facebook"></i></a>
</p>
</div>
</footer>
Popup Modal
<div id="demo-modal" class="fixed inset-0 bg-gray-600 bg-opacity-50 hidden flex items-center justify-center z-50">
<!-- Increase max-w so we can see two columns side by side -->
<div class="bg-white p-6 rounded-lg shadow-lg w-full max-w-3xl mx-4 relative">
<button
id="close-modal"
class="absolute top-2 right-2 text-gray-500 hover:text-gray-700"
>
<i class="fas fa-times"></i>
</button>
<!-- Two columns inside the modal -->
<div class="flex flex-col md:flex-row md:gap-6">
<!-- Left column: Demo info and bullet points -->
<div class="md:w-1/2 space-y-4 mb-4 md:mb-0">
<h2 class="text-2xl font-bold text-blue-900">Demo Call</h2>
<p class="text-gray-600">
Find out why 10,000+ customers trust Nanonets!
</p>
<p class="text-gray-600">
In this demo we'll show you how we:
</p>
<ul class="list-disc list-inside text-gray-600 mb-4">
<li>Achieve 97% accuracy with our best in class Intelligent Document Processing platform 📄</li>
<li>10x your productivity with our seamless workflows and automation engines ⚙️</li>
<li>Scale to your needs while achieving a meaningful ROI 💡</li>
</ul>
<p class="text-gray-600">
Interested? Click Schedule Event to find available time slots.
</p>
<p class="text-gray-600">Looking forward to seeing you!</p>
</div>
<!-- Right column: Form -->
<div class="md:w-1/2 space-y-4">
<form id="demo-form" action="/schedule" method="post" class="space-y-4">
<div>
<label for="name" class="block text-sm font-medium text-gray-700">Name *</label>
<input
type="text"
id="name"
name="name"
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
required
>
</div>
<div>
<label for="company-email" class="block text-sm font-medium text-gray-700">Company email *</label>
<input
type="email"
id="company-email"
name="company-email"
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
required
>
</div>
<div>
<label for="timezone" class="block text-sm font-medium text-gray-700">
Which time zone works best for the meeting? *
</label>
<div class="mt-1 space-y-2">
<label class="flex items-center">
<input type="radio" name="timezone" value="americas" class="form-radio text-blue-500" required>
<span class="ml-2 text-gray-700">Americas</span>
</label>
<label class="flex items-center">
<input type="radio" name="timezone" value="europe" class="form-radio text-blue-500">
<span class="ml-2 text-gray-700">Europe</span>
</label>
<label class="flex items-center">
<input type="radio" name="timezone" value="asia-pacific" class="form-radio text-blue-500">
<span class="ml-2 text-gray-700">Asia Pacific &amp; Australia</span>
</label>
<label class="flex items-center">
<input type="radio" name="timezone" value="middle-east" class="form-radio text-blue-500">
<span class="ml-2 text-gray-700">Middle East</span>
</label>
</div>
</div>
<!-- "Schedule Event" button is visible here -->
<button
type="submit"
class="w-full bg-blue-900 text-white px-4 py-2 rounded-md hover:bg-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
>
Schedule Event
</button>
</form>
</div>
</div>
</div>
</div>
<!-- JavaScript for Popup -->
<script>
// Show modal when "Request a Demo" button is clicked
document.getElementById('demo-btn').addEventListener('click', function() {
document.getElementById('demo-modal').classList.remove('hidden');
});
// Hide modal when the close (X) button is clicked
document.getElementById('close-modal').addEventListener('click', function() {
document.getElementById('demo-modal').classList.add('hidden');
});
// Hide modal if user clicks outside the modal content
document.getElementById('demo-modal').addEventListener('click', function(e) {
if (e.target === this) {
this.classList.add('hidden');
}
});
</script>
<!-- Thank You Popup Modal -->
<div id="thank-you-modal" class="fixed inset-0 bg-gray-600 bg-opacity-50 hidden flex items-center justify-center z-50">
<div class="bg-white p-6 rounded-lg shadow-lg w-full max-w-sm mx-4 relative text-center">
<button id="close-thankyou" class="absolute top-2 right-2 text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
<h2 class="text-xl font-bold text-blue-900 mb-4">Thank You!</h2>
<p class="text-gray-700">Thank you for your interest! We will contact you as soon as possible.</p>
</div>
</div>
<script>
const demoForm = document.getElementById('demo-form');
const thankYouModal = document.getElementById('thank-you-modal');
const closeThankYouButton = document.getElementById('close-thankyou');
demoForm.addEventListener('submit', async (event) => {
event.preventDefault();
const formData = new FormData(demoForm);
try {
const response = await fetch('/schedule', {
method: 'POST',
body: formData
});
const result = await response.json();
if (result.success) {
thankYouModal.classList.remove('hidden');
demoForm.reset();
} else {
alert(result.message || 'Failed to schedule demo.');
}
} catch (error) {
console.error('Error:', error);
alert('Error submitting demo request.');
}
});
// Existing close modal logic (already in your code, included for clarity)
closeThankYouButton.addEventListener('click', () => {
thankYouModal.classList.add('hidden');
});
thankYouModal.addEventListener('click', (event) => {
if (event.target === thankYouModal) {
thankYouModal.classList.add('hidden');
}
});
</script>
<script>
const modal = document.getElementById('thank-you-modal');
const closeButton = document.getElementById('close-thankyou');
closeButton.addEventListener('click', () => {
modal.classList.add('hidden');
});
modal.addEventListener('click', (event) => {
if (event.target === modal) {
modal.classList.add('hidden');
}
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const queryForm = document.getElementById('query-form');
if (!queryForm) {
console.error('Query form with id="query-form" not found!');
return;
}
queryForm.addEventListener('submit', function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData.entries());
console.log('Form Data Object:', data);
// Validate required fields
if (!data.email || !data.message) {
console.error('Validation failed: Email or message is missing');
alert('Please fill in both email and message fields.');
return;
}
fetch('/submit', {
method: 'POST',
body: formData
})
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
console.log('Server response:', data);
if (data.success) {
document.getElementById('thank-you-modal').classList.remove('hidden');
queryForm.reset();
} else {
alert(data.message || 'Error submitting query');
}
})
.catch(error => {
console.error('Fetch error:', error);
alert('Error submitting query. Check console for details.');
});
});
});
</script>
<!-- Schema Markup for SEO -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "AI Infinite",
"description": "AI-powered document parser for automating data extraction from PDFs, invoices, passports, and more.",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Web",
"offers": {
"@type": "Offer",
"price": "Starting at $29/month"
}
}
</script>
<!-- AOS JS -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({
duration: 800, // Animation duration in milliseconds
once: true // Animations happen only once on scroll
});
</script>
</body>
</html>
+284
View File
@@ -0,0 +1,284 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Effortless Invoice Data Extraction with AI Precision. Automate your invoice processing and streamline accounts payable with AI Infinite." />
<meta name="keywords" content="invoice extraction, AI OCR, automation, data extraction, AI Infinite" />
<title>Invoice Extraction - AI Infinite</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800">
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center">
<!-- Logo / Brand -->
<a href="{{ url_for('home_logged_in') if logged_in else url_for('index') }}"
class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}"
alt="AI Infinite Logo"
class="h-12 md:h-16 w-auto" />
<span class="text-xl font-bold text-gray-800"></span>
</a>
<!-- Right‑side Links -->
<div class="hidden md:flex items-center ml-auto space-x-12">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-semibold">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero Section (always visible, logged‑in or not) -->
<section class="relative h-[80vh] flex items-center justify-center text-center text-white pt-20"
style="background-image: url('{{ url_for('static', filename='logos/Invoice_bg.png') }}');
background-size: cover;
background-position: center;
background-repeat: no-repeat;">
<div class="absolute inset-0 bg-black opacity-50"></div>
<div class="relative container mx-auto px-6 z-10" data-aos="fade-up">
<h1 class="text-4xl sm:text-5xl font-bold mb-4">
Effortless Invoice Data Extraction with AI Precision
</h1>
<p class="text-lg sm:text-2xl mb-8">
Streamline your accounts payable by automating data capture from invoices with unparalleled accuracy.
</p>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}"
class="bg-blue-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded text-xl transform hover:scale-105 transition duration-300">
Go to Dashboard
</a>
{% else %}
<a href="{{ url_for('login') }}"
class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded text-xl transform hover:scale-105 transition duration-300">
Try It Now
</a>
{% endif %}
</div>
</section>
<!-- How It Works Section -->
<section id="how-it-works" class="py-20 bg-gray-50">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">How It Works</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-12">
<div class="text-center" data-aos="fade-up" data-aos-delay="100">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-upload text-blue-600 text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Upload Invoice</h3>
<p>Upload invoices in PDF, JPG, PNG formats.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="200">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-brain text-blue-600 text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">AI & OCR Processing</h3>
<p>AI-driven OCR detects and extracts key fields and line items.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="300">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-file-export text-blue-600 text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Download Data</h3>
<p>Get structured JSON or Excel output for your workflows.</p>
</div>
</div>
</div>
</section>
<!-- Key Features Section -->
<section id="features" class="py-20">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">Key Features</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="100">
<div class="mb-4 text-center"><i class="fas fa-file-alt fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">Multi-Format Support</h3>
<p class="text-gray-600 text-center">Handles PDFs, scanned images, and digital photos.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="200">
<div class="mb-4 text-center"><i class="fas fa-th-large fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">Template-Free AI/OCR</h3>
<p class="text-gray-600 text-center">No pre-configured templates—AI adapts to any layout.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="300">
<div class="mb-4 text-center"><i class="fas fa-bullseye fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">High Accuracy</h3>
<p class="text-gray-600 text-center">Deep-learning + OCR minimizes extraction errors.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="400">
<div class="mb-4 text-center"><i class="fas fa-lock fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">Secure & Compliant</h3>
<p class="text-gray-600 text-center">End-to-end encryption.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="500">
<div class="mb-4 text-center"><i class="fas fa-plug fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">Seamless Integrations</h3>
<p class="text-gray-600 text-center">Prebuilt connectors for ERP, CRM, and RPA.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="600">
<div class="mb-4 text-center"><i class="fas fa-cogs fa-3x text-blue-600"></i></div>
<h3 class="text-xl font-semibold mb-2 text-center">Custom Fields</h3>
<p class="text-gray-600 text-center">Define and extract any fields unique to you.</p>
</div>
</div>
</div>
</section>
<!-- Benefits Section -->
<section id="benefits" class="py-20 bg-gray-50">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12" data-aos="fade-up">Benefits</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="text-center" data-aos="fade-up" data-aos-delay="100">
<i class="fas fa-clock fa-3x text-blue-600 mb-4"></i>
<h3 class="text-xl font-semibold mb-2">Save Time</h3>
<p>Eliminate manual entry and accelerate workflows.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="200">
<i class="fas fa-dollar-sign fa-3x text-blue-600 mb-4"></i>
<h3 class="text-xl font-semibold mb-2">Reduce Costs</h3>
<p>Minimize errors and avoid late-payment penalties.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="300">
<i class="fas fa-chart-line fa-3x text-blue-600 mb-4"></i>
<h3 class="text-xl font-semibold mb-2">Scale Effortlessly</h3>
<p>Process thousands of invoices in minutes.</p>
</div>
</div>
</div>
</section>
<!-- FAQ Section -->
<section id="faq" class="py-20">
<div class="container mx-auto px-6 lg:flex lg:space-x-12">
<div class="lg:w-1/2" data-aos="fade-right">
<h2 class="text-3xl font-bold mb-6">Frequently Asked Questions</h2>
<div class="space-y-4">
<details class="bg-white p-4 rounded-lg shadow">
<summary class="font-semibold cursor-pointer">Which file types are supported?</summary>
<p class="mt-2 text-gray-600">PNG, JPG, PDF, and more.</p>
</details>
<details class="bg-white p-4 rounded-lg shadow">
<summary class="font-semibold cursor-pointer">How secure is my data?</summary>
<p class="mt-2 text-gray-600">Data is encrypted at rest and in transit.</p>
</details>
</div>
</div>
<div class="lg:w-1/2 mt-12 lg:mt-0" data-aos="fade-left">
<h2 class="text-3xl font-bold mb-6">Talk to Sales</h2>
<form action="https://example.com/contact" method="POST" class="space-y-4">
<input type="text" name="name" placeholder="Name*" required class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<input type="email" name="email" placeholder="Email*" required class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<input type="tel" name="phone" placeholder="Phone" class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<textarea name="message" rows="4" placeholder="Message" class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
<button type="submit" class="w-full bg-blue-600 text-white font-semibold py-3 rounded-lg hover:bg-blue-700 transition">Submit</button>
</form>
</div>
</div>
</section>
<!-- Footer Section -->
<footer class="bg-gray-800 text-gray-200 py-8">
<div class="container mx-auto px-4 text-center">
<p class="mb-2">© 2025 AI Infinite. All rights reserved.</p>
<p class="mb-2">
<a href="#features" class="hover:underline mx-2">Features</a>|
<a href="#benefits" class="hover:underline mx-2">Benefits</a>|
<a href="#faq" class="hover:underline mx-2">FAQ</a>|
<a href="#" class="hover:underline mx-2">Blog</a>|
<a href="#" class="hover:underline mx-2">Help Center</a>|
<a href="#" class="hover:underline mx-2">API</a>
</p>
<p class="mb-2">
<a href="#" class="hover:underline mx-2">Terms</a>|
<a href="#" class="hover:underline mx-2">Privacy Policy</a>|
<a href="#" class="hover:underline mx-2">Security</a>|
<a href="#" class="hover:underline mx-2">GDPR</a>
</p>
<p>
Follow us:
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-twitter"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-linkedin"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-facebook"></i></a>
</p>
</div>
</footer>
<!-- Schema Markup for SEO -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "AI Infinite",
"description": "AI-powered document parser for automating data extraction from PDFs, invoices, passports, and more.",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Web",
"offers": {
"@type": "Offer",
"price": "Starting at $29/month"
}
}
</script>
<!-- Scripts -->
<script>
// Mobile menu toggle
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
// Navbar shadow on scroll (optional)
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
navbar.classList.add('shadow-lg');
} else {
navbar.classList.remove('shadow-lg');
}
});
</script>
<!-- AOS JS -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({
duration: 800,
once: true
});
</script>
</body>
</html>
+680
View File
@@ -0,0 +1,680 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manual Item Codes - AI Infinite</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #007bff;
--background-light: #f8f9fa;
--text-dark: #333;
--white: #fff;
}
body {
font-family: Arial, sans-serif;
color: var(--text-dark);
margin: 0;
padding: 0;
line-height: 1.6;
background-color: var(--background-light);
}
.navbar {
background-color: #f7f7f7;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
display: flex;
align-items: center;
}
.navbar-toggler {
padding: 0.25rem 0.5rem;
border: none;
}
.navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 123, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-container {
display: flex;
min-height: calc(100vh - 60px);
}
.sidebar {
width: 250px;
background-color: var(--white);
border-right: 1px solid #dee2e6;
padding: 1.5rem;
position: fixed;
height: 100%;
z-index: 1000;
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.sidebar.active {
transform: translateX(0);
}
.sidebar .nav-link {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-dark);
padding: 0.75rem 1rem;
margin: 0.3rem 0;
border-radius: 5px;
text-decoration: none;
transition: background-color 0.3s;
}
.sidebar .nav-link:hover {
background-color: var(--background-light);
}
.sidebar .nav-link.active {
background-color: #e9ecef;
font-weight: bold;
}
.container {
max-width: 1000px;
margin: 2rem auto;
padding: 0 1rem;
flex-grow: 1;
}
.card {
background-color: var(--white);
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
margin-top: 1.5rem;
}
.card-title {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.form-label {
font-weight: 500;
color: var(--text-dark);
}
.form-control {
border-radius: 5px;
border: 1px solid #ccc;
padding: 0.75rem;
width: 100%;
margin-bottom: 1rem;
}
.btn-primary {
background-color: var(--primary-color);
color: var(--white);
padding: 0.75rem 1.5rem;
border: none;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s;
}
.btn-primary:hover {
background-color: #0056b3;
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.btn-secondary {
background-color: #6c757d;
color: var(--white);
padding: 0.6rem 1.2rem;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.btn-secondary:hover {
background-color: #5a6268;
}
.loading-container {
display: none;
justify-content: center;
align-items: center;
gap: 10px;
padding: 2rem 0;
}
.dot {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: var(--primary-color);
animation: bounce 1.5s infinite ease-in-out;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.items-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
font-size: 0.9rem;
}
.items-table th, .items-table td {
padding: 10px 12px;
border-bottom: 1px solid #e9ecef;
text-align: left;
vertical-align: middle;
}
.items-table th {
background-color: var(--background-light);
font-weight: 600;
}
.code-input {
width: 100%;
min-width: 130px;
padding: 6px 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 0.9rem;
}
.code-input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}
.code-input.empty {
border-color: #f0ad4e;
background: #fffbea;
}
.badge-source {
display: inline-block;
padding: 4px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
}
.badge-invoice { background: #d1e7ff; color: #084298; }
.badge-matched { background: #d1f5e0; color: #0f5132; }
.badge-manual { background: #e2d9f3; color: #4b2a85; }
.badge-missing { background: #f8d7da; color: #842029; }
.badge-edited { background: #fff3cd; color: #856404; }
.summary-badge {
display: inline-block;
padding: 6px 14px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
}
.file-chip {
display: inline-flex;
align-items: center;
gap: 10px;
margin-top: 10px;
padding: 6px 12px;
background: var(--background-light);
border-radius: 20px;
font-size: 0.9rem;
}
.file-chip button {
border: none;
background: transparent;
cursor: pointer;
color: #888;
}
.file-chip button:hover { color: #c33; }
.table-scroll { overflow-x: auto; }
.json-viewer {
background: #1e1e2e;
color: #cdd6f4;
padding: 16px;
border-radius: 8px;
margin-top: 15px;
font-family: Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 0.8rem;
line-height: 1.5;
max-height: 500px;
overflow: auto;
white-space: pre;
}
.json-key { color: #89b4fa; }
.json-string { color: #a6e3a1; }
.json-number { color: #fab387; }
.json-boolean { color: #cba6f7; }
.json-null { color: #f38ba8; }
.hint { color: #888; font-size: 0.85rem; margin: 10px 0; }
.hidden { display: none !important; }
@media (max-width: 768px) {
.sidebar { width: 220px; }
.container { max-width: 95%; margin: 1rem auto; }
}
</style>
</head>
<body>
<nav class="navbar">
<div class="container-fluid">
<button class="navbar-toggler" id="sidebarToggle"><span class="navbar-toggler-icon"></span></button>
<a href="{{ url_for('index') }}" class="navbar-brand">
<a src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo"
style="height: 40px;">
</a>
</div>
</nav>
<div class="main-container">
<div class="sidebar">
<div class="nav flex-column">
<a class="nav-link" href="{{ url_for('home_logged_in') }}"><i class="fas fa-home"></i> Home</a>
<a class="nav-link" href="{{ url_for('dashboard') }}"><i class="fas fa-tachometer-alt"></i> Dashboard Overview</a>
<a class="nav-link" href="{{ url_for('view_history') }}"><i class="fas fa-history"></i> View Document History</a>
<a class="nav-link active" href="{{ url_for('manual_item_codes_page') }}"><i class="fas fa-edit"></i> Manual Item Codes</a>
<a class="nav-link" href="{{ url_for('logout') }}"><i class="fas fa-sign-out-alt"></i> Logout</a>
</div>
</div>
<div class="container">
<div id="pageMessage"></div>
<!-- Upload Card -->
<div class="card">
<h5 class="card-title">Upload Invoice &amp; Add Item Codes</h5>
<p class="hint" style="margin-top: -8px;">Choose a file, extract it, then add or fix item codes for any items that need one.</p>
<div class="mb-3">
<label for="manualFile" class="form-label">Invoice File (PDF or Image)</label>
<input type="file" class="form-control" id="manualFile" accept=".pdf,.png,.jpg,.jpeg">
<div class="file-chip hidden" id="fileChip">
<span id="fileChipName"></span>
<button type="button" onclick="clearFile()" title="Remove">✕</button>
</div>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="useDrugList" checked>
<label class="form-check-label" for="useDrugList">
Try to auto-fill item codes from the drug list (drug_list.csv) first
</label>
</div>
<button type="button" class="btn btn-primary" id="extractBtn" onclick="extractInvoice()" disabled>
<i class="fas fa-magic"></i> Extract Invoice
</button>
</div>
<!-- Loading -->
<div class="loading-container" id="loadingContainer">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
<!-- Results -->
<div class="card hidden" id="resultsCard">
<div class="d-flex justify-content-between align-items-center flex-wrap" style="gap: 10px;">
<h5 class="card-title" style="margin-bottom: 0;">Item Codes</h5>
<span id="summaryBadge"></span>
</div>
<p class="hint">Rows highlighted in yellow have no item code yet. Type a code, then click Save. Press Enter to move to the next row.</p>
<div class="table-scroll">
<table class="items-table">
<thead>
<tr>
<th>#</th>
<th>Description</th>
<th>Qty</th>
<th>Unit Price</th>
<th>Item Code</th>
<th>Source</th>
</tr>
</thead>
<tbody id="itemsBody"></tbody>
</table>
</div>
<div class="d-flex flex-wrap" style="gap: 10px; margin-top: 1.25rem;">
<button type="button" class="btn btn-primary" id="saveBtn" onclick="saveItemCodes()" disabled>
<i class="fas fa-save"></i> Save Item Codes
</button>
<button type="button" class="btn btn-secondary" id="jsonToggleBtn" onclick="toggleJsonView()">
<i class="fas fa-code"></i> Show JSON
</button>
<button type="button" class="btn btn-secondary" onclick="resetPage()">
<i class="fas fa-redo"></i> Upload Another
</button>
</div>
<pre class="json-viewer hidden" id="jsonViewer"></pre>
</div>
</div>
</div>
<script>
document.getElementById('sidebarToggle').addEventListener('click', function () {
document.querySelector('.sidebar').classList.toggle('active');
});
let selectedFile = null;
let extractedData = null;
let extractionId = null;
document.getElementById('manualFile').addEventListener('change', function (e) {
if (e.target.files.length > 0) {
setFile(e.target.files[0]);
}
});
function setFile(file) {
const validExt = /\.(pdf|png|jpe?g)$/i;
if (!validExt.test(file.name)) {
showMessage('Please choose a PDF, PNG or JPG file.', 'danger');
return;
}
selectedFile = file;
hideMessage();
document.getElementById('fileChipName').textContent = file.name;
document.getElementById('fileChip').classList.remove('hidden');
document.getElementById('extractBtn').disabled = false;
}
function clearFile() {
selectedFile = null;
document.getElementById('manualFile').value = '';
document.getElementById('fileChip').classList.add('hidden');
document.getElementById('extractBtn').disabled = true;
}
function showMessage(text, type) {
document.getElementById('pageMessage').innerHTML =
`<div class="alert alert-${type} alert-dismissible fade show" role="alert">
<strong>${escapeHtml(text)}</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>`;
}
function hideMessage() {
document.getElementById('pageMessage').innerHTML = '';
}
function escapeHtml(s) {
const d = document.createElement('div');
d.textContent = s;
return d.innerHTML;
}
async function extractInvoice() {
if (!selectedFile) return;
const formData = new FormData();
formData.append('file', selectedFile);
formData.append('use_drug_list', document.getElementById('useDrugList').checked ? 'true' : 'false');
document.getElementById('loadingContainer').style.display = 'flex';
document.getElementById('resultsCard').classList.add('hidden');
document.getElementById('extractBtn').disabled = true;
hideMessage();
try {
const response = await fetch('/api/manual-extract', { method: 'POST', body: formData });
const result = await response.json();
if (response.ok && result.success) {
extractedData = result.data;
extractionId = result.extraction_id || null;
renderResults();
document.getElementById('resultsCard').classList.remove('hidden');
if (!extractionId) {
showMessage('Extracted, but this could not be saved to history — item codes cannot be saved.', 'warning');
} else {
showMessage('Invoice extracted. Add or fix item codes below, then click Save.', 'success');
}
} else {
showMessage(result.error || 'Extraction failed.', 'danger');
}
} catch (err) {
showMessage('Network error. Please try again.', 'danger');
} finally {
document.getElementById('loadingContainer').style.display = 'none';
document.getElementById('extractBtn').disabled = !selectedFile;
}
}
function sourceBadge(source) {
const map = {
invoice: ['badge-invoice', 'On Invoice'],
drug_list_match: ['badge-matched', 'Matched'],
manual: ['badge-manual', 'Manual'],
not_found: ['badge-missing', 'Not Found'],
};
const [cls, label] = map[source] || map.not_found;
const span = document.createElement('span');
span.className = `badge-source ${cls}`;
span.textContent = label;
return span;
}
function renderResults() {
const items = Array.isArray(extractedData.items) ? extractedData.items : [];
const tbody = document.getElementById('itemsBody');
tbody.replaceChildren();
items.forEach((rawItem, i) => {
const item = (rawItem && typeof rawItem === 'object') ? rawItem : {};
const code = item.item_code ? String(item.item_code).trim() : '';
const tr = document.createElement('tr');
tr.dataset.source = item.item_code_source || 'not_found';
[i + 1, item.description, item.quantity, item.unit_price].forEach(val => {
const td = document.createElement('td');
td.textContent = (val === undefined || val === null || val === '') ? '-' : val;
tr.appendChild(td);
});
const codeTd = document.createElement('td');
const input = document.createElement('input');
input.type = 'text';
input.className = 'code-input' + (code ? '' : ' empty');
input.value = code;
input.placeholder = 'Enter item code';
input.maxLength = 50;
input.dataset.index = i;
input.dataset.original = code;
input.addEventListener('input', onCodeInput);
input.addEventListener('keydown', e => {
if (e.key === 'Enter') {
e.preventDefault();
const inputs = [...document.querySelectorAll('#itemsBody .code-input')];
const next = inputs[inputs.indexOf(input) + 1];
if (next) next.focus();
}
});
codeTd.appendChild(input);
tr.appendChild(codeTd);
const statusTd = document.createElement('td');
statusTd.className = 'status-cell';
statusTd.appendChild(sourceBadge(tr.dataset.source));
tr.appendChild(statusTd);
tbody.appendChild(tr);
});
updateSummary();
refreshJson();
}
function onCodeInput(e) {
const input = e.target;
const value = input.value.trim();
const tr = input.closest('tr');
const statusCell = tr.querySelector('.status-cell');
input.classList.toggle('empty', value === '');
if (value !== input.dataset.original) {
const span = document.createElement('span');
span.className = 'badge-source badge-edited';
span.textContent = 'Edited';
statusCell.replaceChildren(span);
} else {
statusCell.replaceChildren(sourceBadge(tr.dataset.source));
}
updateSummary();
refreshJson();
}
function updateSummary() {
const inputs = [...document.querySelectorAll('#itemsBody .code-input')];
const total = inputs.length;
const withCode = inputs.filter(i => i.value.trim() !== '').length;
const unsaved = inputs.filter(i => i.value.trim() !== i.dataset.original).length;
const badge = document.getElementById('summaryBadge');
if (total > 0 && withCode === total) {
badge.innerHTML = '<span class="summary-badge badge-matched">✓ All items have codes</span>';
} else {
badge.innerHTML = `<span class="summary-badge badge-missing">${total - withCode} of ${total} missing codes</span>`;
}
const saveBtn = document.getElementById('saveBtn');
saveBtn.disabled = unsaved === 0 || !extractionId;
saveBtn.innerHTML = unsaved > 0
? `<i class="fas fa-save"></i> Save Item Codes (${unsaved})`
: `<i class="fas fa-save"></i> Save Item Codes`;
}
async function saveItemCodes() {
if (!extractionId) {
showMessage('This extraction was not saved to history, so codes cannot be saved.', 'danger');
return;
}
const item_codes = [...document.querySelectorAll('#itemsBody .code-input')]
.filter(i => i.value.trim() !== i.dataset.original)
.map(i => ({ index: Number(i.dataset.index), item_code: i.value.trim() }));
if (item_codes.length === 0) return;
const saveBtn = document.getElementById('saveBtn');
saveBtn.disabled = true;
saveBtn.textContent = 'Saving...';
try {
const response = await fetch(`/api/extraction/${extractionId}/item-codes`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ item_codes })
});
const result = await response.json();
if (response.ok && result.success) {
extractedData = result.data;
renderResults();
showMessage(`Saved ${result.updated} item code(s).`, 'success');
} else {
showMessage(result.error || 'Failed to save item codes.', 'danger');
}
} catch (err) {
showMessage('Network error. Please try again.', 'danger');
} finally {
updateSummary();
}
}
function highlightJson(obj) {
const json = JSON.stringify(obj, null, 2)
.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
return json.replace(
/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,
(match) => {
let cls = 'json-number';
if (match.startsWith('"')) cls = match.endsWith(':') ? 'json-key' : 'json-string';
else if (match === 'true' || match === 'false') cls = 'json-boolean';
else if (match === 'null') cls = 'json-null';
return `<span class="${cls}">${match}</span>`;
}
);
}
function refreshJson() {
const viewer = document.getElementById('jsonViewer');
if (viewer.classList.contains('hidden')) return;
viewer.innerHTML = extractedData ? highlightJson(extractedData) : '';
}
function toggleJsonView() {
const viewer = document.getElementById('jsonViewer');
const nowHidden = viewer.classList.toggle('hidden');
document.getElementById('jsonToggleBtn').innerHTML = nowHidden
? '<i class="fas fa-code"></i> Show JSON'
: '<i class="fas fa-code"></i> Hide JSON';
refreshJson();
}
function resetPage() {
const saveBtn = document.getElementById('saveBtn');
if (!saveBtn.disabled && !confirm('You have unsaved item codes. Discard them?')) {
return;
}
clearFile();
extractedData = null;
extractionId = null;
document.getElementById('resultsCard').classList.add('hidden');
document.getElementById('jsonViewer').classList.add('hidden');
document.getElementById('jsonToggleBtn').innerHTML = '<i class="fas fa-code"></i> Show JSON';
hideMessage();
}
</script>
</body>
</html>
+268
View File
@@ -0,0 +1,268 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Effortless Passport Data Extraction with AI Precision. Automate your passport processing and streamline your workflow with AI Infinite." />
<meta name="keywords" content="passport extraction, AI OCR, automation, data extraction, AI Infinite" />
<title>Passport Extraction - AI Infinite</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800">
<!-- Updated Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center">
<!-- Logo / Brand -->
<a href="{{ url_for('home_logged_in') if logged_in else url_for('index') }}" class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo" class="h-12 md:h-16 w-auto" />
<span class="text-xl font-bold text-gray-800"></span>
</a>
<!-- Combined Right-side Links -->
<div class="hidden md:flex items-center ml-auto space-x-12">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-semibold">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<!-- Mobile Menu Button -->
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<!-- Mobile Menu Content -->
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero Section (Passport page) -->
<section class="relative h-[80vh] flex items-center justify-center text-center text-white pt-20"
style="background-image: url('{{ url_for('static', filename='logos/Invoice_bg.png') }}');
background-size: cover;
background-position: center;
background-repeat: no-repeat;">
<div class="absolute inset-0 bg-black opacity-50"></div>
<div class="relative container mx-auto px-6 z-10" data-aos="fade-up">
<h1 class="text-4xl sm:text-5xl font-bold mb-4">
Fast, Accurate Passport OCR You Can Trust
</h1>
<p class="text-lg sm:text-2xl mb-8">
From scanned passports to structured data in seconds—AI Infinite does the heavy lifting.
</p>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}"
class="bg-blue-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded text-xl transform hover:scale-105 transition duration-300">
Go to Dashboard
</a>
{% else %}
<a href="{{ url_for('login') }}"
class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded text-xl transform hover:scale-105 transition duration-300">
Try It Now
</a>
{% endif %}
</div>
</section>
<!-- How It Works -->
<section id="how-it-works" class="py-20 bg-gray-50">
<div class="container mx-auto px-6">
<h2 class="text-4xl font-bold text-center mb-12" data-aos="fade-up">How It Works</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-12">
<div class="text-center" data-aos="fade-up" data-aos-delay="100">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-passport text-blue-600 text-4xl"></i>
</div>
<h3 class="text-2xl font-semibold mb-2">Upload Passport</h3>
<p>Upload passport images or PDFs.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="200">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-brain text-blue-600 text-4xl"></i>
</div>
<h3 class="text-2xl font-semibold mb-2">AI Processing</h3>
<p>AI extracts key details like name, date of birth, and passport number.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="300">
<div class="mx-auto p-6 bg-white rounded-full shadow-lg mb-4">
<i class="fas fa-database text-blue-600 text-4xl"></i>
</div>
<h3 class="text-2xl font-semibold mb-2">Get Structured Data</h3>
<p>Receive extracted data in JSON or Excel format.</p>
</div>
</div>
</div>
</section>
<!-- Key Features -->
<section id="features" class="py-20">
<div class="container mx-auto px-6">
<h2 class="text-4xl font-bold text-center mb-12" data-aos="fade-up">Key Features</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Feature cards identical to Invoice page -->
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="100">
<div class="mb-4 text-center"><i class="fas fa-file-alt fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">Multi-Format Support</h3>
<p class="text-gray-600 text-center">Handles images and PDFs from any device.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="200">
<div class="mb-4 text-center"><i class="fas fa-th-large fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">Template-Free AI/OCR</h3>
<p class="text-gray-600 text-center">Adapts to any passport layout automatically.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="300">
<div class="mb-4 text-center"><i class="fas fa-bullseye fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">High Accuracy</h3>
<p class="text-gray-600 text-center">Deep‑learning + OCR minimizes extraction errors.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="400">
<div class="mb-4 text-center"><i class="fas fa-lock fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">Secure & Compliant</h3>
<p class="text-gray-600 text-center">End‑to‑end encryption and SOC2/ISO27001 compliant.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="500">
<div class="mb-4 text-center"><i class="fas fa-plug fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">Seamless Integrations</h3>
<p class="text-gray-600 text-center">Connect to your ERP, CRM, or RPA tools easily.</p>
</div>
<div class="p-8 bg-white rounded-xl shadow hover:shadow-lg transition" data-aos="fade-up" data-aos-delay="600">
<div class="mb-4 text-center"><i class="fas fa-cogs fa-3x text-blue-600"></i></div>
<h3 class="text-2xl font-semibold mb-2 text-center">Custom Field Extraction</h3>
<p class="text-gray-600 text-center">Define and pull any fields unique to your process.</p>
</div>
</div>
</div>
</section>
<!-- Benefits -->
<section id="benefits" class="py-20 bg-gray-50">
<div class="container mx-auto px-6">
<h2 class="text-4xl font-bold text-center mb-12" data-aos="fade-up">Benefits</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="text-center" data-aos="fade-up" data-aos-delay="100">
<i class="fas fa-clock fa-3x text-blue-600 mb-4"></i>
<h3 class="text-2xl font-semibold mb-2">Save Time</h3>
<p>Automate passport data entry and speed up processing.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="200">
<i class="fas fa-check-circle fa-3x text-blue-600 mb-4"></i>
<h3 class="text-2xl font-semibold mb-2">Reduce Errors</h3>
<p>Minimize manual mistakes with AI precision.</p>
</div>
<div class="text-center" data-aos="fade-up" data-aos-delay="300">
<i class="fas fa-chart-line fa-3x text-blue-600 mb-4"></i>
<h3 class="text-2xl font-semibold mb-2">Scale Operations</h3>
<p>Handle large volumes of passports effortlessly.</p>
</div>
</div>
</div>
</section>
<!-- FAQ & Contact -->
<section id="faq" class="py-20">
<div class="container mx-auto px-6 lg:flex lg:space-x-12">
<div class="lg:w-1/2" data-aos="fade-right">
<h2 class="text-4xl font-bold mb-6">Frequently Asked Questions</h2>
<div class="space-y-4">
<details class="bg-white p-4 rounded-lg shadow">
<summary class="font-semibold cursor-pointer">What passport formats are supported?</summary>
<p class="mt-2 text-gray-600">We support passports from multiple countries in various formats.</p>
</details>
<details class="bg-white p-4 rounded-lg shadow">
<summary class="font-semibold cursor-pointer">How accurate is the data extraction?</summary>
<p class="mt-2 text-gray-600">Our AI achieves high accuracy rates, minimizing errors in data capture.</p>
</details>
</div>
</div>
<div class="lg:w-1/2 mt-12 lg:mt-0" data-aos="fade-left">
<h2 class="text-4xl font-bold mb-6">Talk to Sales</h2>
<form action="https://example.com/contact" method="POST" class="space-y-4">
<input type="text" name="name" placeholder="Name*" required class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<input type="email" name="email" placeholder="Email*" required class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<input type="tel" name="phone" placeholder="Phone" class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" />
<textarea name="message" rows="4" placeholder="Message" class="w-full p-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
<button type="submit" class="w-full bg-blue-600 text-white font-semibold py-3 rounded-lg hover:bg-blue-700 transition">Submit</button>
</form>
</div>
</div>
</section>
<!-- Footer (matched to Invoice page) -->
<footer class="bg-gray-800 text-gray-200 py-8">
<div class="container mx-auto px-4 text-center">
<p class="mb-2">© 2025 AI Infinite. All rights reserved.</p>
<p class="mb-2">
<a href="#features" class="hover:underline mx-2">Features</a>|
<a href="#benefits" class="hover:underline mx-2">Benefits</a>|
<a href="#faq" class="hover:underline mx-2">FAQ</a>|
<a href="#" class="hover:underline mx-2">Blog</a>|
<a href="#" class="hover:underline mx-2">Help Center</a>|
<a href="#" class="hover:underline mx-2">API</a>
</p>
<p class="mb-2">
<a href="#" class="hover:underline mx-2">Terms</a>|
<a href="#" class="hover:underline mx-2">Privacy Policy</a>|
<a href="#" class="hover:underline mx-2">Security</a>|
<a href="#" class="hover:underline mx-2">GDPR</a>
</p>
<p>
Follow us:
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-twitter"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-linkedin"></i></a>
<a href="#" class="mx-2 transform hover:scale-125 transition duration-300"><i class="fab fa-facebook"></i></a>
</p>
</div>
</footer>
<!-- Scripts -->
<script>
// Mobile menu toggle
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
// Navbar shadow on scroll
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
navbar.classList.add('shadow-lg');
} else {
navbar.classList.remove('shadow-lg');
}
});
</script>
<!-- AOS JS -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({ duration: 800, once: true });
</script>
</body>
</html>
+189
View File
@@ -0,0 +1,189 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="AI Infinite Pricing — Choose the plan that fits your needs. Plus, Pro, or Enterprise." />
<meta name="keywords" content="AI Infinite, pricing, plans, AI OCR, invoice extraction" />
<title>Pricing — AI Infinite</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body class="antialiased text-gray-800 font-sans">
<!-- Updated Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center">
<!-- Logo / Brand -->
<a href="{{ url_for('home_logged_in') if logged_in else url_for('index') }}" class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo" class="h-12 md:h-16 w-auto" />
<span class="text-xl font-bold text-gray-800"></span>
</a>
<!-- Combined Right-side Links -->
<div class="hidden md:flex items-center ml-auto space-x-12">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-semibold">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<!-- Mobile Menu Button -->
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<!-- Mobile Menu Content -->
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}" class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero / Page Title -->
<section class="pt-32 pb-12 bg-white text-center">
<div class="container mx-auto px-6">
<h1 class="text-4xl md:text-5xl font-bold mb-4">Pricing Plans</h1>
<p class="text-lg text-gray-600 max-w-2xl mx-auto">Choose the plan that fits your needs. Upgrade or downgrade at any time.</p>
</div>
</section>
<!-- Pricing Cards -->
<section id="pricing" class="py-16 bg-gray-50">
<div class="container mx-auto px-6">
<div class="grid gap-8 md:grid-cols-3">
<!-- Plus Plan -->
<div class="bg-white rounded-xl shadow-lg p-8 flex flex-col" data-aos="fade-up">
<h2 class="text-2xl font-semibold mb-4 text-center">Plus</h2>
<p class="text-center text-gray-600 mb-6">Ideal for small teams</p>
<div class="text-center mb-6">
<span class="text-4xl font-bold">$10</span>
<span class="text-gray-600">/mo</span>
</div>
<ul class="space-y-3 mb-6 flex-1">
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> 300 API calls/mo</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Data Extraction AI</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> API Access</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Excel & JSON output</li>
</ul>
<a href="{{ url_for('login') }}" class="mt-auto block bg-blue-600 hover:bg-blue-700 text-white text-center py-3 rounded-lg font-semibold transition">Start Plus</a>
</div>
<!-- Pro Plan -->
<div class="bg-white rounded-xl shadow-lg p-8 flex flex-col border-2 border-blue-600" data-aos="fade-up" data-aos-delay="100">
<h2 class="text-2xl font-semibold mb-4 text-center">Pro</h2>
<p class="text-center text-gray-600 mb-6">For growing businesses</p>
<div class="text-center mb-6">
<span class="text-4xl font-bold">$25</span>
<span class="text-gray-600">/mo</span>
</div>
<ul class="space-y-3 mb-6 flex-1">
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> 750 API calls/mo</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Data Extraction AI</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> API Access</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Excel & JSON output</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> ERP Integration</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Custom Integration</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> 1:1 Support</li>
</ul>
<a href="{{ url_for('login') }}" class="mt-auto block bg-blue-600 hover:bg-blue-700 text-white text-center py-3 rounded-lg font-semibold transition">Start Pro</a>
</div>
<!-- Enterprise Plan -->
<div class="bg-white rounded-xl shadow-lg p-8 flex flex-col" data-aos="fade-up" data-aos-delay="200">
<h2 class="text-2xl font-semibold mb-4 text-center">Enterprise</h2>
<p class="text-center text-gray-600 mb-6">Custom solutions at scale</p>
<div class="text-center mb-6">
<span class="text-4xl font-bold">Custom</span>
</div>
<ul class="space-y-3 mb-6 flex-1">
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Unlimited API calls</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Data Extraction AI</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> API Access</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Excel & JSON output</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> ERP Integration</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> Custom Integration</li>
<li class="flex items-center"><i class="fas fa-check text-blue-600 mr-2"></i> 1:1 Support</li>
</ul>
<a href="{{ url_for('about') }}" class="mt-auto block bg-gray-800 hover:bg-gray-900 text-white text-center py-3 rounded-lg font-semibold transition">Contact Sales</a>
</div>
</div>
</div>
</section>
<!-- FAQ Section -->
<section id="faq" class="py-16 bg-white">
<div class="container mx-auto px-6 max-w-2xl">
<h2 class="text-3xl font-bold text-center mb-8" data-aos="fade-up">Frequently Asked Questions</h2>
<div class="space-y-4">
<details class="bg-gray-50 p-4 rounded-lg shadow" data-aos="fade-up">
<summary class="font-semibold cursor-pointer">Can I switch plans anytime?</summary>
<p class="mt-2 text-gray-600">Yes—upgrade or downgrade your plan at any time directly from your dashboard.</p>
</details>
<details class="bg-gray-50 p-4 rounded-lg shadow" data-aos="fade-up" data-aos-delay="100">
<summary class="font-semibold cursor-pointer">Do you offer annual billing?</summary>
<p class="mt-2 text-gray-600">Yes—save 20% when you choose annual billing for Plus or Pro plans.</p>
</details>
<details class="bg-gray-50 p-4 rounded-lg shadow" data-aos="fade-up" data-aos-delay="200">
<summary class="font-semibold cursor-pointer">What payment methods are accepted?</summary>
<p class="mt-2 text-gray-600">We accept all major credit cards and invoicing for Enterprise customers.</p>
</details>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-gray-200 py-8">
<div class="container mx-auto px-6 text-center space-y-4">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" class="h-10 mx-auto" alt="AI Infinite">
<p>
<a href="#" class="hover:underline mx-2">API Docs</a> |
<a href="#" class="hover:underline mx-2">Help Center</a> |
<a href="#" class="hover:underline mx-2">Blog</a> |
<a href="#" class="hover:underline mx-2">Careers</a>
</p>
<p class="text-sm">+91 82753 67267 | connect@aiindia.ai | Pune, Maharashtra 411009</p>
<div class="text-lg">
<a href="https://twitter.com/AiIndia2?s=09" class="mx-2 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="https://www.linkedin.com/company/ai-india/" class="mx-2 hover:text-white"><i class="fab fa-linkedin"></i></a>
<a href="#" class="mx-2 hover:text-white"><i class="fab fa-medium"></i></a>
</div>
<p class="text-sm">© 2025 AI Infinite Technologies Inc.</p>
</div>
</footer>
<!-- Scripts -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({ duration: 800, once: true });
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
</script>
</body>
</html>
+50
View File
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile Details</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
</head>
<body>
<div class="container">
<div class="row mt-5">
<div class="col-md-6 offset-md-3">
<h2 class="text-center">Profile Details</h2>
<!-- Profile Picture -->
<div class="mb-4 text-center">
{% if profile_picture %}
<img src="{{ url_for('static', filename='profile_pics/' + profile_picture.split('/')[-1]) }}" alt="Profile Picture" class="rounded-circle" width="150" height="150">
{% else %}
</div>
<!-- User Details -->
<table class="table table-bordered">
<tbody>
<tr>
<th>Username</th>
<td>{{ username }}</td>
</tr>
<tr>
<th>Email Address</th>
<td>{{ email }}</td>
</tr>
</tbody>
</table>
<div class="text-center mt-4">
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
+207
View File
@@ -0,0 +1,207 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoice Extraction Result</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<link rel="icon" href="{{ url_for('static', filename='logos/ai infinite.jpg') }}" type="image/x-icon">
<style>
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body Styling */
body {
font-family: 'Roboto', sans-serif;
background-color: #f0f4f8;
color: #333;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
/* Main Container */
.container {
background-color: #fff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 900px;
text-align: center;
}
/* Header Styling */
h2 {
font-size: 32px;
font-weight: 700;
margin-bottom: 10px;
color: #1a73e8;
}
p.subtitle {
font-size: 16px;
color: #666;
margin-bottom: 20px;
}
/* Invoice Data Display */
.invoice-data {
background-color: #f8f9fa;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
max-height: 400px;
overflow-y: auto;
margin-bottom: 20px;
border: 1px solid #e0e0e0;
}
pre {
font-family: 'Courier New', Courier, monospace;
color: #343a40;
font-size: 16px;
line-height: 1.5;
}
/* Links */
a {
text-decoration: none;
color: #007bff;
font-size: 16px;
}
a:hover {
text-decoration: underline;
}
/* Button Styling */
.button-container {
margin-top: 20px;
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
}
.btn {
padding: 12px 20px;
font-size: 18px;
background-color: #1a73e8;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #0d47a1;
}
.btn-secondary {
background-color: #34a853;
}
.btn-secondary:hover {
background-color: #2e8b45;
}
.btn-copy {
background-color: #ff9800;
}
.btn-copy:hover {
background-color: #fb8c00;
}
/* File Format Selection */
.select-container {
margin-top: 20px;
}
.file-select {
padding: 10px;
font-size: 16px;
background-color: #f8f9fa;
border: 1px solid #ccc;
border-radius: 5px;
width: 200px;
}
/* Animation */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.container {
animation: fadeIn 0.5s ease-in;
}
</style>
</head>
<body>
<div class="container">
<h2>Invoice Data Extraction Result</h2>
<p class="subtitle">Your invoice has been successfully processed. Review the extracted data below.</p>
<!-- Displaying extracted invoice data -->
<div class="invoice-data">
<pre id="json-output">{{ json_data }}</pre>
</div>
<!-- File format selection -->
<div class="select-container">
<label for="file-format" class="font-semibold">Select file format for download:</label><br>
<select id="file-format" class="file-select">
<option value="json">JSON</option>
<option value="excel">Excel</option>
</select>
</div>
<!-- Button actions -->
<div class="button-container">
<!-- Back to Upload Page -->
<a href="{{ url_for('dashboard') }}" class="btn">Back to Upload</a>
<!-- Download JSON or Excel -->
<form action="{{ url_for('download_file') }}" method="POST" style="display:inline;">
<textarea name="json_data" style="display:none;">{{ json_data }}</textarea>
<input type="hidden" name="file_format" id="file-format-input">
<button type="submit" class="btn btn-secondary">Download File</button>
</form>
<!-- Copy JSON -->
<button onclick="copyToClipboard()" class="btn btn-copy">Copy JSON</button>
</div>
</div>
<script>
// Function to copy JSON to clipboard
function copyToClipboard() {
const jsonOutput = document.getElementById("json-output").innerText;
navigator.clipboard.writeText(jsonOutput).then(() => {
alert("JSON copied to clipboard!");
}).catch(err => {
console.error("Failed to copy JSON: ", err);
});
}
// Update the file format input before submitting the form
document.querySelector("form").onsubmit = function () {
const selectedFormat = document.getElementById("file-format").value;
document.getElementById("file-format-input").value = selectedFormat;
};
</script>
</body>
</html>
+214
View File
@@ -0,0 +1,214 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<style>
body {
font-family: 'Arial', sans-serif;
/* background-image: linear-gradient(to top, #ebbba7 0%, #cfc7f8 100%); */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 30px;
width: 100%;
max-width: 400px;
text-align: center;
}
h2 {
color: #4a4a4a;
margin-bottom: 20px;
font-size: 2rem;
}
form {
display: flex;
flex-direction: column;
gap: 15px;
}
label {
font-size: 1rem;
color: #333;
margin-bottom: 5px;
text-align: left;
}
input[type="text"], input[type="password"] {
padding: 12px;
font-size: 1rem;
border: 1px solid #ccc;
border-radius: 8px;
outline: none;
transition: border-color 0.3s ease;
}
input[type="text"]:focus, input[type="password"]:focus {
border-color: #5f9ea0;
}
button {
background-color: #5f9ea0;
color: #fff;
font-size: 1rem;
padding: 12px;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #3a7d7d;
}
a {
color: #5f9ea0;
text-decoration: none;
font-size: 0.9rem;
}
a:hover {
text-decoration: underline;
}
.links {
margin-top: 20px;
font-size: 0.9rem;
color: #666;
}
.links p {
margin: 10px 0;
}
/* Flash message container */
.message-container {
margin-top: 20px;
padding: 10px;
}
.message {
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
text-align: center;
font-size: 1rem;
}
.message.success {
background-color: #d4edda;
color: #155724;
}
.message.error {
background-color: #f8d7da;
color: #721c24;
}
.message.info {
background-color: #d1e
}
login-form {
position: relative;
animation: slideIn 0.5s ease-in-out;
}
@keyframes slideIn {
from {
transform: translateX(-100%);
}
to {
transform: translateX(0);
}
}
/* Styling the form */
form {
background-color: #f9f9f9;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Flash message styles */
.flash-messages {
list-style-type: none;
padding: 0;
}
.flash-message {
padding: 10px;
margin: 10px 0;
border-radius: 5px;
font-weight: bold;
}
.flash-message.success {
background-color: #d4edda;
color: #155724;
}
.flash-message.error {
background-color: #f8d7da;
color: #721c24;
}
.flash-message.warning {
background-color: #fff3cd;
color: #856404;
}
.flash-message.info {
background-color: #cce5ff;
color: #004085;
}
</style>
</head>
<body>
<div class="container">
<h2>Login</h2>
<form action="{{ url_for('login') }}" method="POST">
<label for="username">Username</label>
<input type="text" id="username" name="username" required><br>
<label for="password">Password</label>
<input type="password" id="password" name="password" required><br>
<button type="submit">Login</button>
</form>
<div class="links">
<p>Don't have an account? <a href="{{ url_for('signup') }}">Sign up</a></p>
<p>Forgot your password? <a href="{{ url_for('forgot_password') }}">Reset Password</a></p>
</div>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="message-container">
{% for message in messages %}
<div class="message">
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
</div>
</body>
</html>
+32
View File
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload Document - AI Infinite</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<style>
body { font-family: Arial, sans-serif; background-color: #f8f9fa; }
.container { max-width: 800px; margin: 2rem auto; }
.card { padding: 1.5rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
</style>
</head>
<body>
<div class="container">
<div class="card">
<h5 class="card-title">Upload {{ doc_type|capitalize }} Document</h5>
<form action="{{ url_for('upload_image') }}" method="POST" enctype="multipart/form-data">
<div class="mb-3">
<label for="doc_type" class="form-label">Document Type</label>
<input type="text" class="form-control" id="doc_type" name="doc_type" value="{{ doc_type }}" readonly>
</div>
<div class="mb-3">
<label for="file" class="form-label">Choose File (PDF or Image)</label>
<input type="file" class="form-control" id="file" name="file" accept="image/*,application/pdf" required>
</div>
<button type="submit" class="btn btn-primary">Upload</button>
</form>
</div>
</div>
</body>
</html>
+152
View File
@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Full Invoice Extraction History — AI Infinite" />
<meta name="keywords" content="invoice history, AI Infinite, data extraction" />
<title>Invoice History — AI Infinite</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
</head>
<body class="antialiased text-gray-800">
<!-- Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center justify-between">
<a href="{{ url_for('index') }}" class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo"
class="h-12 md:h-16 w-auto" />
</a>
<div class="hidden md:flex space-x-8 items-center">
<a href="{{ url_for('invoice', doc_type='invoice') }}"
class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}"
class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="#features" class="text-gray-700 hover:text-blue-600 font-medium">Features</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
</div>
<div class="hidden md:flex space-x-4 items-center">
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}"
class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}"
class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}"
class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="#features" class="block text-gray-700 hover:text-blue-600 font-medium">Features</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}"
class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get
Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="pt-32 pb-12 bg-white text-center">
<div class="container mx-auto px-6" data-aos="fade-up">
<h1 class="text-4xl md:text-5xl font-bold mb-2">Full Extraction History</h1>
<p class="text-lg text-gray-600"> <span class="font-semibold">{{ username }}</span></p>
</div>
</section>
<!-- History Table -->
<section id="history" class="py-20 bg-gray-50">
<div class="container mx-auto px-6" data-aos="fade-up">
<div class="overflow-x-auto bg-white rounded-lg shadow">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Timestamp</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Image Name</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
{% if invoice_history %}
{% for entry in invoice_history %}
<tr class="hover:bg-gray-100">
<td class="px-6 py-4 whitespace-nowrap text-blue-600 font-semibold">{{ entry.timestamp_str }}</td>
<td>
<a href="{{ url_for('view_invoice', invoice_id=entry.id) }}">
{{ entry.image_name }}
</a>
</td>
<!-- <td class="px-6 py-4 whitespace-nowrap">{{ entry.image_name }}</td> -->
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="2" class="px-6 py-4 text-center text-gray-500">No history found.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="text-center mt-8">
<a href="{{ url_for('dashboard') }}"
class="inline-block bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg transition">
Back to Dashboard
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-gray-200 py-8">
<div class="container mx-auto px-6 text-center space-y-4">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite" class="h-10 mx-auto" />
<p>
<a href="#" class="hover:underline mx-2">API Docs</a> |
<a href="#" class="hover:underline mx-2">Help Center</a> |
<a href="#" class="hover:underline mx-2">Blog</a> |
<a href="# class=" hover:underline mx-2">Careers</a>
</p>
<div class="space-x-4 text-lg">
<a href="https://twitter.com/AiIndia2?s=09" class="hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="https://www.linkedin.com/company/ai-india/" class="hover:text-white"><i
class="fab fa-linkedin"></i></a>
<a href="#" class="hover:text-white"><i class="fab fa-medium"></i></a>
</div>
<p class="text-sm">© 2025 AI Infinite Technologies Inc.</p>
</div>
</footer>
<!-- Scripts -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({ duration: 800, once: true });
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
</script>
</body>
</html>
+43
View File
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Extracted Invoice Data</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f5f5f5;
margin: 20px;
}
h2 {
margin-bottom: 10px;
}
.json-box {
background: #ffffff;
color: #000000;
border: 1px solid #ddd;
border-radius: 6px;
padding: 15px;
max-height: 70vh;
overflow: auto;
white-space: pre-wrap;
word-wrap: break-word;
font-family: Consolas, Monaco, monospace;
font-size: 14px;
}
</style>
</head>
<body>
<h2>Extracted Invoice Data</h2>
<pre class="json-box">
{{ invoice_json }}
</pre>
</body>
</html>