404
+Oops, we couldn’t find that page!
++ It seems DocuNova has misplaced the document you were looking for. Whether it got lost in the cloud or hidden between the files, don’t worry – we’ve got your back. +
+ + ← Return Home + +diff --git a/app/frontend.py b/app/frontend.py index 219ee874..f6859d79 100644 --- a/app/frontend.py +++ b/app/frontend.py @@ -19,7 +19,7 @@ router.mount("/static", StaticFiles(directory=frontend_folder), name="static") @router.get("/upload", response_class=FileResponse) @require_login async def serve_upload(request: Request): - return os.path.join(frontend_folder, "index.html") + return os.path.join(frontend_folder, "upload.html") # 3) Serve favicon.ico from the frontend folder @router.get("/favicon.ico", response_class=FileResponse) @@ -28,4 +28,12 @@ def favicon(): """ @router.exception_handler(404) async def custom_404_handler(request: Request, exc): - return FileResponse("frontend/404.html", status_code=status.HTTP_404_NOT_FOUND) """ \ No newline at end of file + return FileResponse("frontend/404.html", status_code=status.HTTP_404_NOT_FOUND) """ + +@router.get("/", response_class=FileResponse) +async def serve_upload(request: Request): + return os.path.join(frontend_folder, "index.html") + +@router.get("/about", response_class=FileResponse) +async def serve_upload(request: Request): + return os.path.join(frontend_folder, "about.html") \ No newline at end of file diff --git a/app/main.py b/app/main.py index 8c1f95e1..e252b71d 100644 --- a/app/main.py +++ b/app/main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os -from fastapi import FastAPI, HTTPException, UploadFile, File, status, Request +from fastapi import FastAPI, HTTPException, UploadFile, File, status, Request, FileResponse from starlette.middleware.sessions import SessionMiddleware from starlette.config import Config from starlette.middleware.trustedhost import TrustedHostMiddleware @@ -52,9 +52,7 @@ app.add_middleware(TrustedHostMiddleware, allowed_hosts=[ def on_startup(): init_db() # Create tables if they don't exist -@app.get("/") -def root(): - return {"message": "Document Processing API"} + @app.post("/process/") def process(file_path: str): diff --git a/frontend/404.html b/frontend/404.html index 20086e75..d953dd52 100644 --- a/frontend/404.html +++ b/frontend/404.html @@ -2,20 +2,75 @@
-- Sorry, we couldn’t find the page you’re looking for. -
- - ← Back to home - + + + + + ++ It seems DocuNova has misplaced the document you were looking for. Whether it got lost in the cloud or hidden between the files, don’t worry – we’ve got your back. +
+ + ← Return Home + ++ Welcome to DocuNova – your modern, intelligent solution for document processing! We’ve built DocuNova to completely transform the way you handle your documents – from upload to extraction, from processing to storage. With cutting-edge technologies and a user-first design, DocuNova makes managing your documents as easy as a click. +
+ + ++ DocuNova was created with one goal in mind: to simplify and streamline document management for everyone, whether you’re a small startup or a large enterprise. Tired of clunky, outdated systems, we set out to design a platform that is intuitive, flexible, and packed with powerful features. +
++ We harness the power of OpenAI for metadata extraction and text refinement, integrate seamlessly with Dropbox, Nextcloud, and Paperless NGX for storage and indexing, leverage Azure Document Intelligence for OCR, and even use Gotenberg for file-to-PDF conversions. And while we’ve implemented AWS S3 for now, we’re always evolving! +
++ DocuNova is passionately developed by Christian Krakau-Louis, a visionary committed to solving real-world challenges with innovative technology. His dedication and expertise ensure that every feature in DocuNova is crafted with you in mind. +
++ Want to dive into the code, contribute ideas, or simply check out the magic behind DocuNova? Visit our GitHub repository to see the project in action! +
+ +
+ View DocuNova on GitHub
+
+ - Drag & drop a file here, or click to select a file. -
- -+ Your intelligent solution for processing, managing, and organizing documents effortlessly. +
+ ++ Quickly upload and process your files with our user-friendly interface. +
+ + Get Started → + ++ View, organize, and collaborate on your processed files in one central hub. +
+ + View Files → + ++ Drag & drop a file here, or click to select a file. +
+ +