Content
# Tool List
A mobile-first AI reading nest, running on ChatGPT Apps SDK + MCP. Users can import their own novel text or comic images, record their reading position with AI, and use make-up classes, lightweight comments, bookmarks, excerpts, and short comment docks.
This project is suitable for personal private deployment, learning, and secondary development. The public repository only provides code, testing, and original demos, without the author's reading content, chat records, or online data.
## Current Status
The project is still in the early development stage:
- The current public snapshot is based on `v0.2.2`.
- Novel pasting or TXT/Markdown file import, segmentation, and reading and cloud recovery links are basically available.
- The current novel uses segmentation v3 to merge short paragraphs; old cloud text can be restored and continue reading.
- Comic upload and page display still have known bugs, which will be fixed later.
- Currently, priority is given to optimizing iPad/iOS ChatGPT App reading experience.
- Desktop layout and novel experience are still improving.
- AI short comments can be manually saved; automatic saving is not yet a default stable feature.
- The current architecture is a personal single-user solution, not suitable for public multi-user services without modification.
## Features
- Novel pasting or TXT/Markdown file import
- Chapter recognition and segmentation v3 reading unit segmentation
- Comic image import and page-by-page reading
- User reading position and AI synchronization position separation
- Skipped range make-up class mechanism
- Lightweight co-reading, complaining, plot guessing, and in-depth analysis mode
- Bookmarks, excerpts, user reactions, and short comment docks
- IndexedDB local reading cache
- Cloudflare Worker, D1, and private R2 storage
- iPad mobile terminal and immersive reading experience
## Project Structure
```text
server/ TypeScript MCP server、Cloudflare Worker、D1/R2 adapters
web/ React + Vite ChatGPT widget
shared/ Shared data model, migration, and Zod schemas
demo/ Original example content that can be publicly used
```
## Quick Start
Requires Node.js 22+ and pnpm 10+.
```bash
pnpm install
pnpm build
pnpm dev
```
Common checks:
```bash
pnpm test
pnpm typecheck
pnpm build
```
Local MCP server defaults to:
- MCP endpoint: `http://localhost:8787/mcp`
- Health check: `http://localhost:8787/health`
## Cloudflare Deployment
1. Copy `.env.example`, fill in real values only on your local machine or Cloudflare, and do not submit.
2. Create your own D1 database and private R2 bucket.
3. Change the D1 database ID and resource name in `server/wrangler.jsonc` to your own values.
4. Set a random and long enough `MCP_PATH_TOKEN` secret for the Worker.
5. Execute migration, build, and deploy.
```bash
pnpm --filter @ss/server exec wrangler login
pnpm --filter @ss/server exec wrangler d1 create ss-reading-nest-db
pnpm --filter @ss/server exec wrangler r2 bucket create ss-reading-nest-sources
pnpm --filter @ss/server exec wrangler secret put MCP_PATH_TOKEN
pnpm --filter @ss/server exec wrangler d1 migrations apply ss-reading-nest-db --remote
pnpm build
pnpm --filter @ss/server deploy
```
The R2 bucket must remain private. The project does not generate public URLs or signed URLs. After deployment, use your own Worker address and private MCP path to add the app in ChatGPT Developer Mode.
## Environment Variables
See `.env.example` for examples:
| Variable | Purpose |
| --- | --- |
| `CLOUDFLARE_ACCOUNT_ID` | Cloudflare account ID, only for deployment or smoke test |
| `CLOUDFLARE_API_TOKEN` | Optional automated deployment credentials |
| `D1_DATABASE_ID` | Your own D1 database ID |
| `R2_BUCKET_NAME` | Your own private R2 bucket name |
| `MCP_PATH_TOKEN` | Worker private MCP/source path token |
| `WORKER_URL` | Deployed Worker HTTPS origin |
| `SMOKE_D1_DATABASE_ID` | D1 database ID used for remote smoke test |
This project does not require `OPENAI_API_KEY`. The model is provided by ChatGPT host, and the server does not directly call the OpenAI model API.
## Data and Privacy
- Users should deploy and manage D1, R2, Cloudflare secrets, and local cache themselves.
- Do not submit private chat, diary, reading records, bookmarks, excerpts, or user-uploaded source files to the repository.
- D1 should only save session, position, preferences, and source metadata; novel text and comic images are stored in private R2, and local IndexedDB is only used for device caching.
- IndexedDB is an acceleration cache for this device, not a unique long-term storage across devices.
- Text upload and recovery go through component-only components and Worker-controlled paths, and should not return the entire content through chat messages.
- ChatGPT model will not automatically read the entire novel or comic, only receiving the necessary current reading range when triggered by the user.
- Do not release copyrighted books or comics as demos, and do not upload them to public shared services.
- Demos should use original text or content that is confirmed to be in the public domain.
This version only uses random private paths to protect personal deployment, and does not provide complete user accounts, authentication, and multi-tenant isolation. Authentication, authorization, data isolation, deletion strategy, and abuse protection must be redesigned before public service.
Deletion operations are divided into three layers: deleting cloud reading records, deleting cloud text copies, and deleting device text cache. Users should clearly choose according to their own retention strategy and not mix them into one implicit deletion.
`server/scripts/remote-smoke/cloud-source-smoke.mjs` can be used for verification after deployment. Remote smoke test only uses temporary original content and will try to clean up test sessions and R2 objects; you must provide your own deployment information through local environment variables before running.
## Secondary Development
You can adjust according to your own way of getting along with AI companions:
- UI style, theme, and address
- Co-reading comment mode and prompt
- Manual or automatic saving strategy
- Novel segmentation and comic import method
- Local priority or cloud priority data strategy
- Your own Cloudflare private deployment method
It is recommended to keep the privacy boundary of "user actively triggers to send the current reading range" and let comment saving failure not block normal chat.
## Known Issues
- Comic link still has upload and page display issues.
- Desktop novel layout still needs more adaptation.
- AI comment automatic saving is still unstable, and manual saving is recommended by default.
## License
This project is open-sourced under the [MIT License](LICENSE), and can be used, modified, and distributed freely. Users need to ensure that importing, storing, and sharing content comply with copyright and local laws and regulations.
Connection Info
You Might Also Like
No recommendations available