diff --git a/.cursor/rules/010-overview.mdc b/.cursor/rules/010-overview.mdc index 4a80e00..0db3566 100644 --- a/.cursor/rules/010-overview.mdc +++ b/.cursor/rules/010-overview.mdc @@ -29,9 +29,3 @@ This project's goal is to enable builders to create email-based apps ### Documentation - Fast track the installation, usage and contribution of users - -### Backend API -- Allow users to host online a REST API to develop email-based services -- Handle user authentication (OAuth 2 using JWT as bearer tokens) -- Handle OAuth connections (Google account) -- Enable the fetching and labeling of emails (metadata in relational database + image/video in storage) diff --git a/.cursor/rules/020-structure.mdc b/.cursor/rules/020-structure.mdc index f4e9b75..790ce4b 100644 --- a/.cursor/rules/020-structure.mdc +++ b/.cursor/rules/020-structure.mdc @@ -10,21 +10,34 @@ The codebase includes several applications with separate tech stacks and folders - `.github/`: GitHub CI configuration - `.cursor/rules`: rules for coding assistants +- `.vscode`: IDE settings - `./relay`: core library for email management -- `./cli`: CLI for email management -- [Makefile](mdc:Makefile) high-level project commands +- `./tests`: test suite +- `./docs`: project documentation +- [Makefile](mdc:Makefile): high-level project commands - [.pre-commit-config.yaml](mdc:.pre-commit-config.yaml): pre-commit configuration file - [pyproject.toml](mdc:pyproject.toml): project configuration file +- [uv.lock](mdc:uv.lock): lockfile for the Docker orchestration +- [Dockerfile](mdc:Dockerfile): dockerfile +- [README.md](mdc:README.md): readme +- [CONTRIBUTING.md](mdc:CONTRIBUTING.md): contribution guide +- [CODE_OF_CONDUCT.md](mdc:CODE_OF_CONDUCT.md): code of conduct +- [LICENSE](mdc:LICENSE): license copy ## Core library The core library is a Python library + CLI for sync and async email operations, organized as follows: -- [client.py](mdc:relay/client.py): main entry point -- [config.py](mdc:relay/config.py): configuration management - [exceptions.py](mdc:relay/exceptions.py): SDK-specific exceptions +- `auth/`: authentication system (creds, oauth flow, secure storage) + - [account.py](mdc:relay/auth/account.py): email account management + - [credentials.py](mdc:relay/auth/credentials.py): credentials management + - [storage.py](mdc:relay/auth/storage.py): storage management - `models/`: data models (translatable to other languages) - `providers/`: email provider implementations - - `gmail/`: Gmail connection - - `outlook/`: Outlook connection - - `imap/`: IMAP connection - - `smtp/`: SMTP connection -- `auth/`: authentication system (creds, oauth flow, secure storage) + - [imap.py](mdc:relay/providers/imap.py): IMAP connection + - [smtp.py](mdc:relay/providers/smtp.py): SMTP connection + - [utils.py](mdc:relay/providers/utils.py): utilities +- `cli/`: CLI + - [main.py](mdc:relay/cli/main.py): Typer app definition + - `commands/` + - [account.py](mdc:relay/cli/commands/account.py): account related commands + - [messages.py](mdc:relay/cli/commands/messages.py): messages related commands diff --git a/.cursor/rules/030-tech-stack.mdc b/.cursor/rules/030-tech-stack.mdc index 36e7dd8..c653de1 100644 --- a/.cursor/rules/030-tech-stack.mdc +++ b/.cursor/rules/030-tech-stack.mdc @@ -11,17 +11,14 @@ This is a thorough description of technology choices for the project. We want to ## General - Makefile -## Backend API +## Core library - Python 3.11+ - Pydantic for model validation +- Typer for the CLI - uv for dependency management - ty for type checking - ruff for code styling & format - pytest as testing framework - -## CLI -- Typer - ## Documentation - Mintlify diff --git a/README.md b/README.md index ce5b5e6..a9cac39 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- Relay - Claude Code meets Gmail API + Relay - protocol-native CLI for email management

CLI ・ @@ -19,7 +19,7 @@ ruff - ruff + ty Test coverage percentage @@ -36,10 +36,10 @@

- + Discord - Twitter + Twitter

@@ -60,9 +60,7 @@ That's it! ### Prerequisites -- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - [UV](https://docs.astral.sh/uv/getting-started/installation/) -- [Make](https://www.gnu.org/software/make/) (optional) ### 30 seconds setup ⏱️ diff --git a/docs/changelog/overview.mdx b/docs/changelog/overview.mdx index 08b57ba..0208b0d 100644 --- a/docs/changelog/overview.mdx +++ b/docs/changelog/overview.mdx @@ -36,9 +36,6 @@ The changelog below reflects new product developments and updates on a monthly b ### 📧 Email Provider Support * Gmail (via App Passwords) - * Outlook/Hotmail (via App Passwords) - * Yahoo Mail - * FastMail * Custom IMAP/SMTP servers ### 🚀 Getting Started diff --git a/docs/docs.json b/docs/docs.json index 9c426b5..ec21fca 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -109,5 +109,11 @@ }, "fonts": { "family": "Geist Mono" - } + }, + "integrations": { + "posthog": { + "apiKey": "phc_KM92OpgE50LK7fNerCe2JOq8KaSJeWRKfgpY2L9it5i", + "apiHost": "https://eu.i.posthog.com" + } +} } diff --git a/relay/cli/utils.py b/relay/cli/_utils.py similarity index 97% rename from relay/cli/utils.py rename to relay/cli/_utils.py index 7d1b983..e9808d4 100644 --- a/relay/cli/utils.py +++ b/relay/cli/_utils.py @@ -18,7 +18,7 @@ class AliasGroup(TyperGroup): _CMD_SPLIT_P = re.compile(r" ?[,|] ?") - def get_command(self, ctx, cmd_name): # noqa: D102 + def get_command(self, ctx, cmd_name): cmd_name = self._group_cmd_name(cmd_name) return super().get_command(ctx, cmd_name) diff --git a/relay/cli/commands/account.py b/relay/cli/commands/account.py index 3c5b445..4386f6c 100644 --- a/relay/cli/commands/account.py +++ b/relay/cli/commands/account.py @@ -25,7 +25,7 @@ from relay.models.account import PROVIDER_CONFIGS, AccountCreate, EmailProvider from relay.providers.utils import resolve_provider -from ..utils import AliasGroup, create_accounts_table +from .._utils import AliasGroup, create_accounts_table console = Console() app = typer.Typer(help="Account management commands", cls=AliasGroup) diff --git a/relay/cli/commands/messages.py b/relay/cli/commands/messages.py index d20d93b..409a4de 100644 --- a/relay/cli/commands/messages.py +++ b/relay/cli/commands/messages.py @@ -19,7 +19,7 @@ from relay.exceptions import AccountNotFoundError, AuthenticationError, ServerConnectionError, ValidationError from relay.models.message import MessageSummary -from ..utils import AliasGroup, create_messages_table +from .._utils import AliasGroup, create_messages_table console = Console() app = typer.Typer(help="Email message commands", cls=AliasGroup)