{"id":20017766,"url":"https://github.com/kokizzu/fiber1","last_synced_at":"2026-04-10T21:46:32.742Z","repository":{"id":41273153,"uuid":"497538510","full_name":"kokizzu/fiber1","owner":"kokizzu","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-25T05:11:32.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T15:46:09.559Z","etag":null,"topics":["example","fiber","go","golang","mysql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kokizzu.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}},"created_at":"2022-05-29T09:00:41.000Z","updated_at":"2022-10-24T09:31:56.000Z","dependencies_parsed_at":"2022-09-20T23:50:33.936Z","dependency_job_id":null,"html_url":"https://github.com/kokizzu/fiber1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokizzu%2Ffiber1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokizzu%2Ffiber1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokizzu%2Ffiber1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokizzu%2Ffiber1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kokizzu","download_url":"https://codeload.github.com/kokizzu/fiber1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241451677,"owners_count":19964901,"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":["example","fiber","go","golang","mysql"],"created_at":"2024-11-13T08:18:23.794Z","updated_at":"2026-04-10T21:46:27.707Z","avatar_url":"https://github.com/kokizzu.png","language":"Go","readme":"# Fiber1 Demo\n\nThis is example of [how to structure your golang project](https://kokizzu.blogspot.com/2022/05/how-to-structure-layer-your-golang-project.html) article with fiber and standard mysql (you can change it to whatever framework and persistence libraries you like, the structure should still be similar).\n\nThis is example how to do these things:\n\n1. Web page\n2. Form\n3. API / CRUD \n4. MySQL\n5. Fiber without ORM\n6. DockerTest\n7. AutoGold\n\nThis aproach doesn't do clean architecture (since the persistence layer is not injected), but the business logic is pure/should not contain transport/serialization.\nthe model itself depends on real persistence and tested using dockertest, so it should always works and testable even without function injection or dependency injection. The cons of this aproach is the test is slower because it have to spawn a docker fist.\n\n# Dependencies\n\n```shell\ndocker-compose up\n\nair\n```\n\n# Setup Database\n\n```shell\nmysql -u root -h 127.0.0.1 -p\n\nCREATE DATABASE test1;\n```\n\n# Run tests\n\n```\nmake test\n```\n\n# Updating test gold\n\n```shell\ncd business\n\ngo test -update .\n```\n\n# How to test manually\n\n```shell\ncurl -X POST -d 'email=b@gmail.com\u0026password=test\u0026name=Kis' http://127.0.0.1:3000/guest/register\ncurl -X POST -H 'content-type: application/json' -d '{\"email\":\"c@gmail.com\",\"password\":\"test\",\"name\":\"Kis\"}' http://127.0.0.1:3000/guest/register\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokizzu%2Ffiber1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkokizzu%2Ffiber1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokizzu%2Ffiber1/lists"}