{"id":18728926,"url":"https://github.com/elibracha/titanic-api","last_synced_at":"2025-11-12T05:30:22.313Z","repository":{"id":184897297,"uuid":"672628442","full_name":"elibracha/titanic-api","owner":"elibracha","description":"Titanic API exposes several endpoints over titanic dataset, enabling querying passengers and passengers aggregated data.","archived":false,"fork":false,"pushed_at":"2023-10-01T23:33:38.000Z","size":8897,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:28:19.718Z","etag":null,"topics":[],"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/elibracha.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":"2023-07-30T18:12:52.000Z","updated_at":"2023-07-31T10:06:00.000Z","dependencies_parsed_at":"2024-11-07T14:35:16.418Z","dependency_job_id":null,"html_url":"https://github.com/elibracha/titanic-api","commit_stats":null,"previous_names":["elibracha/titanic","elibracha/titanic-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elibracha%2Ftitanic-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elibracha%2Ftitanic-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elibracha%2Ftitanic-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elibracha%2Ftitanic-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elibracha","download_url":"https://codeload.github.com/elibracha/titanic-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599040,"owners_count":19665911,"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":[],"created_at":"2024-11-07T14:24:48.267Z","updated_at":"2025-11-12T05:30:22.277Z","avatar_url":"https://github.com/elibracha.png","language":"Go","readme":"# Titanic\n\n## Introduction\n\n---\nTitanic API exposes several endpoints over titanic dataset, enabling querying passengers and passengers aggregated data.\n\n## Prerequisites\n\n---\nBefore using the Makefile commands, make sure you have the following tools and dependencies installed:\n\n- Go: Make sure you have Go installed to build the API server and run tests.\n- Docker: Install Docker to build and run Docker images.\n- Docker Compose (optional): If you plan to use Docker Compose to deploy the application.\n- Kubernetes Cluster: If you plan to use Kubernetes and helm or kubectl to deploy the application\n\n## Environment Variables\n\n---\nThe application uses environment variables located in `.env`. Make sure to set the environment variables if you are not using the Makefile.\nIf you are using the Makefile environment variables will be loaded from `.env`.\n\n## Folder Structure\n\n---\n\nProject structure follows unofficial standard however simple one for API layout - https://github.com/golang-standards/project-layout\n\n#### project uses vendor folder while building the binary to not download dependencies in runtime\n## OpenAPI Docs / Custom UI\n\n---\nOnce you run the API you can access the OpenAPI UI in `/api/docs/` or `/api/docs/index.html`.\nAlso you can access the custom UI built with HTMX under `/ui`.\n\n#### Notice the default host and ports are http://localhost:8089\n\n## Store\n\n---\n### CSV store\nDataset used in the API is the Titanic CSV data under folder `/data/csv/titanic.csv`\n### SQLite store\nDataset is a copy of `/data/csv/titanic.csv` data located in `/data/sqlite/titanic.db`\ncreated with the following in sqlite terminal:\n\n```\nCREATE TABLE passengers (\n    id INTEGER PRIMARY KEY,\n    survived INTEGER,\n    class INTEGER,\n    name TEXT,\n    sex TEXT,\n    age TEXT,\n    siblings_spouses INTEGER,\n    parents_children INTEGER,\n    ticket TEXT,\n    fare REAL,\n    cabin TEXT,\n    embarked TEXT\n);\n```\nand then \n```\n.mode csv\n.import data/csv/titanic.csv passengers\n\n```\n\n#### NOTICE: If you want to check both implementation you can set the store type in `config.yaml` to `SQLITE/CSV`.\n\n## Tests\n\n---\n\nNot all test files are complete however you can find testing for edge case examples in API handlers test files for reference\n\n## Makefile Commands\n\n---\n### `make run`\n\nRun the API server in standalone mode using `go run`.\n\n### `make build`\n\nBuild the API server binary using `go build`.\n\n### `make docker-build`\n\nBuild the API server as a Docker image.\n\n### `make docker-build-store`\n\nBuild the data store as a Docker image.\n\n### `make docker-run`\n\nRun the API server as a Docker container.\n\n### `make docker-run-store`\n\nRun the data store as a Docker container.\n\n### `make docker-start`\n\nBuild Docker API image and run it.\n\n### `make docker-remove`\n\nRemove the Docker images and containers.\n\n### `make docker-compose-start`\n\nBuild Docker images for API \u0026 store and deploy using Docker Compose.\n\n### `make docker-compose-remove`\n\nStop the Docker Compose services.\n\n### `make k8s-deploy`\n\nDeploy Kubernetes resources.\n\n### `make k8s-remove`\n\nRemove Kubernetes resources.\n\n### `make helm-deploy`\n\nDeploy Kubernetes resources using helm.\n\n### `make helm-remove`\n\nRemove Kubernetes resources using helm.\n\n### `make api-docs`\n\nGenerate OpenAPI3 specification and save it as `docs/openapi.json`.\n\n### `make test`\n\nPrecentiles tests for the project.\n\n### `make coverage`\n\nMeasure code coverage for the tests.\n\n### `make coverage-html`\n\nGenerate an HTML report of the code coverage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felibracha%2Ftitanic-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felibracha%2Ftitanic-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felibracha%2Ftitanic-api/lists"}