Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Build artifacts
dist/
*.xpi
*.zip

Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100,
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "lf"
}
71 changes: 68 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ Choose from **5 leading cloud AI providers** or run a **local Ollama** model:
```bash
git clone https://github.com/Nigel1992/AutoSort-Plus.git
cd AutoSort-Plus
zip -r autosortplus.xpi manifest.json background.js options.js options.html styles.css content.js icons/
npm install
npm run build
npm run xpi
```

Then load `autosortplus.xpi` as described in Option 1.

<div align="center">

**[πŸ“₯ Download Latest Release](https://github.com/Nigel1992/AutoSort-Plus/releases) β€’ [πŸ“– View Changelog](#-changelog)**
Expand Down Expand Up @@ -562,9 +566,9 @@ You can also manually label emails without AI analysis:
<th>Status</th>
</tr>
<tr>
<td>πŸ”΄ High</td>
<td>🟒 Done</td>
<td><strong>Detailed Logging</strong> - Debug mode with console output</td>
<td>πŸ“‹ Planned</td>
<td>βœ… Completed</td>
</tr>
<tr>
<td>πŸ”΄ High</td>
Expand Down Expand Up @@ -620,6 +624,67 @@ If you encounter any issues, please [open an issue on GitHub](https://github.com

---

## Development

### Prerequisites

- Node.js 18+
- npm

### Setup

```bash
git clone https://github.com/Nigel1992/AutoSort-Plus.git
cd AutoSort-Plus
npm install
```

### Architecture

```
src/
β”œβ”€β”€ background/ Background script (AI, batch, folders, auto-sort)
β”œβ”€β”€ options/ Options page UI
β”œβ”€β”€ shared/ Shared utilities (logger, storage, i18n, tab-fetch)
β”œβ”€β”€ types/ TypeScript type definitions
β”œβ”€β”€ content.ts Content script
β”œβ”€β”€ ollama.ts Ollama API client
β”œβ”€β”€ workers/ Web Workers
└── popup/ Web-accessible popups
```

### Commands

| Command | Description |
|---------|-------------|
| `npm run build` | Build extension to `dist/` |
| `npm run watch` | Build and watch for changes |
| `npm run test` | Run tests |
| `npm run test:watch` | Run tests in watch mode |
| `npm run test:coverage` | Run tests with coverage report |
| `npm run lint` | Lint source code |
| `npm run format` | Check formatting |
| `npm run format:fix` | Fix formatting |
| `npm run typecheck` | TypeScript type checking |
| `npm run check` | Full check (typecheck + lint + test) |
| `npm run xpi` | Build + package as `.xpi` |

### Load in Thunderbird

1. `npm run build`
2. In Thunderbird, go to `about:debugging` β†’ This Thunderbird β†’ Load Temporary Add-on
3. Select `dist/manifest.json`

### Tech Stack

- TypeScript (strict mode)
- esbuild (bundler)
- Vitest (test framework)
- ESLint + Prettier (code quality)
- Thunderbird WebExtension APIs

---

## πŸ™ Contributing

We welcome contributions! Here's how to help:
Expand Down
Loading