Skip to content

Commit e4d70bd

Browse files
committed
docs: update docs
1 parent 3eaf76c commit e4d70bd

9 files changed

Lines changed: 86 additions & 325 deletions

File tree

README.md

Lines changed: 86 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,123 @@
1-
# PaperDebugger
1+
![branding](docs/imgs/branding.png)
22

3-
## Clone and Build (locally)
3+
PaperDebugger is an AI-powered academic writing assistant that helps researchers debug and improve their LaTeX papers. This document provides comprehensive setup and deployment instructions for the backend service.
44

5-
**Prequisite:**
6-
- `brew install bufbuild/buf/buf`
5+
## Overview
6+
The PaperDebugger backend is built with:
77

8-
**Clone and Build**
9-
```bash
10-
git clone https://github.com/PaperDebugger/paperdebugger.git
11-
cd paperdebugger
8+
<img src="docs/imgs/stacks.png" style="height: 200px;" />
129

13-
make deps # install dependencies and libraries
14-
make build # build the backend
15-
# the binary is located in ./dist/pd.exe
10+
- **Language**: Go 1.24+
11+
- **Framework**: Gin (HTTP) + gRPC (API)
12+
- **Database**: MongoDB
13+
- **AI Integration**: OpenAI API
14+
- **Architecture**: Microservices with Protocol Buffers
15+
- **Authentication**: JWT-based with OAuth support
1616

17-
cd webapp/_webapp
18-
npm run build:prd:chrome
19-
# the extension is located in wbeapp/_webapp/dist/*
20-
```
17+
## Features
2118

22-
**Run mongodb**
19+
PaperDebugger never modifies your project, it only reads and provides suggestions.
2320

24-
```bash
25-
docker run -d --name mongodb -p 27017:27017 mongo:latest
26-
```
21+
- **Chat**: AI-powered chats about your overleaf project
22+
- **Instant Insert**: One-click, insert AI response to your project
23+
- **Comment System**: Automatically generate comments and insert into your project
24+
- **Prompt Library**: Custom prompt templates for different use cases
2725

28-
**Run backend**
26+
## Prerequisites
2927

28+
### System Requirements
29+
- **Go**: 1.24 or higher
30+
- **Node.js**: LTS version (for frontend build)
31+
- **MongoDB**: 4.4 or higher
32+
- **Git**: For cloning the repository
33+
34+
### Development Tools
35+
- **Buf**: Protocol Buffer compiler
36+
- **Wire**: Dependency injection code generator
37+
- **Make**: Build automation
38+
39+
### Installation
40+
41+
#### On macOS/Linux (using Homebrew)
3042
```bash
31-
./dist/pd.exe
32-
```
43+
# Install Go
44+
brew install go
3345

34-
## Step 1 k9s
46+
# Install Buf (required for Protocol Buffers)
47+
brew install bufbuild/buf/buf
3548

36-
open k9s, then expose the mongo db port at 27017
37-
and also expose paperdebugger-mcp at 8000. (also make sure you modify the `/etc/hosts` let `127.0.0.1 paperdebugger-mcp-server`)
49+
# Install Node.js
50+
brew install node
51+
```
3852

39-
## Step 2 build
53+
## Backend Build
4054

55+
### 1. Clone
4156
```bash
42-
make deps # 安装依赖
43-
make build
57+
# Clone the repository
58+
git clone https://github.com/PaperDebugger/paperdebugger.git
59+
cd paperdebugger
4460
```
4561

62+
### 2. Start MongoDB
63+
```bash
64+
# Using Docker (recommended)
65+
docker run -d --name mongodb -p 27017:27017 mongo:latest
66+
```
4667

47-
## Step 3 run
68+
### 3. Setting up environments
4869

4970
```bash
50-
PD_MONGO_URI="mongodb://localhost:27017" ./dist/pd.exe
71+
cp .env.example .env
72+
# edit the .env file based on your condition
5173
```
5274

75+
### 4. Build and Run
5376

54-
## 从克隆开始
55-
56-
### 自动
5777
```bash
58-
make all
78+
# Build the backend
79+
make build
80+
# Run the backend server
81+
./dist/pd.exe
5982
```
6083

61-
### 手动
84+
The server will start on `http://localhost:6060`.
6285

63-
#### 0. 安装环境
86+
![Backend Server Running](./docs/imgs/run.png)
6487

65-
```bash
66-
make deps
67-
```
6888

69-
#### 1. Web 构建
89+
## Frontend Extension Build
7090

91+
### Chrome Extension
7192
```bash
7293
cd webapp/_webapp
94+
95+
# Install frontend dependencies
7396
npm install
7497

75-
npm run build:local:chrome # 构建本地版本(链接至本地后端)
76-
# or
77-
npm run build:prd:chrome # 构建生产环境版本(连接至生产环境服务器)
98+
# Build for production (connects to production server)
99+
npm run build:prd:chrome
100+
101+
# The extension files will be in dist/
102+
cd dist
103+
zip -r paperdebugger-extension.zip *
78104
```
79105

80-
#### 2. 后端 构建
106+
### Installing the Extension
107+
1. Open Chrome and navigate to `chrome://extensions/`
108+
2. Enable "Developer mode"
109+
3. Click "Load unpacked" and select the `webapp/_webapp/dist` directory, or drag the `paperdebugger-extension.zip` file into the extensions page
81110

82-
```bash
83-
make build
84-
```
111+
## Custom Endpoint Configuration
112+
113+
If you're using PaperDebugger with Overleaf.com, ensure your backend service uses HTTPS. Chrome blocks HTTP requests from HTTPS websites for security reasons.
114+
115+
![Custom Endpoint Configuration](./docs/imgs/custom_endpoint.png)
116+
117+
To configure a custom endpoint:
118+
1. Open the PaperDebugger extension
119+
2. Go to Settings, click version number 5 times to enabled "Developer Tools"
120+
3. Enter your backend URL in the "Backend Endpoint" field
121+
4. Refresh the page
122+
123+
If you encounter endpoint errors after refresh, use the "Advanced Options" at the bottom of the login page to reconfigure the endpoint.

docs/DEPLOY.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/DEV.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/SELF-HOSTED.md

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)