登录 注册
开发者工具AI 模型与开发框架自动化与工作流
311
Stars
10
Forks
2
Watchers
0
Open Issues
MIT
许可证
Elixir
语言
2022-07-07
创建时间
2026-11-02
最近更新

项目能做什么

适用于 Elixir 的权限授权库。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# LetMe

[![CI](https://github.com/woylie/let_me/workflows/CI/badge.svg)](https://github.com/woylie/let_me/actions) [![Hex](https://img.shields.io/hexpm/v/let_me)](https://hex.pm/packages/let_me) [![Hex Docs](https://img.shields.io/badge/hex-docs-green)](https://hexdocs.pm/let_me/readme.html) [![Coverage Status](https://coveralls.io/repos/github/woylie/let_me/badge.svg)](https://coveralls.io/github/woylie/let_me)

LetMe is an authorization library for Elixir that defines a Domain Specific
Language (DSL) for authorization rules.

Policy expressions are optimized at compile time and evaluated lazily using
[Spek](https://github.com/woylie/spek). It is possible to get the evaluated
part of the policy expression in the error case, which can be useful for
debugging, detailed error messages, or authorization decision logs.

The library also provides introspection functions that allow you to:

- List all authorization rules including their boolean expression tree for a
  documentation page.
- Fetch an authorization rule by name.
- Filter authorization rules by subject, object, or checks that are applied.

## Installation

Add LetMe to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:let_me, "~> 3.0.4"}
  ]
end
```

This package is tested against the Elixir and OTP versions that are still
supported upstream. Older versions down to the requirement in `mix.exs` may
still work, but they are not covered by CI and not officially supported.

Include LetMe in your `.formatter.exs` file:

```elixir
[
  import_deps: [:let_me]
]
```

This ensures that `mix format` does not add unnecessary parentheses to the
LetMe macro calls for policy definitions.

## Policy module

You define your authorization rules in a policy module using the LetMe macros.
These rules are compiled into [Spek](https://github.com/woylie/spek)
expressions, and functions for both authorization checks and introspection are
defined.

For instance, this is how you could define a policy for a simple article CRUD
interface:

```elixir
defmodule MyApp.Policy do
  use LetMe.Policy

  object :article do
    # Creating articles is allowed if the user role is `editor` or `writer`.
    action :create do
      allow role: :editor
      allow role: :writer
      desc "Create a new article"
    end

    # Viewing articles is always allowed, unless the user is banned.
    action :read do
      allow true
      deny :banned
      desc "Read an article"
    end

    # Updating an article is allowed if (the user role is `editor`) OR
    # (the user role is `writer` AND the article belongs to the user).
    action :update do
      allow role: :editor
      allow [:own_resource, role: :writer]
      desc "Update an article"
    end

    # Deleting an article is allowed if the user is an editor.
    action :delete do
      allow role: :editor
      desc "Delete an article"
    end
  end
end
```

You can work with a single policy module, or you can define one policy module
for each of your conte
阅读完整原文

商业机会分析 规则生成(AI 未配置)

综合评分 35.7 分。该项目在“个人可实施性”维度得 35 分,“付费可能性”维度得 20.0 分,差异化空间 45.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 let_me 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
zhaoolee/StarsAndClown 中文介绍暂未生成
☀️Github星聚弃疗榜, 让吃瓜群众也能享受Github带来的乐趣~Github StarsAndClown, Le
2,316 Python
mGalarnyk/datasciencecoursera 中文介绍暂未生成
Data Science Repo and blog for John Hopkins Coursera Courses
2,255 HTML
SerialLain3170/AwesomeAnimeResearch 中文介绍暂未生成
Papers, repository and other data about anime or manga resea
1,260 -
mengkunsoft/lmbtfy 中文介绍暂未生成
🔍 让我帮你百度一下?Let Me Baidu That For You
862 CSS
miroslavpejic85/call-me 中文介绍暂未生成
📞 Open-source, self-hosted WebRTC click-to-call solution for
767 JavaScript
noncent/instagram-data-scraper 中文介绍暂未生成
Instagram Data Scraper, Instagram Web Scraper, Instagram Sup
627 PHP
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2022-07-07,近 30 天仍在推送,发布过 19 个 Release
社区活跃Star 311 / Fork 10 / Issue 0(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/woylie/let_me.git
cd let_me
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。