Skip to content

Commit 3b8aa6f

Browse files
ndbroadbentclaude
andcommitted
Update README with comprehensive development docs
- Add dev mode commands (task dev vs task dev:prod) - Add build commands and feature flag documentation - Add CLI tool usage examples - Add manual testing checklist - Update architecture to reflect current modules - Document quality standards and testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 2c2cf7e commit 3b8aa6f

File tree

1 file changed

+129
-29
lines changed

1 file changed

+129
-29
lines changed

README.md

Lines changed: 129 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ Desktop app for exporting iMessage chats to [ChatToMap.com](https://chattomap.co
44

55
## Overview
66

7-
ChatToMap Desktop uses [imessage-exporter](https://github.com/ReagentX/imessage-exporter) to read your iMessage database and export conversations for processing by ChatToMap. The app provides a simple UI for selecting chats and uploading them securely.
7+
ChatToMap Desktop reads your iMessage database directly and exports conversations for processing by ChatToMap. The app provides a simple UI for selecting chats and uploading them securely.
88

99
## Requirements
1010

11-
- **macOS**: Requires Full Disk Access permission to read `~/Library/Messages/chat.db`
12-
- **Windows/Linux**: Requires an iTunes backup containing iMessage data
11+
- **macOS only**: Requires Full Disk Access permission to read `~/Library/Messages/chat.db`
12+
13+
## Installation
14+
15+
Download the latest release from the [Releases](https://github.com/DocSpring/chat_to_map_desktop/releases) page.
16+
17+
On first launch, you'll be prompted to grant Full Disk Access in System Preferences.
18+
19+
---
1320

1421
## Development
1522

@@ -27,24 +34,132 @@ bun install
2734

2835
# Install git hooks
2936
task hooks:install
37+
```
38+
39+
### Running the App
40+
41+
| Command | Description |
42+
|---------|-------------|
43+
| `task dev` | Development mode pointing to **localhost:5173** |
44+
| `task dev:prod` | Development mode pointing to **chattomap.com** |
45+
46+
For local development, use `task dev` which expects the SaaS dev server running at `localhost:5173`.
47+
48+
To test against production APIs, use `task dev:prod`.
49+
50+
### Building
51+
52+
| Command | Description |
53+
|---------|-------------|
54+
| `task build` | Production build (points to chattomap.com) |
55+
| `task build:dev` | Release build pointing to localhost (for testing) |
56+
57+
### Testing
58+
59+
```bash
60+
# Run all tests (Rust + TypeScript)
61+
task test
62+
63+
# Run only Rust tests
64+
task test:rust
65+
66+
# Run only TypeScript tests
67+
task test:ts
3068

31-
# Run development server
32-
task dev
69+
# Run TypeScript tests in watch mode
70+
task test:watch
3371
```
3472

35-
### Commands
73+
### Quality Checks
74+
75+
```bash
76+
# Run ALL checks (required before commits)
77+
task ci
78+
```
79+
80+
This runs: typecheck, lint, rust-lint, duplication check, file-length check, and all tests.
3681

3782
| Command | Description |
3883
|---------|-------------|
39-
| `task dev` | Start Tauri development mode |
40-
| `task build` | Build for production |
41-
| `task ci` | Run all CI checks (required before commits) |
42-
| `task lint` | Run Biome linter |
43-
| `task lint:rust` | Run Clippy (Rust linter) |
44-
| `task test` | Run all tests |
84+
| `task lint` | Biome linter (check only) |
85+
| `task lint:fix` | Biome linter with auto-fix |
86+
| `task lint:rust` | Clippy (Rust linter) |
4587
| `task typecheck` | TypeScript type checking |
88+
| `task duplication` | Check for code duplication |
89+
| `task file-length` | Check file length limits |
90+
91+
### CLI Tool
92+
93+
A command-line tool is available for debugging and testing:
4694

47-
### Quality Standards
95+
```bash
96+
# Build the CLI
97+
cd src-tauri && cargo build --bin ctm-cli
98+
99+
# List all chats
100+
./target/debug/ctm-cli list-chats
101+
102+
# List chats with message counts
103+
./target/debug/ctm-cli list-chats --show-counts
104+
105+
# Export specific chats (by ID)
106+
./target/debug/ctm-cli export --chat-ids 1,5,12 --output export.zip
107+
```
108+
109+
### Manual Testing Checklist
110+
111+
1. **Permission flow**: Launch app without Full Disk Access, verify permission screen appears
112+
2. **Grant access**: Open System Preferences, grant FDA, click "Check Again"
113+
3. **Chat list**: Verify chats load with correct names and message counts
114+
4. **Selection**: Test select all/none, individual selection, filtering
115+
5. **Export flow**: Select chats, click Export, verify progress stages
116+
6. **Browser open**: Verify browser opens to results page on completion
117+
118+
---
119+
120+
## Architecture
121+
122+
```
123+
chat_to_map_desktop/
124+
├── src/ # Frontend (TypeScript)
125+
│ ├── index.html # Main HTML
126+
│ ├── main.ts # Frontend logic & state
127+
│ ├── main.test.ts # Frontend tests
128+
│ └── styles.css # Styling
129+
├── src-tauri/ # Backend (Rust)
130+
│ ├── src/
131+
│ │ ├── lib.rs # Library exports
132+
│ │ ├── main.rs # Tauri commands (GUI)
133+
│ │ ├── cli.rs # CLI tool
134+
│ │ ├── contacts.rs # AddressBook integration
135+
│ │ ├── export.rs # Message export to JSON/zip
136+
│ │ ├── upload.rs # Server communication
137+
│ │ └── test_fixtures.rs # Test database builders
138+
│ ├── Cargo.toml # Rust dependencies
139+
│ └── tauri.conf.json # Tauri configuration
140+
├── Taskfile.yml # Build commands
141+
└── reference/ # Schema documentation
142+
└── imessage_schema.sql # iMessage database schema
143+
```
144+
145+
### Key Modules
146+
147+
| Module | Purpose |
148+
|--------|---------|
149+
| `contacts.rs` | Resolves phone/email to contact names via macOS AddressBook |
150+
| `export.rs` | Reads iMessage DB, exports selected chats to JSON zip |
151+
| `upload.rs` | Fetches pre-signed URLs, uploads to R2, creates processing jobs |
152+
153+
### Feature Flags
154+
155+
| Flag | Effect |
156+
|------|--------|
157+
| `dev-server` | Points to `localhost:5173` instead of `chattomap.com` |
158+
| `desktop` | Enables Tauri GUI (default) |
159+
160+
---
161+
162+
## Quality Standards
48163

49164
This project follows strict quality standards:
50165

@@ -56,21 +171,6 @@ This project follows strict quality standards:
56171

57172
All checks must pass before committing. Git hooks enforce this automatically.
58173

59-
## Architecture
60-
61-
```
62-
chat_to_map_desktop/
63-
├── src/ # Frontend (TypeScript)
64-
│ ├── index.html # Main HTML
65-
│ ├── main.ts # Frontend logic
66-
│ └── styles.css # Styling
67-
├── src-tauri/ # Backend (Rust)
68-
│ ├── src/main.rs # Tauri commands
69-
│ ├── Cargo.toml # Rust dependencies
70-
│ └── tauri.conf.json # Tauri configuration
71-
└── Taskfile.yml # Build commands
72-
```
73-
74174
## License
75175

76-
GPL-3.0 (required due to bundling GPL-licensed imessage-exporter)
176+
GPL-3.0 - See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)