{"id":19845090,"url":"https://github.com/mattiadevivo/crm","last_synced_at":"2025-07-09T01:43:03.066Z","repository":{"id":175521926,"uuid":"566439555","full_name":"mattiadevivo/crm","owner":"mattiadevivo","description":"Crm service written in Golang ","archived":false,"fork":false,"pushed_at":"2022-11-30T16:09:22.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T12:24:20.546Z","etag":null,"topics":["crm","gofiber","golang"],"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/mattiadevivo.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":"2022-11-15T17:17:09.000Z","updated_at":"2024-12-25T10:48:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5ce900a-d433-4994-aa3f-1537ac40ce1c","html_url":"https://github.com/mattiadevivo/crm","commit_stats":null,"previous_names":["mattiadevivo/crm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fcrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fcrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fcrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fcrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattiadevivo","download_url":"https://codeload.github.com/mattiadevivo/crm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241224072,"owners_count":19929845,"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":["crm","gofiber","golang"],"created_at":"2024-11-12T13:06:33.179Z","updated_at":"2025-02-28T20:15:50.852Z","avatar_url":"https://github.com/mattiadevivo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRM\n\nCrm backend service written in Golang (used as Udacity Golang project work) that uses Mysql as database for customers data usage together with **gorm** as ORM.\nThe web framework used in this project is **gofiber**, a really fast and simple one.\nAs logging library `zerlog` has been used.\n\n**Project details**:\nBackend service of a CRM web application. The server will support all of the functionalities:\n- Getting a list of all customers\n- Getting data for a single customer\n- Adding a customer\n- Updating a customer's information\n- Removing a customer\n\nWhen running the project the first time database schema will be automatically created and some dummy data stored.\n\nAt `http://localhost:\u003cport\u003e/` you'll find a static html file describing the project.\nAt `http://localhost:\u003cport\u003e/swagger/index.html` you'll find Swagger documentation.\n\n## Run\n\nBuild Docker image: `docker build -t crm-backend . --build-arg GIT_TOKEN=\u003ctoken\u003e --build-arg GIT_USER=\u003cgit_user\u003e`\n\nRun Docker container: `docker run --network=\"\u003cdocker-compose-mysql-network\u003e\" --env-file \u003ccontainer.env/your-env-file\u003e -p \"127.0.0.1:\u003cport-on-host\u003e:\u003ccontainer-server-port\u003e\" crm-backend`\n\nCreate updated version of Swagger:\n```\ngo install github.com/swaggo/swag/cmd/swag@latest\nswag init -g main.go --output docs/crm\n```\n\nCreate Mysql Docker container:\n```bash\ndocker-compose up -d\n```\n\nRun the server:\n```bash\n# export env vars\nsource test.env \n# download dependencies\ngo mod tidy\n# execute backend server\ngo run main.go\n```\n\nCheck `/postman` folder and load inside Postman the `collection.json` file to have some ready-to-use requests to run against the server.\n\n## Mysql administration\n\nRun the command to login in mysql cli inside Mysql Docker container:\n```bash\ndocker exec -ti mysql mysql -u crm-backend -p\n```\n\n## Environment Variables\n\nAvailable log levels:\n- panic (`zerolog.PanicLevel`, 5)\n- fatal (`zerolog.FatalLevel`, 4)\n- error (`zerolog.ErrorLevel`, 3)\n- warn (`zerolog.WarnLevel`, 2)\n- info (`zerolog.InfoLevel`, 1)\n- debug (`zerolog.DebugLevel`, 0)\n- trace (`zerolog.TraceLevel`, -1)\n\nThe application supports `debug` or `error` values for `LOG_LEVEL` env var, any other values (or no value) will be recognized as `info` level.\n\nList of variables (see them under `/variables/env.go`):\n```bash\nLOG_LEVEL=debug|error\nPORT=3000\nMYSQL_USER=crm-backend\nMYSQL_PASSWORD=crm-backend\nMYSQL_ADDRESS=localhost\nMYSQL_PORT=3306\nMYSQL_DBNAME=crm\n```\n\n## Requirements\n\n[Application Requirements](https://review.udacity.com/#!/rubrics/4856/view)\n\n## References\n\n[gofiber](https://gofiber.io/)\n[gorm](https://gorm.io/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiadevivo%2Fcrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattiadevivo%2Fcrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiadevivo%2Fcrm/lists"}