{"id":27443894,"url":"https://github.com/josephmachado/online_store","last_synced_at":"2025-07-05T00:33:05.259Z","repository":{"id":43879681,"uuid":"472090841","full_name":"josephmachado/online_store","owner":"josephmachado","description":"End to end data engineering project","archived":false,"fork":false,"pushed_at":"2022-10-27T00:21:28.000Z","size":1600,"stargazers_count":54,"open_issues_count":1,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T02:58:01.400Z","etag":null,"topics":["dagster","data-analysis","data-engineering","data-pipeline","data-platform","data-processing","datawarehouse","postgresql","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/josephmachado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-03-20T20:09:01.000Z","updated_at":"2025-04-02T21:15:20.000Z","dependencies_parsed_at":"2023-01-20T07:46:47.603Z","dependency_job_id":null,"html_url":"https://github.com/josephmachado/online_store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephmachado%2Fonline_store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephmachado%2Fonline_store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephmachado%2Fonline_store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephmachado%2Fonline_store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josephmachado","download_url":"https://codeload.github.com/josephmachado/online_store/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997095,"owners_count":21195797,"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":["dagster","data-analysis","data-engineering","data-pipeline","data-platform","data-processing","datawarehouse","postgresql","python3"],"created_at":"2025-04-15T02:58:06.198Z","updated_at":"2025-04-15T02:58:06.758Z","avatar_url":"https://github.com/josephmachado.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data engineering project: data extraction to analysis\n\nFor more details read the blog [here](https://www.startdataengineering.com/post/data-engineering-project-e2e/)\n\n# Architecture diagram\n\n![Architecture](/assets/images/arch.png)\n## Setup\n\n### Pre-requisites\n\n1. [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n2. [Github account](https://github.com/)\n3. [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) \n4. [AWS account](https://aws.amazon.com/) \n5. [AWS CLI installed](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) and [configured](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n6. [Docker](https://docs.docker.com/engine/install/) with at least 4GB of RAM and [Docker Compose](https://docs.docker.com/compose/install/) v1.27.0 or later\n\nRead **[this post](https://www.startdataengineering.com/post/data-engineering-projects-with-free-template/)**, for information on setting up CI/CD, DB migrations, IAC(terraform), \"make\" commands and automated testing.\n\nRun these commands to setup your project locally and on the cloud.\n\n```shell\n# Clone the code as shown below.\ngit clone https://github.com/josephmachado/online_store.git\ncd online_store\n\n# Local run \u0026 test\nmake up # start the docker containers on your computer \u0026 runs migrations under ./migrations\nmake ci # Runs auto formatting, lint checks, \u0026 all the test files under ./tests\n\n# Create AWS services with Terraform\nmake tf-init # Only needed on your first terraform run (or if you add new providers)\nmake infra-up # type in yes after verifying the changes TF will make\n\n# Wait until the EC2 instance is initialized, you can check this via your AWS UI\n# See \"Status Check\" on the EC2 console, it should be \"2/2 checks passed\" before proceeding\n\nmake cloud-metabase # this command will forward Metabase port from EC2 to your machine and opens it in the browser\n\nmake cloud-dagster # this command will forward Dagster port from EC2 to your machine and opens it in the browser\n```\n\nYou can connect metabase (open this using `make cloud-metabase`) to the warehouse with the following credentials\n\n```bash\nWAREHOUSE_USER: sde\nWAREHOUSE_PASSWORD: password\nWAREHOUSE_DB: warehouse\nWAREHOUSE_HOST: warehouse_db\nWAREHOUSE_PORT: 5432\n```\n\nCreate [database migrations](https://www.startdataengineering.com/post/data-engineering-projects-with-free-template/#43-database-migrations) as shown below.\n\n```shell\nmake db-migration # enter a description, e.g., create some schema\n# make your changes to the newly created file under ./migrations\nmake warehouse-migration # to run the new migration on your warehouse\n```\n\nFor the [continuous delivery](https://github.com/josephmachado/online_store/blob/main/.github/workflows/cd.yml) to work, set up the infrastructure with terraform, \u0026 defined the following repository secrets. You can set up the repository secrets by going to `Settings \u003e Secrets \u003e Actions \u003e New repository secret`.\n\n1. **`SERVER_SSH_KEY`**: We can get this by running `terraform -chdir=./terraform output -raw private_key` in the project directory and paste the entire content in a new Action secret called SERVER_SSH_KEY.\n2. **`REMOTE_HOST`**: Get this by running `terraform -chdir=./terraform output -raw ec2_public_dns` in the project directory.\n3. **`REMOTE_USER`**: The value for this is **ubuntu**.\n\n### Tear down infra\n\nAfter you are done, make sure to destroy your cloud infrastructure.\n\n```shell\nmake down # Stop docker containers on your computer\nmake infra-down # type in yes after verifying the changes TF will make\n```\n\n## References\n\n1. [Dagster docs](https://docs.dagster.io/tutorial)\n2. [Metabase docs](https://www.metabase.com/learn/getting-started/getting-started.html)\n3. [FastAPI docker](https://fastapi.tiangolo.com/deployment/docker/)\n4. [Dagster docker setup](https://github.com/dagster-io/dagster/tree/0.14.17/examples/deploy_docker)\n5. [dbt docs](https://docs.getdbt.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephmachado%2Fonline_store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosephmachado%2Fonline_store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephmachado%2Fonline_store/lists"}