{"id":21444283,"url":"https://github.com/dynastymasra/goframe","last_synced_at":"2026-04-15T18:02:06.485Z","repository":{"id":57531195,"uuid":"272367433","full_name":"dynastymasra/goframe","owner":"dynastymasra","description":"Go skeleton (MongoDB, Neo4J, Postgres)","archived":false,"fork":false,"pushed_at":"2021-01-28T04:28:06.000Z","size":460,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T01:16:05.470Z","etag":null,"topics":["frame","go","golang","mongodb","neo4j","postgres","postgresql","skeleton"],"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/dynastymasra.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}},"created_at":"2020-06-15T07:11:32.000Z","updated_at":"2023-12-22T03:24:02.000Z","dependencies_parsed_at":"2022-09-07T04:51:04.149Z","dependency_job_id":null,"html_url":"https://github.com/dynastymasra/goframe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dynastymasra/goframe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynastymasra%2Fgoframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynastymasra%2Fgoframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynastymasra%2Fgoframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynastymasra%2Fgoframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynastymasra","download_url":"https://codeload.github.com/dynastymasra/goframe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynastymasra%2Fgoframe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["frame","go","golang","mongodb","neo4j","postgres","postgresql","skeleton"],"created_at":"2024-11-23T02:17:01.148Z","updated_at":"2026-04-15T18:02:06.466Z","avatar_url":"https://github.com/dynastymasra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goframe\n\n[![Go](https://img.shields.io/badge/go-1.14-00E5E6.svg)](https://golang.org/)\n[![Postgres](https://img.shields.io/badge/postgres-12.3-326590.svg)](https://www.postgresql.org/)\n[![MongoDB](https://img.shields.io/badge/mongodb-4.2.8-139B50.svg)](https://www.mongodb.com/)\n[![Neo4J](https://img.shields.io/badge/neo4j-4.1.3-3A8B9F.svg)](https://neo4j.com/)\n[![Elasticsearch](https://img.shields.io/badge/elasticsearch-7.7.0-F4BE1A.svg)](https://www.elastic.co/elasticsearch/)\n[![Redis](https://img.shields.io/badge/redis-6.0.8-C93D2E.svg)](https://redis.io/)\n[![Seabolt](https://img.shields.io/badge/seabolt-1.7.4-2885E4.svg)](https://github.com/neo4j-drivers/seabolt)\n[![Docker](https://img.shields.io/badge/docker-19.03-2885E4.svg)](https://www.docker.com/)\n\nGo skeleton (MongoDB, Neo4J, Postgres), Remove unused or unnecessary function or code\n\n## Libraries\n\nUse [Go Module](https://blog.golang.org/using-go-modules) for install all dependencies required this application.\n\nIf use private repository dependency please make use GIT Private key created `ssh-keygen -t rsa -P \"\" -C \"email\" -m PEM`\n\n## How To Run and Deploy\n\nBefore run this service. Make sure all requirements dependencies has been installed likes **Golang, Docker, and database**\n\n### Structure\n\nThis service tries to implement the clean architecture.\n\n```\n├── app (Interface Adapters) \n│   ├── controller\n│   └── presenter\n│── config (Application config)\n│── console (Terminal console)\n│── domain (Enterprise Business Rules)\n│   ├── repository (Application Business Rules)\n│   └── service (Application Business Rules)\n│── infrastructure (Frameworks \u0026 Drivers)\n│   ├── provider (Drivers)\n│   └── web (Web Application)\n│── migration (Migration Files)\n│── test (Test Helper \u0026 Mocks)\n└── main.go (Main Application)\n```\n\n### Local\n\nUse command go ```go run main.go``` in root folder for run this application.\n\n### Migration\n\n- ```go run main.go migrate:run``` Command used to run the migration files.\n- ```go run main.go migrate:rollback``` Command used to rollback the migration.\n- ```go run main.go migrate:create``` Command used to create a new migration file.\n\n### Docker\n\n**goframe** uses docker multi stages build, minimal docker version is **17.05**. If docker already installed use command.\n\nInsert arguments `GIT_PRIVATE_KEY` and `GOPRIVATE` for create an image\n\nThis command will build the images.\n```bash\ndocker build -f Dockerfile  --build-arg GIT_PRIVATE_KEY=$GIT_PRIVATE_KEY --build-arg GOPRIVATE=$GOPRIVATE -t goframe:$(VERSION) .\n```\n\nTo run service use this command\n```bash\ndocker run --name goframe -d -e ADDRESS=:8080 -e \u003cenvironment\u003e $(IMAGE):$(VERSION)\n```\n\n## Test\n\n### Local\n\nFor run unit test, from root project you can go to folder or package and execute command\n```bash\ngo test -v -cover -coverprofile=coverage.out -covermode=set\ngo tool cover -html=coverage.out\n```\n`go tool` will generate GUI for test coverage. Available package or folder can be tested.\n\n- `/app/controller`\n- `/app/presenter`\n- `/config`\n- `/domain`\n\n### Docker\n\nRun docker-compose to run test\n```\ndocker-compose -p \"$(PROJECT_NAME)\" -f docker/docker-compose.yaml build app\ndocker-compose -p \"$(PROJECT_NAME)\" -f docker/docker-compose.yaml run --rm app test\ndocker-compose -p \"$(PROJECT_NAME)\" -f docker/docker-compose.yaml down\n```\n\n## Environment Variables\n\nEnvironment variables for Development use **config-example.yaml**, Change the file name to **config.yaml**\n\n+ `SERVER_PORT` - Port address used by service, default is `8080`\n+ `LOGGER_LEVEL` - Log level(debug, info, error, warn, etc)\n+ `LOGGER_CALLER_ENABLED` - Enabled log report caller.\n+ `LOGGER_FORMAT` - Format specific for log.\n  - `text` - Log format will become standard text output, this used for development\n  - `json` - Log format will become *JSON* format, usually used for production\n+ `NEO4J_ADDRESS` - Neo4J database address `bolt+routing://\u003chost\u003e:\u003cport\u003e`\n  - `bolt+routing://` - Used with causal cluster\n  - `bolt://` - Used with single server\n+ `NEO4J_USERNAME` - Neo4J database username\n+ `NEO4J_PASSWORD` - Neo4J database password\n+ `NEO4J_MAX_CONN_POOL` - Neo4j maximum number of connections per URL to allow on this driver\n+ `NEO4J_MAX_CONN_LIFETIME` - Maximum connection life time on pooled connections. Values less than or equal to 0 disables the lifetime check (in Minutes)\n+ `NEO4J_LOG_ENABLED` - Neo4J database log enabled (`true`/`false`)\n+ `NEO4J_LOG_LEVEL` Neo4J type that default logging implementations\n  - `1` - Level error\n  - `2` - Level warning\n  - `3` - Level info\n  - `4` - Level debug\n+ `POSTGRES_ADDRESS` - Database hostname\n+ `POSTGRES_DATABASE` - Database name\n+ `POSTGRES_USERNAME` - Database username\n+ `POSTGRES_PASSWORD` - Database Password\n+ `POSTGRES_PARAMS` - Database params, use space if more than one param (sslmode=disable)\n+ `POSTGRES_MAX_OPEN_CONN` - Database max open connection\n+ `POSTGRES_MAX_IDLE_CONN` - Database max idle connection\n+ `POSTGRES_DEBUG_ENABLED` - Enable debug mode\n+ `POSTGRES_LOG_LEVEL` - Database log level, default is 2\n    - `1` - Silent\n    - `2` - Error\n    - `3` - Warn\n    - `4` - Info\n+ `MONGO_ADDRESS` - MongoDB address with `mongodb://\u003chost\u003e:\u003cport\u003e`, `mongodb+srv://\u003chost\u003e:\u003cport\u003e`, and `\"mongodb://\u003chost\u003e:\u003cport\u003e/?replicaSet=\u003creplica\u003e\u0026connect=direct\"` read the documentation for more information\n+ `MONGO_DATABASE` - MongoDB database name\n+ `MONGO_USERNAME` - MongoDB username\n+ `MONGO_PASSWORD` - MongoDB password\n+ `MONGO_MAX_POOL` - MongoDB max pool connection\n+ `ELASTICSEARCH_ADDRESS` - Elasticsearch urls, use `,` to separate urls `http://localhost:9200,http://localhost:9201`\n+ `ELASTICSEARCH_USERNAME` - Elasticsearch username\n+ `ELASTICSEARCH_PASSWORD` - Elasticsearch password\n+ `ELASTICSEARCH_MAX_CONN_PER_HOST` - Elasticsearch max connection per hosts\n+ `ELASTICSEARCH_MAX_IDLE_PER_HOST` - Elasticsearch max idle connection per hosts\n+ `REDIS_ADDRESS` - Redis address `localhost:6379`\n+ `REDIS_PASSWORD` - Redis password\n+ `REDIS_DATABASE` - Redis database\n+ `REDIS_POOL_SIZE` - Redis pool size\n+ `REDIS_MIN_IDLE_CONN` - Redis min idle connection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynastymasra%2Fgoframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynastymasra%2Fgoframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynastymasra%2Fgoframe/lists"}