{"id":48026946,"url":"https://github.com/devinslick/simple-sieve-generator","last_synced_at":"2026-04-04T13:51:40.912Z","repository":{"id":334242818,"uuid":"1140623489","full_name":"devinslick/simple-sieve-generator","owner":"devinslick","description":"A serverless (cloudflare worker) site to quickly generate complex sieve filters; especially useful with Simplelogin and Protonmail!","archived":false,"fork":false,"pushed_at":"2026-02-02T14:55:46.000Z","size":385,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T03:40:54.917Z","etag":null,"topics":["cloudflare-workers","cloudflare-workers-kv","cloudflare-workers-site","email-filtering","protonmail","serverless","sieve","simplelogin"],"latest_commit_sha":null,"homepage":"https://simple-sieve-generator-demo.devinslick.com/","language":"TypeScript","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/devinslick.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T14:38:28.000Z","updated_at":"2026-02-02T15:02:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devinslick/simple-sieve-generator","commit_stats":null,"previous_names":["devinslick/simple-sieve-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devinslick/simple-sieve-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinslick%2Fsimple-sieve-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinslick%2Fsimple-sieve-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinslick%2Fsimple-sieve-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinslick%2Fsimple-sieve-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinslick","download_url":"https://codeload.github.com/devinslick/simple-sieve-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinslick%2Fsimple-sieve-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloudflare-workers","cloudflare-workers-kv","cloudflare-workers-site","email-filtering","protonmail","serverless","sieve","simplelogin"],"created_at":"2026-04-04T13:51:40.123Z","updated_at":"2026-04-04T13:51:40.907Z","avatar_url":"https://github.com/devinslick.png","language":"TypeScript","readme":"# Simple Sieve Generator\n\nA Cloudflare Worker-based web app to manage Sieve email filtering lists and generate rules.\n\n**Live Demo**: [simple-sieve-generator-demo.devinslick.com](https://simple-sieve-generator-demo.devinslick.com/)  \n*(Note: This demo is running in Demo Mode, so saving and deleting lists is disabled.)*\n\n## Features\n- **Cloudflare Workers**: Serverless compute.\n- **Hono**: Fast, lightweight web framework.\n- **Cloudflare KV**: Storage for exclusion lists (Designed to run within the Cloudflare Workers Free Tier).\n- **Auto-Deployment**: GitHub Actions workflow included.\n\n## Security (Important!)\nThis application **does not** include built-in authentication. By default, anyone with the URL can view and edit your Sieve filters.\n\n**Recommendation**: Protect the application using [Cloudflare Zero Trust / Access](https://www.cloudflare.com/products/zero-trust/access/).\n1. Go to Cloudflare Zero Trust Dashboard.\n2. Create an Application for your Worker's route (e.g., `simple-sieve-generator.your-subdomain.workers.dev`).\n3. Set up a policy to allow only your email address.\n\n## Setup\n\n### Prerequisites\n- Cloudflare Account\n- (Optional) Node.js \u0026 npm if you wish to run the project locally\n\n### Local Development\n\n1. Install dependencies:\n   ```bash\n   cd simple-sieve-generator\n   npm install\n   ```\n\n2. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\n3. Open your browser at `http://localhost:8787` (or similar).\n\n### Testing\n\nThe project includes a test framework for the `/generate` endpoint.\n\n**Running tests locally:**\n\n1. Start the development server in one terminal:\n   ```bash\n   npm run dev\n   ```\n\n2. In another terminal, run the tests:\n   ```bash\n   npm run test:generate\n   ```\n\n**Test options:**\n- `--filter=NAME` - Run only tests matching NAME\n- `--update-expected` - Update expected output files with actual results\n\n**Adding new tests (autodiscovered):**\n1. Create an input file in `tests/generate` named `\u003ctest-name\u003e.input` containing your DSL rules. The first non-empty line is used as the test description if it starts with `#`.\n2. If desired, create an accompanying `\u003ctest-name\u003e.expected` file to assert the generated Sieve output; otherwise run with `--update-expected` to generate it.\n3. Run the test runner:\n   ```bash\n   npm run test:generate\n   # or target a single test:\n   npm run test:generate -- --filter=my-test\n   ```\n4. To update expected outputs from the runner use:\n   ```bash\n   npm run test:generate -- --update-expected\n   ```\n\nSee `tests/generate/` for example `.input` and `.expected` files demonstrating supported DSL patterns.\n\n### Configuration \u0026 Deployment\n\nThis project uses GitHub Actions for deployment. All sensitive configuration values (like API tokens and KV IDs) are securely stored in **GitHub Secrets**, not in the source code.\n\n#### 1. Cloudflare API Token\n1. Go to the [Cloudflare Dashboard](https://dash.cloudflare.com/profile/api-tokens).\n2. Create a Token using the **Edit Cloudflare Workers** template.\n3. Copy the token.\n\n#### 2. KV Namespaces\nYou need to create two KV namespaces (Production and Preview):\n1. Go to the **Cloudflare Dashboard** \u003e **Workers \u0026 Pages** \u003e **KV**.\n2. Click **Create a namespace**. call it `SIEVE_DATA`.\n3. Click **Create a namespace** again. Call it `SIEVE_DATA_PREVIEW`.\n4. Copy the **ID** for both namespaces.\n\n#### 3. GitHub Secrets\nGo to your GitHub Repository **Settings \u003e Secrets and variables \u003e Actions** and add the following Repository Secrets:\n\n| Secret Name | Description |\n|-------------|-------------|\n| `CLOUDFLARE_API_TOKEN` | Your API Token from step 1. |\n| `SIEVE_DATA_ID` | The ID of your production KV namespace. |\n| `SIEVE_DATA_PREVIEW_ID` | The ID of your preview KV namespace. |\n\nOnce these are set, pushing to the `main` branch will automatically inject these IDs into the configuration and deploy your worker.\n\n### Demo Mode deployment\n\nYou can optionally deploy a secondary copy of the application in \"Demo Mode\", which disables all KV connections and save/load features. This is useful for public demonstrations.\n\nTo enable this:\n1. Go to your GitHub Repository **Settings \u003e Secrets and variables \u003e Actions**.\n2. Click on the **Variables** tab (next to Secrets).\n3. Create a **New repository variable**.\n   - Name: `ENABLE_DEMO_DEPLOYMENT`\n   - Value: `true`\n4. The next time the Deploy workflow runs (on push to main), it will also deploy the demo site to a worker named `simple-sieve-generator-demo`.\n\n**Configuration:**\nThe `wrangler.toml` includes a `[env.demo]` section which sets the `DEMO_MODE` environment variable to `\"true\"`. The application detects this variable to disable backend features and show a \"DEMO MODE\" badge in the UI.\n\n### Usage\n1. **Access UI**: Visit your deployed URL.\n2. **Manage Lists**: Create, Save, and Load rule lists.\n3. **Write Rules**: Use the shorthand syntax (see `LEGEND.md`).\n4. **Generate**: Click \"Generate Sieve Script\" to produce the standard Sieve code.\n5. **Sync**: Files under `examples/lists` are auto-uploaded on deploy.\n\n### Screenshots\n![Screenshot of UI](screenshots/example.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinslick%2Fsimple-sieve-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinslick%2Fsimple-sieve-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinslick%2Fsimple-sieve-generator/lists"}