{"id":28279684,"url":"https://github.com/sukhmani1303/two-way-integration","last_synced_at":"2026-05-15T11:35:21.892Z","repository":{"id":198243447,"uuid":"692641269","full_name":"sukhmani1303/two-way-integration","owner":"sukhmani1303","description":"A two-way integration with a customer catalogue in an external service (stripe)","archived":false,"fork":false,"pushed_at":"2023-10-04T13:12:36.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-19T03:39:15.817Z","etag":null,"topics":["backend","docker-kafka","fastapi","kafka","kafka-consumer","kafka-producer","python","stripe","stripe-api","two-way-integration"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sukhmani1303.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}},"created_at":"2023-09-17T05:47:46.000Z","updated_at":"2023-10-04T13:22:48.000Z","dependencies_parsed_at":"2023-10-05T01:40:24.219Z","dependency_job_id":null,"html_url":"https://github.com/sukhmani1303/two-way-integration","commit_stats":null,"previous_names":["sukhmani1303/two-way-integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sukhmani1303/two-way-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhmani1303%2Ftwo-way-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhmani1303%2Ftwo-way-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhmani1303%2Ftwo-way-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhmani1303%2Ftwo-way-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukhmani1303","download_url":"https://codeload.github.com/sukhmani1303/two-way-integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhmani1303%2Ftwo-way-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33065623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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":["backend","docker-kafka","fastapi","kafka","kafka-consumer","kafka-producer","python","stripe","stripe-api","two-way-integration"],"created_at":"2025-05-21T09:15:28.680Z","updated_at":"2026-05-15T11:35:21.886Z","avatar_url":"https://github.com/sukhmani1303.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n#### The objective of this repo is to simulate a product that has a simple customer catalog (think of it as a simple customer table) and to build a two-way integration with a customer catalog in an external service - Stripe in this case. The two-way sync is real-time so that a customer added/edited on one system propagates to the other system within a few seconds.\n\n---\n\n# Getting Started\n### Project Setup\nFirst, to clone this repository to your local machine run the following command in your git Bash\n```\nhttps://github.com/sukhmani1303/two-way-integration.git\n```\n\u003ci\u003emake sure you clone it into an appropriate folder :)\u003c/i\u003e\n\n\nThen, setup a virtual environment using the following command \n\n```\nvirtualenv venv\n```\n\nuse the following command to install the requirements\n```\npip install -r requirements.txt\n```\n\n___\n\n### Kafka Setup Using Docker\nFirst, install Docker in your machine \u0026 execute the following steps\n\n1. open any terminal and cd into the \"docker-kafka\" folder\n2. run the following command in the terminal\n```\ndocker compose -f docker-compose.yml up -d\n```\n3. Open Docker \u0026 start the \"docker-kafka\" container to enable kafka\n\n___\n\n### Setup Ngrok \u0026 Webhook\n1. Download Ngrok file from [here](https://ngrok.com/download)\n2. Run the following command after running main.py module to get public url for Webhook\n```\nngrok http 8080\n```\n3. Save the url \u0026 endpoint _\"\u003cpublic_url\u003e/inward_sync/update\"_ as endpoint url for stripe webhook which listens to **customer.updated**\n\n___\n\n### Setup Stripe\n1. Login into Stripe\n2. Get all the API keys \u0026 store them as json in \"Keys.json\" file\n```\n{\n    \n    \"STRIPE_SECRET_KEY\" : \"\u003cyour key\u003e\",\n    \"STRIPE_PUBLISHABLE_KEY\" : \"\u003cyour key\u003e\",\n    \"WEBHOOK_SECRET\" : \"\u003cyour key\u003e\"\n\n}\n\n```\n___\n\n### Setup PostgreSQL\n1. Download \u0026 install PostgreSQL\n2. Insert Data which you entered in stripe's customer catalog\n3. Change the \"SQLALCHEMY_DATABASE_URL\" inside the database.py module to connect to your local DB\n\n___\n\n# Start The Project\n1. Start the \"docker-kafka\" container in Docker Desktop\n2. Activate the virtual environment\n3. Run the \"k_consumer.py\" module in a separate terminal\n4. Run \"main.py\" module\n5. Use Ngrok to get a public url \u0026 update stripe's Webhook endpoint\n6. Run app.py by writing the following command in terminal\n```\nstreamlit run app.py\n```\n\n___\n\n# Testing the app\nusing the streamlit's interface one can \n* update the records \u0026 trigger outward sync\n* view all the record by applying inward sync changes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhmani1303%2Ftwo-way-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukhmani1303%2Ftwo-way-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhmani1303%2Ftwo-way-integration/lists"}