{"id":18282980,"url":"https://github.com/zentered/fastify-dx-solidjs-example","last_synced_at":"2025-04-05T06:30:50.242Z","repository":{"id":46140529,"uuid":"514187309","full_name":"zentered/fastify-dx-solidjs-example","owner":"zentered","description":"Real world app using Fastify-DX, Solid.js, Auth0 and GraphQL","archived":true,"fork":false,"pushed_at":"2024-04-08T15:03:37.000Z","size":337,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T23:05:58.723Z","etag":null,"topics":["auth0","fastify-dx","graphql","solidjs","vite"],"latest_commit_sha":null,"homepage":"https://zentered.co/articles/fastify-dx-and-solidjs-in-the-real-world/","language":"JavaScript","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/zentered.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":"2022-07-15T08:07:53.000Z","updated_at":"2024-04-08T15:03:52.000Z","dependencies_parsed_at":"2022-09-23T08:00:14.157Z","dependency_job_id":"aac834ce-1f49-465c-987f-fd3ffa8e323a","html_url":"https://github.com/zentered/fastify-dx-solidjs-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Ffastify-dx-solidjs-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Ffastify-dx-solidjs-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Ffastify-dx-solidjs-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Ffastify-dx-solidjs-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentered","download_url":"https://codeload.github.com/zentered/fastify-dx-solidjs-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299766,"owners_count":20916183,"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":["auth0","fastify-dx","graphql","solidjs","vite"],"created_at":"2024-11-05T13:06:53.421Z","updated_at":"2025-04-05T06:30:49.677Z","avatar_url":"https://github.com/zentered.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Fastify DX and Solid.js In the Real World\n\nThese are only the essentials to set up a \"real world\" application with Fastify\nDX, Solid.js, Auth0 and GraphQL. To read more about how, why etc. please refer\nto our blog post:\n[Real World App using Fastify DX and Solid.js](https://zentered.co/articles/fastify-dx-and-solidjs-in-the-real-world/)\n\nThis application connects to the GitHub GraphQL. We use\n[Auth0](https://auth0.com) and a\n[Social Identity Provider](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers)\n(GitHub) to log in to our App.\n\n## Requirements\n\nCopy `env.example` to `.env`. Those variables are loaded when the server is\nstarted. There are a few steps needed for a full, working setup:\n\n1. Auth0 Single Page Application to handle the login on the website\n2. GitHub OAuth App to communicate with Auth0 securely and issue GraphQL API\n   tokens\n3. Auth0 Machine to Machine Application to retrieve access tokens for the GitHub\n   GraqhQL API through Auth0\n\n### Auth0 Single Page Application\n\nThis is the primary auth0 application we'll use. Create a new Single Page\nApplication in Auth0 and copy the client id and domain into `.env`, (variables\nstarting with `VITE_AUTH0_`). Make sure you add `http://localhost:8080` to the\n_Allowed Callback URL_, _Allowed Web Origin_ and _Allowed Origin_.\n\n### GitHub OAuth App\n\nGo into your [Developer Settings](https://github.com/settings/developers) and\ncreate a new OAuth App. Name, homepage etc. are not important, but the\n`Authorization callback URL` needs to point to your Auth0 Tenant. You can get\nthe domain in your Auth0 application settings:\n`https://\u003cauth0-app-DOMAIN\u003e.auth0.com`.\n\n### Auth0 Social Connections\n\nGo to `Authentication -\u003e Social` and `Create Connection`. Select GitHub. Pick a\nname and copy the Client ID from your GitHub OAuth App. Go back to the GitHub\nOAuth App settings and click `Create a new client secret`. Copy that into the\nClient Secret in the Auth0 connection details. For this app we only need\n`public_repo` as a permission. You should enable\n`Sync user profile attribute at each login` to retrieve the user details from\nGitHub.\n\nAfter saving, go back to your Single Page Application, to the tab `Connections`\nand add the GitHub Social Connection. You should disable the Database connection\nto avoid issues later.\n\n### Auth0: Machine to Machine Application\n\nWe use a Machine to Machine Application to retrieve the Access Token for the\nGitHub API through Auth0. This can't be done directly on the client.\n\nGo back to Applications, `Create Application` and pick\n`Machine to Machine Application`. Enter a name, and copy the client id, secret\nand domain into `.env` (variables starting with `AUTH0_`). Go to `APIs` and\nAuthorize the application to the Auth0 Management API. The only permission\nneeded is `read:user_idp_tokens`.\n\n## Install \u0026 Run\n\n      pnpm install\n      pnpm dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Ffastify-dx-solidjs-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentered%2Ffastify-dx-solidjs-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Ffastify-dx-solidjs-example/lists"}