{"id":27997344,"url":"https://github.com/thanksduck/mail","last_synced_at":"2026-05-02T02:35:46.900Z","repository":{"id":255447641,"uuid":"849996310","full_name":"thanksduck/mail","owner":"thanksduck","description":"REST API built for managing email routing rules on Cloudflare with multi user support","archived":false,"fork":false,"pushed_at":"2024-11-03T16:29:50.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T21:58:22.553Z","etag":null,"topics":["aliases","cloudlfare","jwt","mail","nodejs","routing"],"latest_commit_sha":null,"homepage":"https://oas.20032003.xyz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thanksduck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T17:02:33.000Z","updated_at":"2024-11-03T16:29:53.000Z","dependencies_parsed_at":"2024-11-03T17:22:23.742Z","dependency_job_id":null,"html_url":"https://github.com/thanksduck/mail","commit_stats":null,"previous_names":["thanksduck/mail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanksduck%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanksduck%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanksduck%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanksduck%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanksduck","download_url":"https://codeload.github.com/thanksduck/mail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154976,"owners_count":21862621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliases","cloudlfare","jwt","mail","nodejs","routing"],"created_at":"2025-05-08T21:58:25.692Z","updated_at":"2026-05-02T02:35:46.856Z","avatar_url":"https://github.com/thanksduck.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# One Alias Service API\n\n`REST API` built for managing email routing rules on Cloudflare with **multi user support**. Each user can have their own `destinations`, `aliases`, and `rules`. Custom domain* setup within user is also possible but hasn't been implemented yet.\n\nFor the API documentation, visit the [OAS official Documentation](https://docs.20032003.xyz/oas/).\n\n## API Endpoints Visualization\n\n| ![Alias Illustration](https://cdn.jsdelivr.net/gh/thanksduck/mr@main/One%20Alias%20Service%20API%2023.svg) | ![API Endpoints Auth](https://cdn.jsdelivr.net/gh/thanksduck/mr@main/oas-api-endpoints-auth.svg) |\n|:-------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|\n| **Alias Illustration**                                                                | **API Endpoints Auth**                                                                           |\n\n| ![API Endpoints User](https://cdn.jsdelivr.net/gh/thanksduck/mr@main/oas-api-endpoints-user.svg) | ![API Endpoints Mail](https://cdn.jsdelivr.net/gh/thanksduck/mr@main/oas-api-endpoints-mail-rule.svg) |\n|:-----------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------:|\n| **API Endpoints User**                                                                           | **API Endpoints Mail**                                                                               |\n\n| ![API Endpoints Destination](https://cdn.jsdelivr.net/gh/thanksduck/mr@main/oas-api-endpoints-destination.svg) |\n|:-------------------------------------------------------------------------------------------------------------:|\n| **API Endpoints Destination**                                                                                  |\n\n## Features\n\n- [x] User authentication with JWT.\n- [x] User registration.\n- [x] User password reset.\n- [x] User email verification with Cloudflare.\n- [x] Alias/Rules CRUD operations.\n- [x] Destination CRUD operations.\n- [x] Rate limiting.\n\n## Installation and Setup\n\nThere are three ways to install and set up this project:\n\n### Using Docker (Recommended for production)\n\nDocker provides a lightweight and portable way to run your application. Follow these steps to set up your project using Docker:\n\n1. Clone the repository and navigate to the project directory.\n\n```bash\ngit clone --depth 1 https://github.com/thanksduck/mail\ncd mail\n```\n\n1. Copy the `config.env.default` file to `config.env` and fill in the required fields.\n\n```bash\ncp config.env.default config.env\n```\n\n1. Build the Docker image.\n\n```bash\nsudo docker build -t mail .\n```\n\n1. Run the Docker container.\n\n```bash\nsudo docker run -d -p 3456:3456 --env-file config.env mail\n```\n\n### Using Node (Recommended for development)\n\nIf you prefer to run your application locally using Node, follow these steps:\n\n1. Clone the repository and navigate to the project directory.\n\n```bash\ngit clone --depth 1 https://github.com/thanksduck/mail\ncd mail\n```\n\n1. Copy the `config.env.default` file to `config.env` and fill in the required fields.\n\n```bash\ncp config.env.default config.env\n```\n\n1. Install the dependencies.\n\n```bash\nnpm install\n```\n\n1. Start the server.\n\n```bash\nnpm start\n```\n\n### Using Docker Compose\n\nIf you want to run your application with a database locally using Docker Compose, follow these steps:\n\n1. Clone the repository and navigate to the project directory.\n\n```bash\ngit clone --depth 1 https://github.com/thanksduck/mail\ncd mail\n```\n\n1. Copy the `config.env.default` file to `config.env` and fill in the required fields.\n\n```bash\ncp config.env.default config.env\n```\n\n1. Run the Docker Compose command.\n\n```bash\nsudo docker-compose up\n```\n\n### config.env Fields\n\nThe `config.env` file contains several fields that are used to configure your application. Here's a breakdown of each field:\n\n### Cloudflare API Key\n\nThe Cloudflare API key can be generated from the Cloudflare dashboard. [Learn how to generate an API key](https://dash.cloudflare.com/profile/api-tokens). And the zone id can be found in the Cloudflare dashboard. Make sure to provide the account and zone permission of email destination and Routing rules, additionally, you can give it DNS Edit support if you want to add custom domains.\n\n- `CF_EMAIL`: Required Cloudflare email.\n- `CF_API_KEY`: Required Cloudflare API key.\n- `CF_ACCOUTN_ID`: Required Cloudflare Account ID\n- `CF_ZONE_ID`: Required Cloudflare zone ID.\n\n### MongoDB Configuration\n\n- `LOCAL_CONNECTION_STRING`: Optional local connection string for MongoDB.\n- `MONGO_URI`: Required MongoDB URI, can also be a local connection string.\n\n### Server Configuration\n\n- `NODE_ENV`: Optional environment variable to set the Node.js environment to production or development.\n- `PORT`: Optional port number to run the server on. Defaults to 3456.\n\n### JWT Configuration\n\n- `JWT_SECRET`: Required JWT secret.\n- `JWT_EXPIRES_IN`: Required JWT expiration time.\n\n### Email Configuration\n\n- `EMAIL_USER`: Required email user registered with the SMTP service.\n- `EMAIL_PASSWORD`: Required email password with the SMTP service.\n- `EMAIL_HOST`: Optional SMTP host.\n- `EMAIL_PORT`: Optional SMTP port.\n- `COMPANY_NAME`: Company Name to be sent in the Email Title\n- `SUPPORT_EMAIL`: Email address of the sender\n\n### Rate Limiting\n\n- `RATE_LIMIT_MAX`: Required rate limit max.\n\n### Cookie Expiration\n\n- `COOKIE_EXPIRES`: Required cookie expiration time.\n\nNote: Make sure to replace the placeholder values with your own values for each field.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanksduck%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanksduck%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanksduck%2Fmail/lists"}