{"id":22061506,"url":"https://github.com/raojinlin/notepad-pwa","last_synced_at":"2025-05-12T22:30:23.114Z","repository":{"id":182320151,"uuid":"615982070","full_name":"raojinlin/notepad-pwa","owner":"raojinlin","description":"📒 一个基于 Web 的轻量级笔记应用，支持本地离线存储、云端同步和自动同步等功能，采用现代化的技术栈。","archived":false,"fork":false,"pushed_at":"2024-05-24T01:28:27.000Z","size":5632,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T04:17:35.020Z","etag":null,"topics":["nextjs","nodejs","pwa-app","react","vercel"],"latest_commit_sha":null,"homepage":"https://notepad.bytemap.cc","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/raojinlin.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":"2023-03-19T09:11:07.000Z","updated_at":"2025-03-25T15:58:36.000Z","dependencies_parsed_at":"2024-05-11T07:29:10.599Z","dependency_job_id":"b9196e7b-7245-404e-82fa-af02437f8fc8","html_url":"https://github.com/raojinlin/notepad-pwa","commit_stats":null,"previous_names":["raojinlin/notepad-pwa"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raojinlin%2Fnotepad-pwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raojinlin%2Fnotepad-pwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raojinlin%2Fnotepad-pwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raojinlin%2Fnotepad-pwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raojinlin","download_url":"https://codeload.github.com/raojinlin/notepad-pwa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253833034,"owners_count":21971351,"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":["nextjs","nodejs","pwa-app","react","vercel"],"created_at":"2024-11-30T18:12:43.293Z","updated_at":"2025-05-12T22:30:23.069Z","avatar_url":"https://github.com/raojinlin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Notepad 是一个基于 Web 的轻量级笔记应用程序，支持本地离线存储、云端同步以及自动同步等功能。它采用现代化的技术栈：Next.js、React、Material-UI、Vercel Serverless Functions 和 PostgreSQL。\n\n\n## 特性\n* 轻量便捷: Notepad 是一个轻量级 Web 应用程序，无需安装即可在线使用。\n* 离线可用: 用户可以在无网络的情况下访问 Notepad，并创建、编辑和查看笔记。\n* 云端同步：用户可以将笔记保存在云端，并在多个设备之间同步。\n* 笔记下载：用户可以下载已保存的笔记到本地，以便在没有网络连接时使用。\n* 可配置自动同步: 用户可以选择是否开启笔记的自动同步功能。\n\n\n## 技术栈\n采用了现代化的技术栈，具体包括：\n\n* 前端: Next.js、React、Material-UI。\n* 后端: Vercel Serverless Functions、PostgreSQL。\n\n\n## 开发\n1. 在本地环境中运行后端应用程序所需的 MongoDB 数据库实例。\n2. 在本地克隆应用程序的代码仓库。\n3. 在代码仓库的根目录下运行 npm install 命令安装所有依赖。\n4. 创建一个 .env 文件，并设置以下环境变量：\n```.dotenv\nALLOW_USER_REGISTER=true # 是否允许用户注册\nSESSION_SECRET=xxxxxxxxxxxxxxxx # session secret\nPOSTGRES_URL=\"postgres://\u003cusername\u003e:\u003cpassword\u003e@\u003cPOSTGRES_URL\u003e/\u003cdatabase\u003e\"\n\n```\n请确保将 POSTGRES_URL 替换为你的 PostgreSQL 数据库的实际 URL。\n5. 迁移数据表\n```bash\nnpm run migrations:migrate\n```\n6. 运行 npm run dev 命令启动开发服务器。\n7. 访问 [http://localhost:3000](http://localhost:3000) 查看应用程序。\n\n\n## 部署\n\n### 在Vercel部署\n1. 在 Vercel 中创建一个新的应用程序。\n2. 将应用程序的代码仓库链接到 Vercel 应用程序。\n3. 设置以下环境变量：\n```\nNODE_ENV=production\nPOSTGRES_URL=\u003c你的 PostgreSQL 数据库 URI\u003e\n```\n请将 POSTGRES_URL 替换为你的 PostgreSQL 数据库的实际 URI。\n4. 迁移数据表\n```bash\nnpm run migrations:migrate\n```\n5. 部署应用程序。\n\n\n### 使用Docker部署\n1. 创建volume\n```bash\ndocker volume create postgres-db\n```\n2. 启动容器\n```bash\ndocker compose up -d\n```\n\n3. 迁移数据表\n```bash\ndocker exec notepad-pwa-notepad-1 npm run migrations:migrate\n```\n\n\n## 安装\n\n1. 访问网址 [https://notepad-nine.vercel.app/](https://notepad-nine.vercel.app/)\n![](./screenshots/notepad-install-setp1.png)\n2. 在右上角会出现一个安装提示，点击它安装应用。\n![](./screenshots/notepad-install-setp2.png)\n3. 安装完成后，应用会自动打开。你可以在 Chrome 浏览器的“应用”页面中查看已安装的应用。\n![](./screenshots/notepad-pwa.png)\n\n\n## 截图\nWeb\n![](./screenshots/web-note.png)\n\n移动端\n![](./screenshots/mobile-note.png)\n\n\n暗色\n![](./screenshots/dark-mode.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraojinlin%2Fnotepad-pwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraojinlin%2Fnotepad-pwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraojinlin%2Fnotepad-pwa/lists"}