Skip to content

dicodingacademy/docsreviewer

Repository files navigation

📝 Docs Comment Injector

AI-Powered Document Review for Google Docs

React Router TypeScript TailwindCSS GenAI

Get professional writing feedback on your Google Docs with the power of AI agents

FeaturesQuick StartConfigurationAI AgentsDeployment


✨ Features

  • 🤖 Multi-Agent AI Review — 7 specialized AI agents analyze your document simultaneously
  • 📄 Google Docs Integration — Direct integration with Google Docs API
  • 🎯 Context-Aware Analysis — Customize review based on target audience and tone
  • 💬 Inline Commenting — Grammarly-style inline suggestions with hover cards
  • Multi-Provider Support — Choose between Google Gemini or OpenAI models
  • 🇮🇩 Indonesian Focus — Optimized for Bahasa Indonesia writing (EYD compliant)
  • Real-time Processing — Stream agent results as they complete

🤖 AI Agents

Agent Description
Typo Checker Fixes mechanical errors and spelling mistakes
Tone & Clarity Improves flow, readability, and simplifies complex sentences
Fact & Logic Checks internal consistency and logical errors
EYD Expert Enforces formal Indonesian grammar (EYD V)
Structure Analyzes document organization and flow
Redundancy Identifies repetitive content and filler words
Inclusivity Ensures language is inclusive and unbiased

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • Google Cloud Console project with Docs API enabled
  • API keys from Google AI Studio and/or OpenAI

Installation

# Clone the repository
git clone https://github.com/yourusername/docs-comment-injector.git
cd docs-comment-injector

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

Configuration

Create a .env file with your credentials:

# Google OAuth (for Google Docs access)
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret

# Authentication
BETTER_AUTH_SECRET=your_random_secret
BETTER_AUTH_URL=http://localhost:5173

# AI Providers (at least one required)
GEMINI_API_KEY=your_gemini_api_key
OPENAI_API_KEY=your_openai_api_key

Development

npm run dev

Open http://localhost:5173 in your browser.

🎨 Review Context Options

Customize your review by specifying:

Target Audience:

  • General • Technical • Academic • Business • Casual

Tone Preference:

  • Professional • Casual • Academic • Friendly

🔧 Supported AI Models

Google Gemini

  • Gemini 3 Pro (latest)
  • Gemini 2.5 Pro
  • Gemini 2.5 Flash
  • Gemini 2.5 Flash Lite

OpenAI

  • GPT-4o Mini
  • GPT-4o
  • GPT-4 Turbo

📦 Tech Stack

Layer Technology
Framework React Router v7
Language TypeScript 5.9
Styling TailwindCSS 4
Auth Better Auth
Database SQLite (Kysely)
AI SDK Google GenAI, OpenAI
Icons Lucide React

🐳 Deployment

Docker

# Build the image
docker build -t docs-comment-injector .

# Run the container
docker run -p 3000:3000 \
  -e GOOGLE_CLIENT_ID=xxx \
  -e GOOGLE_CLIENT_SECRET=xxx \
  -e BETTER_AUTH_SECRET=xxx \
  -e GEMINI_API_KEY=xxx \
  docs-comment-injector

Production Build

npm run build
npm start

Supported Platforms

  • ☁️ Google Cloud Run
  • 🚀 Fly.io
  • 🌊 Digital Ocean App Platform
  • 🔷 Azure Container Apps
  • 🟠 AWS ECS
  • 🚂 Railway

📁 Project Structure

docs-comment-injector/
├── app/
│   ├── components/     # React components
│   ├── routes/         # Page routes
│   ├── services/       # AI & API services
│   │   └── providers/  # Gemini & OpenAI providers
│   ├── types/          # TypeScript definitions
│   └── lib/            # Utilities
├── public/             # Static assets
└── build/              # Production build

📄 License

MIT © 2025


Built with ❤️ using React Router & Google Gemini

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published