{"id":47998804,"url":"https://github.com/stickerdaniel/fairplay","last_synced_at":"2026-04-04T12:10:22.675Z","repository":{"id":332335175,"uuid":"1133462864","full_name":"stickerdaniel/fairplay","owner":"stickerdaniel","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-08T16:59:07.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T22:37:03.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/stickerdaniel.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-13T11:33:53.000Z","updated_at":"2026-02-08T16:59:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stickerdaniel/fairplay","commit_stats":null,"previous_names":["stickerdaniel/fairplay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stickerdaniel/fairplay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stickerdaniel%2Ffairplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stickerdaniel%2Ffairplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stickerdaniel%2Ffairplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stickerdaniel%2Ffairplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stickerdaniel","download_url":"https://codeload.github.com/stickerdaniel/fairplay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stickerdaniel%2Ffairplay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31398877,"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":[],"created_at":"2026-04-04T12:10:21.999Z","updated_at":"2026-04-04T12:10:22.659Z","avatar_url":"https://github.com/stickerdaniel.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FairPlay\n\nAn iOS app experiment that uses on-device LLMs to detect and neutralize dark patterns in websites. Browse the web with hidden \"decline\" buttons revealed, manipulative UI exposed, and deceptive design patterns removed.\n\n## Goals\n\n- **Dark Pattern Detection** - Identify manipulative UI patterns like hidden decline buttons, fake urgency timers, and confusing opt-out flows\n- **On-Device Processing** - All analysis runs locally using Apple Foundation Models or MLX - no data leaves your device\n- **Sanitization** - Extract page HTML, analyze with LLM, let user select what to fix and generate js that removes the dark patterns\n\n## Limitations\n\n- **Context Window** - this is the biggest limitation. Processing real websites could be possible with optimizations that strip away html bloat and irrelevant markup.\n- **Server side blindness** - is the \"only 3 left\" a dark pattern or are actually only 3 items left?\n- **Processing speed\" - first step would be to implement a caching system that auto applys fixes on subsequent website visits\n\n## Requirements\n\n- iOS 26.2+\n- Xcode 16.0+\n- Device with Apple Intelligence or sufficient RAM for local models\n\n## Development Setup\n\n1. Clone the repository\n2. Open `fairplay.xcodeproj` in Xcode\n3. Add Swift packages via File → Add Package Dependencies:\n   - [LocalLLMClient](https://github.com/tattn/LocalLLMClient)\n   - [Inject](https://github.com/krzysztofzablocki/Inject.git)\n4. Build and run on simulator or device\n\n### Hot Reloading with Inject\n\nThis project supports hot reloading via [Inject](https://github.com/krzysztofzablocki/Inject). To enable it:\n\n1. Download [InjectionIII](https://github.com/johnno1962/InjectionIII/releases) and place it in `/Applications`. Use the GitHub release instead of the App Store version.\n2. Build and run your app in the simulator\n\nThe injection bundle loads automatically. Save any Swift file and changes appear instantly without rebuilding!\n\n## Architecture\n\n```\nWebView loads page\n       ↓\nExtract HTML via JavaScript\n       ↓\nSend to on-device LLM for classification\n       ↓\nUser selects what to fix\n       ↓\nSend to on-device LLM to generate fix for specific pattern\n       ↓\nRun js that applies the changes\n```\n\n**LLM Backend:** [LocalLLMClient](https://github.com/tattn/LocalLLMClient) provides a unified interface for:\n- Apple Foundation Models (on-device)\n- llama.cpp with GGUF models (tried but not compatible with MLX + worse performance)\n- MLX models\n\nFor larger models, add `com.apple.developer.kernel.increased-memory-limit` to your entitlements.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstickerdaniel%2Ffairplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstickerdaniel%2Ffairplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstickerdaniel%2Ffairplay/lists"}