{"id":21189691,"url":"https://github.com/sky0621/cv-admin","last_synced_at":"2025-08-12T00:11:41.376Z","repository":{"id":63954566,"uuid":"533311575","full_name":"sky0621/cv-admin","owner":"sky0621","description":"CVのデータソース管理、Web API提供、Excel出力","archived":false,"fork":false,"pushed_at":"2025-07-24T19:38:05.000Z","size":2792,"stargazers_count":2,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-25T00:52:49.436Z","etag":null,"topics":["cobra","echo","ent","excelize","golang","kin-openapi","openapi3","ozzo-validation","sqlite","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sky0621.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}},"created_at":"2022-09-06T12:24:32.000Z","updated_at":"2025-04-05T13:40:18.000Z","dependencies_parsed_at":"2023-02-19T08:35:22.935Z","dependency_job_id":"ccd19a78-d86b-462c-b762-9f28b66b4207","html_url":"https://github.com/sky0621/cv-admin","commit_stats":{"total_commits":186,"total_committers":3,"mean_commits":62.0,"dds":"0.12903225806451613","last_synced_commit":"270e0f05f4427da154c9c58e2f85021658e445ec"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sky0621/cv-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Fcv-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Fcv-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Fcv-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Fcv-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sky0621","download_url":"https://codeload.github.com/sky0621/cv-admin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Fcv-admin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269976950,"owners_count":24506492,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":["cobra","echo","ent","excelize","golang","kin-openapi","openapi3","ozzo-validation","sqlite","swagger"],"created_at":"2024-11-20T18:53:31.915Z","updated_at":"2025-08-12T00:11:41.365Z","avatar_url":"https://github.com/sky0621.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cv-admin\n\nGitHub Pages にて公開している [Curriculum-Vitae](https://sky0621.github.io/cv/) のデータソースを管理する。\n\nデータソース管理には [SQLite](https://www.sqlite.org/index.html) を使う。\n\nデータソースへのアクセス用に Web API エンドポイントを用意。\n\nAPI定義は [OpenAPI v3](https://swagger.io/specification/) に準拠。\n\nYamlは、[これ](./schema/openapi.yml) （プレビュー用にdockerfile書こうと思ったけどIDEのプレビュー機能で十分だったので省略）。\n\n[swagger.ioのエディタ](https://editor-next.swagger.io/) に貼ってもいい。\n\n![こんな感じ](pics/cvapi.png)\n\nOops. 未実装が目立つ・・・。\n\n## function\n\n※ローカル実行は [go (v1.24)](https://go.dev/) インストール済みが前提。\n\ncv-admin ディレクトリ直下で以下を叩く。\n\n### server\n\nローカルでAPIサーバー起動。\n\n```\ngo run src/main.go server\n```\n\n### migrate\n\n[ent.(ORM)](https://entgo.io/ja/) で定義したテーブル定義を [SQLite](https://www.sqlite.org/index.html) ファイルに反映する。\n\n```\ngo run src/main.go migrate\n```\n\n### export\n\nAPIサーバーにアクセスして取得したデータソースをJSON形式で指定先にエクスポートする。\n\nこれを使って [cv](https://github.com/sky0621/cv) リポジトリのフロントエンド機能がキャリアシートのWebページを表示する。\n\n※APIサーバーが起動していることが前提。\n\n```\ngo run src/main.go export --userid 【ユーザーIDを指定】 --dir 【出力先パスを指定】\n```\n\n### submission\n\nAPIサーバーにアクセスして取得したデータソースをExcel形式でエクスポートする。\n\n※紙媒体ないしExcelファイルでの提出を求められた時用。\n\n※APIサーバーが起動していることが前提。\n\n```\ngo run src/main.go submission --userid 【ユーザーIDを指定】\n```\n\n※未コミットの「`.private.ini`」ファイル（以下のような内容）をプロジェクトルート直下に置く。\n\n```\npassword = xxxxxxxxxx\nkana = ヤマダ　タロウ\nname = 山田　太郎\nmail = hogehoge@example.com\neducationalBackground = 20XX年3月　○○大学□□学部　卒業\ncityOfResidence = ○○県□□市\nnearestStation = JR東日本　○○駅\ncvWeb = https://sky0621.github.io/cv/\ncvAdmin = https://github.com/sky0621/cv-admin#submission\n```\n\n#### Excelサンプル\n\nsample/skill_sheet.xlsx\n\n![s1](pics/skillsheet01.png)\n![s1](pics/skillsheet02.png)\n![s1](pics/skillsheet03.png)\n![s1](pics/skillsheet04.png)\n![s1](pics/skillsheet05.png)\n\n　　　　　　　　　　　　　　・\n\n　　　　　　　　　　　　　　・\n\n　　　　　　　　　　　　　　・\n\n## env\n\n### OS\n\n```\nMac Book Air M2 2022\nSonoma 14.4.1\n```\n\n### go\n\n```\n❯ go version\ngo version go1.22.0 darwin/arm64\n```\n\n## setup\n\n### project\n\n```\n$ go mod init github.com/sky0621/cv-admin\ngo: creating new go.mod: module github.com/sky0621/cv-admin\n```\n\n### open-api-codegen\n\nhttps://github.com/getkin/kin-openapi\n\nhttps://github.com/deepmap/oapi-codegen\n\n```\ngo install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest\n```\n\n### ent\n\nfrom entity model to db table\n\n```\ncd src/ent\n```\n\n```\ngo run -mod=mod entgo.io/ent/cmd/ent new User UserActivity UserQualification UserCareerGroup UserCareer UserCareerDescription UserCareerPeriod CareerTask CareerSkillGroup CareerSkill UserNote UserNoteItem SkillTag Skill\n```\n\n### cobra\n\nhttps://github.com/spf13/cobra\n\nhttps://github.com/spf13/cobra-cli/blob/main/README.md\n\n```\ngo install github.com/spf13/cobra-cli@latest\n```\n\n```\ncobra-cli init\n```\n\n#### add command\n\n```\ncd src\n```\n\n```\ncobra-cli add server\n```\n\n### ozzo-validation\n\nhttps://github.com/go-ozzo/ozzo-validation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky0621%2Fcv-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsky0621%2Fcv-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky0621%2Fcv-admin/lists"}