{"id":19023246,"url":"https://github.com/phildl/remix-ghost-stack","last_synced_at":"2025-07-21T18:31:21.772Z","repository":{"id":162976241,"uuid":"637373818","full_name":"PhilDL/remix-ghost-stack","owner":"PhilDL","description":"WIP Remix Ghost Stack","archived":false,"fork":false,"pushed_at":"2024-02-22T15:48:11.000Z","size":703,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T09:40:09.660Z","etag":null,"topics":["ghost-cms","remix-run","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://remix-ghost-stack.fly.dev","language":"TypeScript","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/PhilDL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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-05-07T11:12:28.000Z","updated_at":"2024-11-10T08:06:44.000Z","dependencies_parsed_at":"2024-02-14T15:44:40.452Z","dependency_job_id":"4e8828cd-4a02-4181-b8ee-c74d71f8f233","html_url":"https://github.com/PhilDL/remix-ghost-stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PhilDL/remix-ghost-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilDL%2Fremix-ghost-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilDL%2Fremix-ghost-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilDL%2Fremix-ghost-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilDL%2Fremix-ghost-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhilDL","download_url":"https://codeload.github.com/PhilDL/remix-ghost-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilDL%2Fremix-ghost-stack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266352513,"owners_count":23915766,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["ghost-cms","remix-run","tailwindcss","typescript"],"created_at":"2024-11-08T20:29:12.711Z","updated_at":"2025-07-21T18:31:21.754Z","avatar_url":"https://github.com/PhilDL.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remix Ghost Stack\n\n\u003e **Warning**!\n\n\u003e This is still a work in progress, documentation is not ready\n\u003e For now if you want to try you should clone that repo and use `pnpm i`\n\u003e Some third-parties (Sendgrid, Stripe, Ghost) configuration documentation are not there yet!\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PhilDL/remix-ghost-stack/assets/4941205/c68bcc1d-8bd5-48fd-94e7-3375a483a9b7\" height=\"600px\" alt=\"Remix Ghost Stack Preview\" style=\"border-radius:10px\"\u003e\n\u003c/div\u003e\n\n## Tech in the stack\n\n- [Fly app deployment](https://fly.io) with [Docker](https://www.docker.com/)\n- Fully type-safe interaction with Ghost Content and Admin API thanks to [@ts-ghost](https://github.com/PhilDL/ts-ghost)\n- Database ORM with [Prisma](https://prisma.io) and [SQLite](https://www.sqlite.org/index.html)\n- Healthcheck endpoint for [Fly backups region fallbacks](https://fly.io/docs/reference/configuration/#services-http_checks)\n- [GitHub Actions](https://github.com/features/actions) for deploy on merge to production and staging environments\n- Styling with [Tailwind](https://tailwindcss.com/) and Beautiful components with [shadcn ui](https://github.com/shadcn/ui)\n- Local third party request mocking with [MSW](https://mswjs.io)\n- Unit testing with [Vitest](https://vitest.dev) and [Testing Library](https://testing-library.com)\n- Code formatting with [Prettier](https://prettier.io) and + Tailwind Prettier-Plugin.\n- Linting with [ESLint](https://eslint.org)\n- Static Types with [TypeScript](https://typescriptlang.org)\n\n## Stack Features\n\n- [Ghost](https://ghost.org/) CMS Pages, Posts, Authors, Tags\n- [Stripe Subscriptions](https://stripe.com/docs/billing/subscriptions/overview) connects to your Ghost instance and the products you configured there.\n- Authentication Ready with [Remix-Auth](https://www.npmjs.com/package/remix-auth), [Remix Auth OTP](https://github.com/dev-xo/remix-auth-otp). Created to mimic the Ghost Membership login flow with magic link but also adding the convinience of a token Code.\n- Beautiful emails with [React Emails](https://github.com/resendlabs/react-email), for Signup and Signin actions\n- Domain separated logic with [domain functions](https://github.com/seasonedcc/domain-functions)\n\n## Ghost Features (some are currently in developement)\n\n## Built-in routes\n\n- [x] Home: Pages, Posts, Authors, Tags + \"load more posts...\" action\n- [x] Page // Post `$slug` + SSR Syntax Highlight with rehype prism\n- [x] Author `$slug` + related posts\n- [x] Tag `$slug` + related posts\n- [x] All tags\n- [x] All authors\n- [x] Join + OTP Email magic link\n- [x] Login + OTP Email magic link\n- [x] Account + Subscribe redirect Stripe\n\n### SEO Metadata (Meta tags + OG + Twitter )\n\n- [x] Home\n- [x] Page // Post\n- [ ] Author\n- [x] Tag\n\n### SEO JSONLD Schema\n\n- [x] Home\n- [x] Page // Post\n- [ ] Author\n- [x] Tag\n\n## Development\n\n- Initial setup: _If you just generated this project, this step has been done for you._\n\n  ```sh\n  pnpm run setup\n  ```\n\n- Start dev server:\n\n  ```sh\n  pnpm run dev\n  ```\n\nThis starts your app in development mode, rebuilding assets on file changes.\n\n### Relevant code:\n\nThis stack relies heavily on the `@ts-ghost` library providing full type-safe calls to the ghost Content and Admin APIs.\n\nUnfortunately the API doesn't give us all the informations necessary to have a fully smooth headless experience. For example the tiers provided by the API don't give us access to the Stripe Product ID connected so we have to do a lookup by name. Which is not ideal but works for now.\n\n## Deployment\n\nThis Remix Stack comes with two GitHub Actions that handle automatically deploying your app to production and staging environments.\n\nPrior to your first deployment, you'll need to do a few things:\n\n- [Install Fly](https://fly.io/docs/getting-started/installing-flyctl/)\n\n- Sign up and log in to Fly\n\n  ```sh\n  fly auth signup\n  ```\n\n  \u003e **Note:** If you have more than one Fly account, ensure that you are signed into the same account in the Fly CLI as you are in the browser. In your terminal, run `fly auth whoami` and ensure the email matches the Fly account signed into the browser.\n\n- Create two apps on Fly, one for staging and one for production:\n\n  ```sh\n  fly apps create remix-ghost-stack\n  fly apps create remix-ghost-stack-staging\n  ```\n\n  \u003e **Note:** Make sure this name matches the `app` set in your `fly.toml` file. Otherwise, you will not be able to deploy.\n\n  - Initialize Git.\n\n  ```sh\n  git init\n  ```\n\n- Create a new [GitHub Repository](https://repo.new), and then add it as the remote for your project. **Do not push your app yet!**\n\n  ```sh\n  git remote add origin \u003cORIGIN_URL\u003e\n  ```\n\n- Add a `FLY_API_TOKEN` to your GitHub repo. To do this, go to your user settings on Fly and create a new [token](https://web.fly.io/user/personal_access_tokens/new), then add it to [your repo secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) with the name `FLY_API_TOKEN`.\n\n- Add a `SESSION_SECRET` to your fly app secrets, to do this you can run the following commands:\n\n  ```sh\n  fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app remix-ghost-stack\n  fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app remix-ghost-stack-staging\n  fly secrets set MAGIC_LINK_SECRET=$(openssl rand -hex 32) --app remix-ghost-stack\n  fly secrets set MAGIC_LINK_SECRET=$(openssl rand -hex 32) --app remix-ghost-stack-staging\n  fly secrets set APP_URL=\"https://remix-ghost-stack.fly.dev\" --app remix-ghost-stack\n  fly secrets set APP_URL=\"https://remix-ghost-stack-staging.fly.dev\" --app remix-ghost-stack-staging\n  ```\n\n  If you don't have openssl installed, you can also use [1password](https://1password.com/password-generator/) to generate a random secret, just replace `$(openssl rand -hex 32)` with the generated secret.\n\n#### Add secrets for third party services\n\n- From your Ghost CMS admin panel, add a new Ghost integration and copy paste the credentials:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PhilDL/PhilDL/assets/4941205/2075b962-1a04-42f0-9f83-284d11529803\" height=\"300px\" style=\"border-radius:10px\"\u003e\n\u003c/div\u003e\n\n```sh\nfly secrets set GHOST_URL=\"https://remix-ghost-stack.digitalpress.blog\" --app remix-ghost-stack\nfly secrets set GHOST_CONTENT_API_KEY=\"your-content-api-key\" --app remix-ghost-stack\nfly secrets set GHOST_ADMIN_API_KEY=\"your-admin-api-key:your-admin-api-key\" --app remix-ghost-stack\n\nfly secrets set GHOST_URL=\"https://remix-ghost-stack.digitalpress.blog\" --app remix-ghost-stack-staging\nfly secrets set GHOST_CONTENT_API_KEY=\"your-content-api-key\" --app remix-ghost-stack-staging\nfly secrets set GHOST_ADMIN_API_KEY=\"your-admin-api-key:your-admin-api-key\" --app remix-ghost-stack-staging\n```\n\n- Your Stripe credentials:\n\n  ```sh\n  fly secrets set STRIPE_SECRET_KEY=\"sk_live_key\" --app remix-ghost-stack\n  fly secrets set STRIPE_PUBLIC_KEY=\"pk_live_key\" --app remix-ghost-stack\n  fly secrets set STRIPE_WEBHOOK_SIGNATURE=\"whsec_key\" --app remix-ghost-stack\n\n  fly secrets set STRIPE_SECRET_KEY=\"sk_test_key\" --app remix-ghost-stack-staging\n  fly secrets set STRIPE_PUBLIC_KEY=\"pk_test_key\" --app remix-ghost-stack-staging\n  fly secrets set STRIPE_WEBHOOK_SIGNATURE=\"whsec_test_key\" --app remix-ghost-stack-staging\n  ```\n\n  \u003e **Warning**!\n\n\u003e Here you should use the same Stripe account connected to your Ghost CMS !\n\nYou will have to generate a stripe webhook with these listeners:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PhilDL/PhilDL/assets/4941205/33102895-d893-4b03-ad84-57f2b3a7fda9\" height=\"600px\" style=\"border-radius:10px\"\u003e\n\u003c/div\u003e\n\nThen copy paste your webhook secret set it via the `fly` CLI.\n\n- Your Sendgrid API Key\n\n  ```sh\n  fly secrets set SENDGRID_API_KEY=\"SG_sendgridkey\" --app remix-ghost-stack\n  fly secrets set SENDGRID_API_KEY=\"SG_sendgridkey\" --app remix-ghost-stack-staging\n  ```\n\nSendgrid is used to send the Login and Signup emails.\n\n- Create a persistent volume for the sqlite database for both your staging and production environments. Run the following:\n\n  ```sh\n  fly volumes create data --size 1 --app remix-ghost-stack\n  fly volumes create data --size 1 --app remix-ghost-stack-staging\n  ```\n\nNow that everything is set up you can commit and push your changes to your repo. Every commit to your `main` branch will trigger a deployment to your production environment, and every commit to your `dev` branch will trigger a deployment to your staging environment.\n\n### Connecting to your database\n\nThe sqlite database lives at `/data/sqlite.db` in your deployed application. You can connect to the live database by running `fly ssh console -C database-cli`.\n\n### Getting Help with Deployment\n\nIf you run into any issues deploying to Fly, make sure you've followed all of the steps above and if you have, then post as many details about your deployment (including your app name) to [the Fly support community](https://community.fly.io). They're normally pretty responsive over there and hopefully can help resolve any of your deployment issues and questions.\n\n## GitHub Actions\n\nWe use GitHub Actions for continuous integration and deployment. Anything that gets into the `main` branch will be deployed to production after running tests/build/etc. Anything in the `dev` branch will be deployed to staging.\n\n## Testing\n\n### Playwright\n\nWrite doc\n\n### Vitest\n\nFor lower level tests of utilities and individual components, we use `vitest`. We have DOM-specific assertion helpers via [`@testing-library/jest-dom`](https://testing-library.com/jest-dom).\n\n### Type Checking\n\nThis project uses TypeScript. It's recommended to get TypeScript set up for your editor to get a really great in-editor experience with type checking and auto-complete. To run type checking across the whole project, run `pnpm run typecheck`.\n\n### Linting\n\nThis project uses ESLint for linting. That is configured in `.eslintrc.js`.\n\n### Formatting\n\nWe use [Prettier](https://prettier.io/) for auto-formatting in this project. It's recommended to install an editor plugin (like the [VSCode Prettier plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)) to get auto-formatting on save. There's also a `pnpm run format` script you can run to format all files in the project.\n\n- Tailwind prettier plugin\n- Sort inports\n\n### Aknowledgements\n\n- The theme was inspired by the amazing Ghost themes from [Biron Themes](https://bironthemes.com)\n- The stripe integration was **heavily** inspired by another amazing Remix template by dev-xo, [Stripe Stack](https://github.com/dev-xo/stripe-stack)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphildl%2Fremix-ghost-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphildl%2Fremix-ghost-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphildl%2Fremix-ghost-stack/lists"}