{"id":19590038,"url":"https://github.com/truggeri/meal-planner-api","last_synced_at":"2026-06-10T18:31:53.020Z","repository":{"id":43892157,"uuid":"216427986","full_name":"truggeri/meal-planner-api","owner":"truggeri","description":"Ruby based api for meal planner application","archived":false,"fork":false,"pushed_at":"2022-02-14T06:30:10.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T13:46:19.404Z","etag":null,"topics":["api","microservice","minitest","ruby","sinatra","wip"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/truggeri.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":"2019-10-20T21:11:07.000Z","updated_at":"2022-02-14T06:30:06.000Z","dependencies_parsed_at":"2022-08-25T10:31:30.666Z","dependency_job_id":null,"html_url":"https://github.com/truggeri/meal-planner-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/truggeri/meal-planner-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truggeri%2Fmeal-planner-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truggeri%2Fmeal-planner-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truggeri%2Fmeal-planner-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truggeri%2Fmeal-planner-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truggeri","download_url":"https://codeload.github.com/truggeri/meal-planner-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truggeri%2Fmeal-planner-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34165482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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","microservice","minitest","ruby","sinatra","wip"],"created_at":"2024-11-11T08:23:04.876Z","updated_at":"2026-06-10T18:31:52.995Z","avatar_url":"https://github.com/truggeri.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meal-planner-api\n[Ruby](https://www.ruby-lang.org/en/) and [Rack](https://rack.github.io/) based api for meal planner application.\n\n![](https://github.com/truggeri/meal-planner-api/workflows/Build/badge.svg)\n\n## Description\n\nThis is a pet project that will serve as a smaller piece to a larger meal planning application \nwhich demonstrates the use of [Sinatra](http://sinatrarb.com) as a [Rack](https://rack.github.io/) based micro service.\nThe service uses Active Record and [Postgres](https://www.postgresql.org/) for data persistence, \nbut does not have much of the \"Rails magic,\" at least not setup by default.\nSee below for the [api documentation](#api-documentation). \n\n## Getting started\n\nTo run locally,\n```bash\nbundle install\nbundle exec puma --config config/puma.rb\n```\n\nYou can test that the server is working by hitting the health endpoint,\n\n```bash\ncurl -D - -X GET --url http://localhost:4000/healthz\n```\n\n### Docker for local dependencies\nIf you want to use Docker to setup a Postgres database locally, you can do so via Rake task,\n\n```bash\nbundle exec rake docker:db:start\n```\n\nThis will start a Postgres database using [env variables](#configuration) for the hosted port, \ndatabase name, username and password. To tear this db down, run\n\n```bash\nbundle exec rake docker:db:stop\n```\n\n## Configuration\n\nEnvironment variables used for configuration,\n\n| Var | Default | Setting |\n|---|---|---|\n| MEAL_PLANNER_API_DB_HOST | localhost | Tcp address of the database |\n| MEAL_PLANNER_API_DB_PORT | 15400 | Tcp port of the database |\n| MEAL_PLANNER_API_DB_USERNAME | - | Postgres username |\n| MEAL_PLANNER_API_DB_PASSWORD | - | Postgres password |\n| DATABASE_URL | - | Postgres url (with username, password, host and port) - overwrites all above |\n| SINATRA_ENV | development | Environment to run in |\n| RACK_ENV | - | Environment to run Rack server in |\n| PORT | 4000 | Port to host Rack server on |\n| RUN_COVERAGE |  | Set to \"true\" to get SimpleCov coverage report |\n\n## Running with Docker\n\nThere is a [Dockerfile](https://docs.docker.com/get-started/#build-and-test-your-image) for this project. To build it,\n\n```bash\ndocker build --tag meal-planner-api .\n```\n\nThen to run via container,\n\n```bash\ndocker run --rm --detatch --port 4000:4000 --name meal-planner-api meal-planner-api:latest\n```\n\nTo set configuration options, use the `docker run` `--env` option to pass in environment variables \nas in the above [configuration section](#configuration).\n\n## API Documentation\n\nWIP - to come. This section will contain api docs for available HTTP routes.\n\n## Testing\n\nTests are written using the [MiniTest framework](https://github.com/seattlerb/minitest). To run tests, \n\n```bash\nbundle exec rake test\n```\n\nLinting is done by [Rubocop](https://github.com/rubocop-hq/rubocop) and can be run with,\n\n```bash\nbundle exec rubocop -D\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruggeri%2Fmeal-planner-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruggeri%2Fmeal-planner-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruggeri%2Fmeal-planner-api/lists"}