{"id":19892594,"url":"https://github.com/compscidr/goblog","last_synced_at":"2025-08-30T14:07:02.861Z","repository":{"id":37985999,"uuid":"250880681","full_name":"compscidr/goblog","owner":"compscidr","description":"Simple blogging platform built with golang. Built on top of gin and gorm. Auth with github. REST / CRUD API backend and templated frontend","archived":false,"fork":false,"pushed_at":"2025-08-24T17:50:47.000Z","size":66448,"stargazers_count":42,"open_issues_count":15,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T22:01:10.032Z","etag":null,"topics":["api","blog","crud","gin","go","goblog","golang","gorm","hacktoberfest","html-api","rest"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compscidr.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":"2020-03-28T19:51:19.000Z","updated_at":"2025-08-24T17:50:50.000Z","dependencies_parsed_at":"2023-10-13T04:49:40.537Z","dependency_job_id":"9f55a493-a1aa-4548-aeb7-cf8540ec49b5","html_url":"https://github.com/compscidr/goblog","commit_stats":{"total_commits":421,"total_committers":6,"mean_commits":70.16666666666667,"dds":0.5938242280285035,"last_synced_commit":"52704664e55c648299aa0a3c57003f0cbb85f27f"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/compscidr/goblog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fgoblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fgoblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fgoblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fgoblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compscidr","download_url":"https://codeload.github.com/compscidr/goblog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fgoblog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272858542,"owners_count":25005092,"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-30T02:00:09.474Z","response_time":77,"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":["api","blog","crud","gin","go","goblog","golang","gorm","hacktoberfest","html-api","rest"],"created_at":"2024-11-12T18:24:21.779Z","updated_at":"2025-08-30T14:07:02.806Z","avatar_url":"https://github.com/compscidr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goblog\n[![Build and Test](https://github.com/compscidr/goblog/actions/workflows/push.yml/badge.svg)](https://github.com/compscidr/goblog/actions/workflows/push.yml)\n[![codecov](https://codecov.io/gh/compscidr/goblog/branch/master/graph/badge.svg)](https://codecov.io/gh/compscidr/goblog)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSimple blogging platform built with golang. Currently running on my website: https://www.jasonernst.com\n\nIt is split into two parts:\n- A JSON REST API located at /api/v1/\n- An HTML API located at /\n\nThe HTML API is optional - any frontend could be used instead. I toyed with a\nsingle page Javascript app for a bit, but I like to have all of the content\ngenerated on the server side so that SEO works better.\n\nUsers can log into the blog using Github authentication code which is then\ntranslated by the blog API into an authorization token, which is then stored\nin a session cookie.\n\nCreating, modifying and deleting posts and administering comments may only be\ndone with the admin user. Presently the user is hardcoded by github email, but\nI'll likely create an initial install onboarding which makes the first logged\nin user the admin.\n\nOther logged in users are able to post, update and delete comments (todo)\n\nEvery function in the API should be covered by units and integration tests.\n\nWhat works:\n- Install Wizard for onboarding\n- List, Create, Update, Delete\n- Local sqlite3 db in a file\n- Markdown rendering, code highlighting for content\n- Posts, Tags, Error Pages, File Uploads (images, pdfs, etc)\n- Github action which builds and deploys a tagged dockerhub release when a versioned release is cut\n- Version string in template header from `git describe`\n- Meta, Title, etc which changes with posts for SEO\n- Post date editing so old posts can be imported\n\nTodo:\n- draft posts\n- default hero images or something so posts don't look so bare\n- cron job to backup posts\n- user comments\n- mysql [WiP], postgres, other dbs\n\n## Other tools used:\n- Gin: https://github.com/gin-gonic/gin. Used for multiplexing / routing the\nhttp requests.\n- Gorm: https://github.com/jinzhu/gorm. Used for object relational mapping.\n\n## Building and running:\n```\ngo build\ngoblog\n```\n\n## Testing\n```\ngo test goblog/...\n```\n\n## Coverage:\nMore details here: https://blog.golang.org/cover\n```\ngo test goblog/... -coverprofile=coverage.out\ngo tool cover -func=coverage.out\ngo tool cover -html=coverage.out\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fgoblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompscidr%2Fgoblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fgoblog/lists"}