diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 432201a..8baa07d 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -6,6 +6,7 @@
- [System Architecture](#system-architecture)
- [Production DevOps Platform](#production-devops-platform)
- [Frontend Architecture](#frontend-architecture)
+- [Landing Page 3D Experience](#landing-page-3d-experience)
- [Multi-Format Ingestion & Rendering](#multi-format-ingestion--rendering)
- [Backend Architecture](#backend-architecture)
- [Document Storage & Data Model](#document-storage--data-model)
@@ -368,6 +369,74 @@ graph TB
---
+## Landing Page 3D Experience
+
+The marketing landing page (`frontend/src/pages/LandingPage.js`) is a cinematic, **scroll-reactive 3D experience** rendered with **Three.js** through **React Three Fiber (R3F)** and **Drei**. The scene lives in `frontend/src/components/three/HeroExperience.js` and is lazy-loaded (via `React.lazy`) so the first paint of the hero copy never blocks on the Three.js bundle (~240 kB gzipped, split into its own chunk).
+
+### Design goals
+
+- **One continuous background, not two boxes.** A single WebGL canvas sits behind the *entire* page and the camera travels through it as the user scrolls — replacing the earlier approach of two isolated canvases (hero + CTA).
+- **Readable content over a moving scene.** Content surfaces are **solid dark panels**; the 3D shows through the open areas (hero, CTA, inter-section gaps), keeping copy crisp.
+- **Zero binary assets.** Every shape is primitive geometry, lighting is rendered into an in-memory cube with `
+
+
@@ -540,6 +545,8 @@ DocuThinker is built with **120+ technologies** spanning frontend, backend, AI/M
diff --git a/frontend/src/__tests__/07_snapshots.test.js b/frontend/src/__tests__/07_snapshots.test.js new file mode 100644 index 0000000..a8f6164 --- /dev/null +++ b/frontend/src/__tests__/07_snapshots.test.js @@ -0,0 +1,116 @@ +/** + * Snapshot coverage for the presentational surface of the app. + * + * These lock in the rendered DOM for the static pages, the auth pages, the + * chrome (Navbar/Footer/Spinner), and the redesigned 3D LandingPage. Heavy + * runtime-only widgets (upload/chat modals that pull in axios + firebase + + * file APIs) are intentionally excluded — they have no deterministic initial + * render to snapshot. + * + * To intentionally update a snapshot after a UI change: `npx jest -u`. + */ +import React from "react"; +import { render, screen } from "@testing-library/react"; +import { MemoryRouter } from "react-router-dom"; +import { renderWithRouter } from "../test-utils"; + +// The hero's WebGL scene can't run in jsdom; swap in a deterministic stub so +// LandingPage snapshots are stable and don't depend on three.js / a GPU. +jest.mock("../components/three/HeroExperience", () => ({ + __esModule: true, + default: () =>
, +})); + +// WebAuthn/passkey helpers touch browser-only APIs missing in jsdom; stub them +// so the auth pages render their default (no-passkey) state. +jest.mock("../utils/passkeys", () => ({ + __esModule: true, + isPasskeySupported: () => false, + isPlatformAuthenticatorAvailable: async () => false, + authenticateWithPasskey: jest.fn(), + registerPasskey: jest.fn(), +})); + +import Spinner from "../components/Spinner"; +import Footer from "../components/Footer"; +import Navbar from "../components/Navbar"; +import NotFoundPage from "../pages/NotFoundPage"; +import PrivacyPolicy from "../pages/PrivacyPolicy"; +import TermsOfService from "../pages/TermsOfService"; +import HowToUse from "../pages/HowToUse"; +import Login from "../pages/Login"; +import Register from "../pages/Register"; +import ForgotPassword from "../pages/ForgotPassword"; +import LandingPage from "../pages/LandingPage"; + +describe("Component snapshots", () => { + it("Spinner renders consistently", () => { + const { container } = render(+ Reset your password +
++ Verify your email to set a new password. +
++ Verify email +
++ New password +
++ Welcome back +
++ Sign in to access your documents and summaries. +
++ Create your account +
++ Save your documents, summaries, and chat history. +
++ Already have an account? + + + Sign in + +
++ Home +
+ + ++ How to Use +
+ + ++ Documents +
+ + ++ Profile +
+ + ++ Login +
+ + ++ Register +
+ + ++ Landing +
+ + ++ Privacy Policy +
+ + ++ Terms of Service +
+ ++ © + 2026 + DocuThinker. All rights reserved. +
++ DocuThinker +
++ Upload PDFs, Word, Markdown, CSV, JSON, code, and more — then summarize, analyze, chat, rewrite, translate, and reply by voice, all in one intelligent workspace. +
+ ++ 10+ +
++ File types supported +
++ 9 +
++ AI tools in one place +
++ 1 +
++ Connected workspace +
++ 0 +
++ Setup required +
++ Why DocuThinker +
+ ++ Professional clarity, at any scale +
++ Grounded in the features available today — summaries, bullet points, analytics, and chat, all in one place. +
++ 0 + 1 +
++ Summaries that read cleanly +
++ Standard summaries plus bullet-point views in a consistent, copy-ready format. +
++ 0 + 2 +
++ Analysis in one view +
++ Sentiment analysis and document statistics sit right alongside the summary. +
++ 0 + 3 +
++ Refine and rewrite +
++ Refine summaries or rewrite selected text into a new tone or style in seconds. +
++ Capability spotlight +
++ Clarity for complex documents +
++ Step through what DocuThinker does the moment a file lands. +
++ Instant summaries +
++ Generate a clean summary and a bullet-point summary from supported documents, tables, and text files. +
++ Standard summary +
++ Bullet-point summary +
++ Copy results quickly +
++ Upload more than PDFs +
++ PDF, Word, Markdown, HTML, CSV/TSV, JSON, plain text, logs, and code/config files — all welcome. +
++ AI summary +
++ Generate a clean, readable summary of your document. +
++ Bullet-point summary +
++ Create a fast, skimmable bullet version on demand. +
++ Features +
+ ++ Everything you need to move faster +
++ Built for clarity, accessibility, and shared understanding across teams. +
++ Upload more than PDFs +
++ PDF, Word, Markdown, HTML, CSV/TSV, JSON, plain text, logs, and code/config files — all welcome. +
++ AI summary +
++ Generate a clean, readable summary of your document. +
++ Bullet-point summary +
++ Create a fast, skimmable bullet version on demand. +
++ Refine or rewrite +
++ Refine the summary or rewrite selected text in a new style. +
++ Chat with your document +
++ Ask questions or chat about selected text. +
++ Voice chat +
++ Upload or record audio to get a voice response. +
++ Sentiment analysis +
++ View sentiment scores and descriptions for your document. +
++ Document analytics +
++ See word counts, readability metrics, and key term stats. +
++ Summary in another language +
++ Generate a summary in a language you select. +
++ How it works +
+ ++ A workflow that mirrors the app +
++ Upload, summarize, analyze, and refine — all in the same workspace. +
++ Upload +
++ Upload documents, tables, text, or code from your device, or import supported files from Google Drive. +
++ Summarize +
++ Generate a standard summary or a bullet-point summary. +
++ Analyze +
++ Run sentiment analysis, document analytics, or chat about selections. +
++ Refine +
++ Refine the summary or rewrite selected text in a new style. +
++ Outputs +
+ ++ What you get back +
++ Clear summaries +
++ Readable summaries generated from your document text. +
++ Bullet-point view +
++ A skimmable bullet summary for quick review. +
++ Analysis at a glance +
++ Sentiment scores and document analytics in one place. +
++ Flexible outputs +
++ Refine summaries, rewrite text, or translate to another language. +
++ The difference +
+ ++ Manual vs DocuThinker +
++ Manual workflow +
++ Manual reading and highlighting +
++ Copying notes across tools +
++ No built-in sentiment or analytics +
++ Hard to refine or rewrite quickly +
++ DocuThinker workflow +
++ Upload documents, tables, text, or code files +
++ Generate summary + bullet summary +
++ Run sentiment analysis and document analytics +
++ Chat, refine, rewrite, or use voice responses +
++ Supported inputs +
+ ++ Bring almost anything +
++ Documents, structured data, text, logs, and code. Google Drive supports PDF, Word, JSON, and text-based files; voice chat supports audio upload or recording. +
++ Use cases +
+ ++ What you can do right now +
++ Summarize documents +
++ Generate a standard summary and a bullet-point summary. +
++ Analyze tone + structure +
++ Run sentiment analysis and view document analytics. +
++ Chat and voice +
++ Ask questions with text chat or upload/record audio. +
++ Refine and rewrite +
++ Refine the summary or rewrite selected text to a new style. +
++ Inside the workspace +
++ Made for real work +
++ Everything below reflects features available in the app today. +
++ Summaries and bullet points +
++ Generate a standard summary and a bullet-point summary on demand. +
++ Data handling (from Privacy Policy) +
++ Signed-in documents may be stored for later access. +
++ Guest uploads are processed but not stored. +
++ Google Drive access is read-only for file selection. +
++ FAQ +
+ ++ Answers at a glance +
++ Yes. Use the Google Drive picker to select files (read-only access). +
++ Yes. Generate a bullet-point summary in addition to the standard summary. +
++ Yes. Sentiment analysis is available in the summary workspace. +
++ Yes. Generate a summary in a selected language. +
++ Yes. Upload or record audio to receive a voice response. +
++ Get started +
+ ++ Ready to make documents + + + instantly useful + + ? +
++ Start now and see how DocuThinker turns information into action — no setup, no friction. +
+ ++ How to Use DocuThinker +
++ Your AI-powered document workspace — upload a PDF, Word, Markdown, or text file and summarize it, extract key ideas, chat with it, translate it, and more. Here's everything you can do. +
++ + You must be signed in + + to upload, summarize, and save documents. Create a free account on the + + + Register + + + page or + + + log in + + + to get started — your documents are then saved to your account. +
++ Upload a document +
++ Drag & drop onto the upload box on the home page, pick a file from your device, or import from Google Drive. Supported: PDF, Word (.docx), Markdown, HTML, CSV/TSV, JSON, plain text, and code/config files — each is rendered in its best form (real PDF pages, formatted Word/Markdown, HTML, tables for CSV, monospace for code, or clean text). +
++ View the original + summary +
++ After processing you'll see the original document rendered on the left (real PDF pages, formatted Word/Markdown, or clean text) and a concise AI summary on the right. +
++ Highlight text for quick actions +
++ On the results view, select any text to pop a menu: Copy, Summarize, Rewrite, Ask Chat, or Search the web — all scoped to exactly what you highlighted. +
++ Generate key ideas +
++ Click 'Generate Key Ideas' to let the AI extract the most important points from the document. +
++ Generate discussion points +
++ Create discussion points for group discussions, debates, or deeper analysis of the document. +
++ Chat with the AI +
++ Ask specific questions and get answers grounded in your document's context — the AI also knows the document's title and today's date. +
++ Bullet-point summary +
++ Get a concise bulleted summary — handy for quick notes or study guides. +
++ Change the summary language +
++ Translate the summary into another language to share with multilingual readers. +
++ Sentiment analysis +
++ See whether the document reads positive, negative, or neutral. Results are cached per document so revisiting won't re-run the analysis. +
++ Actionable recommendations +
++ Get suggested next steps, improvements, or decisions based on the document content. +
++ Rewrite content +
++ Specify a tone or style and the AI rewrites the text — or highlight a passage and rewrite just that part. +
++ Voice chat +
++ Talk to the AI: upload a document, hit 'Voice Chat', and ask questions or discuss the content by voice. +
++ Search your documents +
++ On the Documents page, search by title or summary and sort/filter (newest, oldest, A–Z, by file type) to find anything fast. +
++ Manage documents & profile +
++ View, re-open, rename, or delete saved documents, and update your email, social links, and avatar from the Profile page. +
++ Create an account to save work +
++ Register and sign in to store your analyzed documents, re-open them anytime with the original file, and get a higher upload limit. +
++ Sign in with passkeys +
++ Skip passwords — add a passkey and sign in with your fingerprint, face, or device PIN from the Passkeys page. +
++ Supported document formats +
++ Make sure your document is one of these formats before uploading to guarantee smooth processing. +
++ Made with ❤️ by + + + Son Nguyen + + . Thank you for using DocuThinker! 🚀 +
++ 404 +
++ This page wandered off +
++ The page you're looking for doesn't exist, was moved, or the link is broken. Let's get you back on track. +
++ Privacy Policy +
++ How DocuThinker collects, uses, and protects your information. +
++ Welcome to DocuThinker App. This Privacy Policy explains how we collect, use, and protect your personal information when you use our website and services. Your privacy is important to us, and we are committed to ensuring that your personal information is handled securely and responsibly. +
++ We may collect the following types of information: +
++ Your uploaded documents (PDF or DOCX files) - we will only process them to provide our services. We may store them securely in our databases so that signed in users can access them later. We do not share your documents with third parties and do not store documents of users who are not signed in. +
++ Usage data (IP address, browser type, time spent on site, etc.) - This information is collected by Google Analytics and helps us understand how users interact with our website. +
++ Personal information (name, email address) - We collect this information when you sign up for an account. We use it to provide our services only. +
++ We use the information we collect to: +
++ Provide and operate our services. +
++ Improve, personalize, and expand our website and services. +
++ Communicate with you about updates, promotions, and changes to our services. +
++ Comply with legal obligations and ensure the security of our platform. +
++ We implement various security measures to protect your personal information. These measures include secure data storage, encryption, and access controls. However, no data transmission over the internet is 100% secure, and we cannot guarantee the absolute security of your information. +
++ We may use third-party services (such as Google Drive and Dropbox) to facilitate file uploads and other services. These third parties may have their own privacy policies governing how they handle your data. We encourage you to review the privacy policies of any third-party services you use through our platform. +
++ You have the right to: +
++ Access, update, or delete your personal information. +
++ Withdraw consent for data processing where consent was previously given. +
++ File a complaint with your local data protection authority if you believe your rights are violated. But, please try to reach out to us first so we can address your concerns. +
++ We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any significant changes by posting the updated policy on our website. +
++ If you have any questions about this Privacy Policy or how we handle your personal information, please contact us at: + + + hoangson091104@gmail.com. + +
+ ++ Made with ❤️ by + + + Son Nguyen + + + in 2024. Thank you for visiting DocuThinker! 🚀 +
++ Terms of Service +
++ The rules and terms for using DocuThinker. +
++ By accessing and using DocuThinker, you agree to comply with and be bound by the following terms and conditions ("Terms of Service"). Please review these terms carefully. If you do not agree with these terms, you should not use this website. +
++ DocuThinker allows users to upload, analyze, and process documents to extract useful information and insights. We aim to provide a seamless and secure platform for document processing, but we cannot guarantee the absolute accuracy or completeness of our services. +
++ You agree to use DocuThinker in compliance with all applicable laws and regulations. You are responsible for the content of the documents you upload and must ensure that you have the necessary permissions or rights to use them. You agree not to use DocuThinker for any unlawful or prohibited activities. +
++ You are responsible for maintaining the confidentiality of your account credentials, including your username and password. You agree to notify us immediately if you suspect any unauthorized use of your account or any other security breach. +
++ We reserve the right to terminate or suspend your access to DocuThinker at any time, without notice, if we believe that you have violated these terms, misused our services, or engaged in any unlawful activities. +
++ All content, features, and functionality on DocuThinker, including text, graphics, logos, and software, are the exclusive property of DocuThinker or its licensors. You may not reproduce, modify, or distribute any part of this platform without our prior written consent. +
++ DocuThinker will not be liable for any direct, indirect, incidental, or consequential damages arising from your use of our platform. This includes any loss of data or damage to your device as a result of using our services. +
++ We reserve the right to modify these Terms of Service at any time. We will notify you of any significant changes by posting the updated terms on our website. Continued use of the platform after such changes constitutes your acceptance of the new terms. +
++ These Terms of Service are governed by and construed in accordance with the laws of your jurisdiction, without regard to its conflict of law provisions. You agree to submit to the exclusive jurisdiction of the courts in your country or region. +
++ If you have any questions about these Terms of Service, please contact us at: + + + hoangson091104@gmail.com. + +
+ ++ Made with ❤️ by + + + Son Nguyen + + + in 2024. Thank you for using DocuThinker! 🚀 +
+