{"id":26277245,"url":"https://github.com/huhubun/bammemo","last_synced_at":"2026-04-27T17:05:36.429Z","repository":{"id":273864617,"uuid":"920717231","full_name":"huhubun/bammemo","owner":"huhubun","description":"一个融合博客、微博与便笺理念的个人内容发布和管理平台，鼓励持续创作。","archived":false,"fork":false,"pushed_at":"2025-04-12T17:57:48.000Z","size":691,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T20:19:00.862Z","etag":null,"topics":["aspnetcore","blazor"],"latest_commit_sha":null,"homepage":"https://bammemo.huhubun.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huhubun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-22T16:48:02.000Z","updated_at":"2025-08-31T11:13:59.000Z","dependencies_parsed_at":"2025-02-24T09:25:00.635Z","dependency_job_id":"40d13d63-4871-4c82-8a3c-e39baba25825","html_url":"https://github.com/huhubun/bammemo","commit_stats":null,"previous_names":["huhubun/bammemo"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/huhubun/bammemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhubun%2Fbammemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhubun%2Fbammemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhubun%2Fbammemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhubun%2Fbammemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huhubun","download_url":"https://codeload.github.com/huhubun/bammemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhubun%2Fbammemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32345900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aspnetcore","blazor"],"created_at":"2025-03-14T12:16:15.674Z","updated_at":"2026-04-27T17:05:36.414Z","avatar_url":"https://github.com/huhubun.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![bammemo Logo](./assets/logo.png)\n\nbammemo（/ˌbæmˈmɛmoʊ/，竹笺）是一个融合博客、微博与便笺理念的个人内容发布和管理平台，受到 [memos](https://github.com/usememos/memos) 的启发。  \n名字取自“竹子”（Bambu）和“memo”（便签），灵感源自中国古代的竹简：单片少字，合集成篇，鼓励持续创作。\n\n## 部署\n\n通过镜像部署：\n\n```bash\ndocker pull ghcr.io/huhubun/bammemo:0.1.1-alpha.2\n```\n\n### 配置项\n\n#### 服务器端\n\n`appsettings.Production.json`\n\n```json\n{\n  \"Bammemo\": {\n    \"ConnectionString\": \"Data Source=/bammemo/bammemo.db\",\n    \"ApiUrl\": \"https://example.com/api/\",\n    \"Username\": \"YOUR_USERNAME\",\n    \"Password\": \"BASE64_ENCODE_PASSWORD\",\n    \"StoragePath\": \"/bammemo\"\n  }\n}\n```\n\n使用时建议通过环境变量 `Bammemo__{配置项名称}`（注意是**两个下划线**）进行设置 ，环境变量会覆盖配置文件：\n\n```bash\nexport Bammemo__ApiUrl=\"https://example.com/api/\"\n```\n\n# 前端\n\n通过 HTTP 请求从服务器端获取 `GET /bammemo.json`\n\n```json\n{\n  \"Bammemo\": {\n    \"ApiUrl\": \"https://example.com/api/\"\n  }\n}\n```\n\n前端配置中的值由服务器端自动生成，无需进行干预。\n\n#### 释义\n\n| Name                  | Required | Scope                 |  Description                                             |\n| --------------------- | -------- | --------------------- | -------------------------------------------------------- |\n| ConnectionString      | ☑️      | 服务器                 | sqlite 数据库的路径，db 文件可以不提前创建，首次运行时会自动创建 |\n| ApiUrl                | ☑️      | 服务器、前端            | API 的地址，域名 + `/api/`                                 |\n| Username              | ☑️      | 服务器                 | 管理员登录使用的用户名                                      |\n| Password              | ☑️      | 服务器                 | 管理员登录使用的密码，需要设置为 base64 编码后的值             |\n| StoragePath           | ☑️      | 服务器                 | 分配给 bammemo 使用的本地存储空间                             |\n| Key                   |          | 服务器                 | bammemo 使用 AES256 保护数据，通过该参数可以手动指定密钥（未测试），如果不指定则在程序首次运行时自动生成并保存在 `StoragePath` 下的 `bammemo_key` 文件中             |\n\n## 开发\n\n基于 ASP.NET Core 的 [Blazor Web App](https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-9.0) 进行开发，需要 [.NET 9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)。\n\n```bash\ndotnet run --project ./src/Bammemo.Web/Bammemo.Web/Bammemo.Web.csproj\n```\n\n由于对前端（WebAssembly）启用了 [AOT](https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-build-tools-and-aot?view=aspnetcore-9.0) 和[剪裁](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/configure-trimmer?view=aspnetcore-9.0)，请**务必**在本地进行测试，以确保功能能够正常使用（在 PowerShell 中，需将 `\\` 替换为 `\\``）：\n\n```bash\ndocker build -t bammemo:local-dev -f src/Bammemo.Web/Bammemo.Web/Dockerfile .\ndocker run -v C:\\bammemo:/data/bammemo \\\n          -e Bammemo__ConnectionString=\"Data Source=/data/bammemo/bammemo.db\" \\\n          -e Bammemo__ApiUrl=http://localhost:8080/api/ \\\n          -e Bammemo__Username=admin \\\n          -e Bammemo__Password=\"BASE64_ENCODE_PASSWORD\" \\\n          -e Bammemo__StoragePath=\"/data/bammemo\" \\\n          -p 8080:8080 \\\n          bammemo:local-dev\n```\n\n请注意，如果在执行 `docker build` 前，曾经对代码进行过编译、运行或发布操作，请移除所有项目的 `obj` 和 `bin` 文件夹，否则会导致容器中打包失败。可以运行 `scripts` 目录下的 `clean.bat` 或在 Visual Studio 中安装 [Command Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CommandTaskRunner64) 扩展，并通过“视图”—“其他窗口”—“任务运行程序资源管理器”执行 `clean` 任务。\n\n### Db Migration \n\n```bash\ndotnet ef migrations add Init -o ./Migrations --startup-project \"../Bammemo.Web/Bammemo.Web/Bammemo.Web.csproj\" -c BammemoDbContext\ndotnet ef database update --startup-project \"../Bammemo.Web/Bammemo.Web/Bammemo.Web.csproj\" -c BammemoDbContext\n```\n\n\u003e [!WARNING]\n\u003e 目前 bammemo 尚未正式发布，数据库结构可能随时更改，并且不会预先通知。\n\n### OpenApi Client\n\n我们使用 [Kiota](https://learn.microsoft.com/zh-cn/openapi/kiota/) 来生成访问 Web Api 的客户端，您需要[安装 Kiota 工具](https://learn.microsoft.com/zh-cn/openapi/kiota/install?tabs=bash)：\n\n```bash\ndotnet tool install --global Microsoft.OpenApi.Kiota\n```\n\n要更新 Web Api 客户端时，请执行（在 PowerShell 中，需将 `\\` 替换为 `\\``）：\n\n```bash\nkiota generate -l CSharp \\\n    -c WebApiClient \\\n    -n Bammemo.Web.Client.WebApis.Client \\\n    -d http://localhost:5146/openapi/v1.json \\\n    -s Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory \\\n    -s Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory \\\n    -s Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory \\\n    --ds Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory \\\n    --exclude-backward-compatible \\\n    -o ./src/Bammemo.Web/Bammemo.Web.Client/WebApis/Client\n```\n\n## 第三方资源\n\n在开发 Bammemo 的过程中，我们使用了大量开源类库、字体、工具等，在此由衷感谢所有开源项目的开发者及维护者，你们的奉献、热爱与智慧是人类进步的基石。\n\n完整依赖列表及许可证，请移步 [third-party](./third-party) 查看。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhubun%2Fbammemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuhubun%2Fbammemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhubun%2Fbammemo/lists"}