{"id":13850315,"url":"https://github.com/mrtkp9993/SimpleCRUDApp","last_synced_at":"2025-07-12T21:33:44.561Z","repository":{"id":107928682,"uuid":"178581498","full_name":"mrtkp9993/SimpleCRUDApp","owner":"mrtkp9993","description":"Simple CRUD Application with Go, Gorilla/mux, MariaDB, Redis.","archived":false,"fork":false,"pushed_at":"2023-02-25T00:13:04.000Z","size":60,"stargazers_count":72,"open_issues_count":1,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-17T22:12:36.360Z","etag":null,"topics":["backend","crud","crud-application","golang","golang-application","gorilla-mux","mariadb","redis","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrtkp9993.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}},"created_at":"2019-03-30T16:11:39.000Z","updated_at":"2024-02-27T12:11:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"007e34f0-f88b-4781-975e-b23512e13723","html_url":"https://github.com/mrtkp9993/SimpleCRUDApp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtkp9993%2FSimpleCRUDApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtkp9993%2FSimpleCRUDApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtkp9993%2FSimpleCRUDApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtkp9993%2FSimpleCRUDApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtkp9993","download_url":"https://codeload.github.com/mrtkp9993/SimpleCRUDApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225839485,"owners_count":17532305,"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":["backend","crud","crud-application","golang","golang-application","gorilla-mux","mariadb","redis","rest-api"],"created_at":"2024-08-04T20:01:05.988Z","updated_at":"2024-11-22T03:31:06.460Z","avatar_url":"https://github.com/mrtkp9993.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Simple CRUD App w/ Gorilla/Mux, MariaDB, Redis\n[![Go Report Card](https://goreportcard.com/badge/github.com/mrtkp9993/SimpleCRUDApp)](https://goreportcard.com/report/github.com/mrtkp9993/SimpleCRUDApp)\n[![CodeFactor](https://www.codefactor.io/repository/github/mrtkp9993/simplecrudapp/badge)](https://www.codefactor.io/repository/github/mrtkp9993/simplecrudapp)\n![](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fastronomer.ullaakut.eu%2Fshields%3Fowner%3Dmrtkp9993%26name%3DSimpleCRUDApp)\n\n## NOTE\n\n\u003e This project is not longer maintained. I'll make a new better project.\n\n## Features \n\nBasic CRUD operations (Create-Read-Update-Delete).\n\n## Database Scheme\n\nData table:\n\n```sql\ncreate table products\n(\n    id           int(11) unsigned auto_increment primary key,\n    name         tinytext null,\n    manufacturer tinytext null\n);\n```\n\nYou can generate data from http://filldb.info/.\n\nUsers table:\n\n```sql\nCREATE TABLE `users` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `username` text NOT NULL,\n  `saltedpassword` text NOT NULL,\n  `salt` text NOT NULL,\n  PRIMARY KEY (`id`)\n);\n```\n\n````Password+Salt```` is encrypted with ``bcrypt``with 10 rounds and stored in ``saltedpassword``column.\n\n## Caching \n\nYou can edit cache time from [this line](https://github.com/mrtkp9993/SimpleCRUDApp/blob/master/app.go#L204):\n\n```\nerr = a.Cache.Set(r.RequestURI, content, 10*time.Minute).Err()\n```\n\n## Example Requests\n\nTo get all entries from table:\n```\ncurl --user user1:pass1 127.0.0.1:8000/api/products/list\n```\n\nTo get an entry with `id` (where id equals 10):\n```\ncurl --user user1:pass1 127.0.0.1:8000/api/products/10\n```\n\nTo create an entry:\n```\ncurl --header \"Content-Type: application/json\" \\\n     --request POST \\\n     --data '{\"name\": \"ABC\", \"manufacturer\": \"ACME\"}' \\\n\t --user user1:pass1 127.0.0.1:8000/api/products/new\n```\n\nTo update an entry:\n```\ncurl --request PUT \\ \n     --data '{\"name\": \"ABC\", \"manufacturer\": \"ACME\"}' \\ \n     --user user1:pass1 127.0.0.1:8000/api/products/11\n```\n\nTo delete an entry:\n```\ncurl --request DELETE --user user1:pass1 127.0.0.1:8000/api/products/10\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtkp9993%2FSimpleCRUDApp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtkp9993%2FSimpleCRUDApp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtkp9993%2FSimpleCRUDApp/lists"}