{"id":23362898,"url":"https://github.com/remotesynth/launchdarkly-cognito","last_synced_at":"2025-04-07T21:46:00.790Z","repository":{"id":215663062,"uuid":"730255333","full_name":"remotesynth/launchdarkly-cognito","owner":"remotesynth","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-23T14:32:56.000Z","size":605,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T23:18:16.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/remotesynth.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-12-11T14:30:19.000Z","updated_at":"2023-12-11T14:30:25.000Z","dependencies_parsed_at":"2024-01-10T20:25:10.833Z","dependency_job_id":"1532df9a-8f29-43e5-be11-dc53d99f646b","html_url":"https://github.com/remotesynth/launchdarkly-cognito","commit_stats":null,"previous_names":["remotesynth/launchdarkly-cognito"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Flaunchdarkly-cognito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Flaunchdarkly-cognito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Flaunchdarkly-cognito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Flaunchdarkly-cognito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remotesynth","download_url":"https://codeload.github.com/remotesynth/launchdarkly-cognito/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737666,"owners_count":20987717,"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-12-21T12:33:26.054Z","updated_at":"2025-04-07T21:46:00.759Z","avatar_url":"https://github.com/remotesynth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using LaunchDarkly with AWS Cognito\n\nThis project explores how to implement user targeting using user data from Amazon Cognito and LaunchDarkly. The application impements targeting on both the client-side (using LaunchDarkly's client-side JavaScript SDK) and server side (using the server-side Node.js SDK). The application itself is built using Astro with a combination of Astro and React components. State is handled on the client and server using Nanostores.\n\nIn order to use this project locally, you'll need the following details in a `.env` file (note that the `PUBLIC_` denotes variables are available client side within Astro):\n\n* Your Amazon Cognito User Pool ID as `PUBLIC_COGNITO_USER_POOL_ID`\n* Your Cognito Client ID as `PUBLIC_COGNITO_CLIENT_ID`\n* A LaunchDarkly Client Side ID as `PUBLIC_LAUNCHDARKLY_CLIENT_ID` \n* A LaunchDarkly SDK Key as `LAUNCHDARKLY_SDK_KEY`\n\nYour LaunchDarkly environment will need the following:\n\n* A segment that targets contexts that pass a user context with a property of `dev_type` that is either of the following two values: `professional` or `hobbyist`\n* A string flag with the key of `hero-text`. This flag should have at least a variation targeting the above segment.\n* A JSON flag with the key of `pricing-plans`. This flag should have at least a variation targeting the above segment. The structure of the JSON should be:\n    ```json\n    {\n    \"plans\": [\n        {\n        \"name\": \"Developer\",\n        \"description\": \"A plan for when you work for a company but you don't control the budget.\",\n        \"price\": \"$49\"\n        },\n        {\n        \"name\": \"Enterprise\",\n        \"description\": \"A plan for when our budget is big enough that you might never notice you're paying us.\",\n        \"price\": \"$299\"\n        }\n    ]\n    }\n    ```\n\n    Note that you can include more than 2 pricing items.\n\nOnce the setup is complete, you should be able to register with accounts that are either \"hobbyist\" or \"professional\" and you should see a different tagline in the hero banner on the home page and different pricing on the pricing page.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotesynth%2Flaunchdarkly-cognito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremotesynth%2Flaunchdarkly-cognito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotesynth%2Flaunchdarkly-cognito/lists"}