{"id":30127623,"url":"https://github.com/moeki0/todos-api","last_synced_at":"2025-08-10T17:08:46.215Z","repository":{"id":286710002,"uuid":"962299699","full_name":"moeki0/todos-api","owner":"moeki0","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-08T00:30:50.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T13:37:11.281Z","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/moeki0.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":"2025-04-08T00:30:05.000Z","updated_at":"2025-04-08T00:30:53.000Z","dependencies_parsed_at":"2025-04-08T01:35:20.002Z","dependency_job_id":null,"html_url":"https://github.com/moeki0/todos-api","commit_stats":null,"previous_names":["moekiorg/todos-api","kawakamidev/todos-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moeki0/todos-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Ftodos-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Ftodos-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Ftodos-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Ftodos-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moeki0","download_url":"https://codeload.github.com/moeki0/todos-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Ftodos-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269756394,"owners_count":24470566,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":[],"created_at":"2025-08-10T17:08:41.036Z","updated_at":"2025-08-10T17:08:46.203Z","avatar_url":"https://github.com/moeki0.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todos API\n\nThis is a sample API which is protected by Auth0. It is used in the remote MCP demo to showcase the capabilities how the MCP server can be used to call a protected API on behalf of a user.\n\n\u003e Note: While for this demo we are deploying the API to Cloudflare, it could be deployed anywhere.\n\n## Auth0 Configuration\n\nIn the Auth0 dashboard, create a new API in the APIs section.\n\n\u003cimg src=\"../docs/create-api.jpg\" width=\"500\" alt=\"Create API\"\u003e\n\nOnce the API is created, enable \"Offline Access\" so we can get a refresh token.\n\n\u003cimg src=\"../docs/offline-access.jpg\" width=\"500\" alt=\"Enable Offline Access\"\u003e\n\n\u003e Note: You can turn off the \"Allow Skipping User Consent\" if you want to force users to consent to the scopes.\n\nAnd finally add the following API permissions:\n\n- `read:todos`\n- `read:billing`\n\n\u003cimg src=\"../docs/create-permissions.jpg\" width=\"500\" alt=\"Create Permissions\"\u003e\n\nThat's it! You can now configure your local environment or deploy the API to Cloudflare.\n\n## Development\n\nCreate a `.dev.vars` file in the root of the project with the following structure:\n\n```\nAUTH0_DOMAIN=yourtenant.us.auth0.com\nAUTH0_AUDIENCE=urn:todos-api\n```\n\nThe `AUTH0_DOMAIN` is the domain of the Auth0 tenant. The `AUTH0_AUDIENCE` is the audience of the API you created in the Auth0 tenant (eg: `urn:todos-api`).\n\n### Testing the API\n\nTo test the API, you can use the following command:\n\n```\nnpm run dev\n```\n\nThis will start the worker and you can make requests to it. In the Auth0 dashboard there is a **Test** tab in the API where you can get an `access_token` to call the API. Use this to call the API as follows:\n\n```bash\ncurl --request GET \\\n  --url http://localhost:8788/api/me \\\n  --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6Im...'\n```\n\nIf this call is successful, you should see the claims of the JWT token in the response.\n\n## Deploying the API\n\nTo deploy the API to Cloudflare, you will first need to set the following secrets:\n\n```bash\nwrangler secret put AUTH0_DOMAIN\nwrangler secret put AUTH0_AUDIENCE\n```\n\nOnce the secrets are set, you can deploy the API with the following command:\n\n```bash\nnpm run deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Ftodos-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoeki0%2Ftodos-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Ftodos-api/lists"}