anreo Back
作品Feb 2026Live in production

Super Excalidraw Plus

A secure, full-featured whiteboard application built with Next.js and Excalidraw, deeply integrated with Google Drive for real-time cloud storage, file organization, collaboration, and AI-powered diagram generation.

PeriodFeb 2026
StackNext.js · Excalidraw · Google Drive API · TypeScript
Next.jsExcalidrawGoogle Drive APITypeScriptTailwindCSSNextAuth.jsLiveblocksGemini AIMermaid.js

A production-ready whiteboard solution that enhances the standard Excalidraw experience with robust cloud storage via Google Drive, real-time collaboration, and an AI Copilot that generates diagrams from natural language.

Overview

This project bridges the gap between ephemeral local-first whiteboards and persistent cloud storage. By leveraging the Google Drive API and Liveblocks, it transforms Excalidraw into a fully managed, real-time collaborative document editor. A Gemini-powered AI Copilot layer adds the ability to generate professional diagrams from plain text descriptions, previewed and refined interactively before insertion.

Key Features

✨ AI Copilot — Text to Diagram

☁️ Deep Google Drive Integration

🤝 Real-time Collaboration

🔒 Enterprise-Grade Security

🎨 Enhanced User Experience

Technical Challenges & Solutions

🤖 Mermaid → Excalidraw Normalization

Converting Mermaid diagrams to stable Excalidraw elements required two normalization passes: convertToExcalidrawElements to fill missing properties, and a custom linear-element normalizer ensuring arrow points[0] is always [0,0] — preventing the "Linear element is not normalized" runtime crash.

🚀 Build Optimization & SSR

Resolved complex hydration mismatches integrating client-side heavy libraries (Excalidraw, Mermaid.js) with Next.js App Router's server-first architecture using next/dynamic with ssr: false.

⚡ Performance Tuning

Intelligent caching for library files and minimized Drive API calls through aggressive debouncing and sceneVersion comparisons.

Technologies Used

Frontend: Next.js 14 (App Router), React, TailwindCSS

AI: Google Gemini API (gemini-2.5-flash-lite), Mermaid.js, @excalidraw/mermaid-to-excalidraw

Core Lib: @excalidraw/excalidraw

Backend: Next.js API Routes, Googleapis (Drive v3), Liveblocks

Auth: NextAuth.js (Google Provider)

Security: Server-Side JWT handling, SSRF Protection