Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
80eb6c8
chore: federation
ScriptedAlchemy Feb 28, 2025
17f6736
fix: tests
ScriptedAlchemy Feb 28, 2025
35c5e24
chore: add federation
ScriptedAlchemy Mar 1, 2025
f164bfa
chore: add federation
ScriptedAlchemy Mar 10, 2025
24937f0
chore: add federation
ScriptedAlchemy Mar 11, 2025
851f076
chore: update rstack
ScriptedAlchemy Mar 18, 2025
53bcbd9
chore: update rstack
ScriptedAlchemy Mar 18, 2025
a529bc4
chore: update rstack
ScriptedAlchemy Mar 18, 2025
3bdd69e
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 19, 2025
24535bc
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 20, 2025
76738ea
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 20, 2025
003411d
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 21, 2025
7351e1e
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 21, 2025
78027d8
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 21, 2025
fccd2b4
chore: fix ssr in rr7.3
ScriptedAlchemy Mar 21, 2025
f0b66e8
Fix: Remove unused imports in manifest.ts to resolve TypeScript linte…
ScriptedAlchemy Mar 21, 2025
3cbed5d
chore: fix federation imports
ScriptedAlchemy Mar 23, 2025
a317ea0
Merge branch 'main' into federation
ScriptedAlchemy Mar 23, 2025
a7462ae
chore: upgrade react router
ScriptedAlchemy Mar 23, 2025
3730eb9
Merge branch 'main' into federation
ScriptedAlchemy Mar 23, 2025
c03da62
chore: stage over updates from mf branch
ScriptedAlchemy Mar 23, 2025
2420e5f
chore: add prettier
ScriptedAlchemy Mar 23, 2025
601cbcb
chore: add prettier
ScriptedAlchemy Mar 23, 2025
13d4940
chore: add prettier
ScriptedAlchemy Mar 23, 2025
140205c
fix: improve async handler logic in server-utils
ScriptedAlchemy Mar 23, 2025
b1dfc40
chore: add E2E testing workflow
ScriptedAlchemy Mar 23, 2025
fb6acf0
fix: update federation option to use dynamic configuration
ScriptedAlchemy Mar 23, 2025
a94980b
Merge branch 'main' into federation
ScriptedAlchemy Mar 24, 2025
b4f11c1
Merge branch 'main' into federation
ScriptedAlchemy Mar 24, 2025
efc2f8d
workaround e2e flakes, consume all mf modules
ScriptedAlchemy Mar 24, 2025
a43e2c5
workaround e2e flakes, consume all mf modules
ScriptedAlchemy Mar 24, 2025
bd8d074
fix custom server example
ScriptedAlchemy Mar 24, 2025
17626f3
update docs and examples
ScriptedAlchemy Mar 24, 2025
c2390a4
add tests
ScriptedAlchemy Mar 24, 2025
5c301c1
add tests
ScriptedAlchemy Mar 24, 2025
8165647
add tests
ScriptedAlchemy Mar 24, 2025
f9aed36
Update package.json repository URL, enhance e2e script, and rename Gi…
ScriptedAlchemy Mar 24, 2025
711d1a7
Update e2e script in package.json to remove redundant port kill comma…
ScriptedAlchemy Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions examples/default-template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# React Router
/.react-router/
/build/
test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Summary: Put your summary here -->

## Test Plan

<!-- What steps need to be taken to verify this works as expected? -->

## Checklist

- [ ] Tests updated
- [ ] Docs updated

## Screenshots

<!-- If what you're changing is within the app, please show before/after.
You can provide a video as well if that makes more sense -->
174 changes: 174 additions & 0 deletions examples/federation/epic-stack-remote/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: 🚀 Deploy
on:
push:
branches:
- main
- dev
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: write
contents: read

jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22

- name: 📥 Download deps
uses: bahmutov/npm-install@v1

- name: 🖼 Build icons
run: npm run build:icons

- name: 🔬 Lint
run: npm run lint

typecheck:
name: ʦ TypeScript
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22

- name: 📥 Download deps
uses: bahmutov/npm-install@v1

- name: 🖼 Build icons
run: npm run build:icons

- name: 🔎 Type check
run: npm run typecheck --if-present

vitest:
name: ⚡ Vitest
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22

- name: 📥 Download deps
uses: bahmutov/npm-install@v1

- name: 🏄 Copy test env vars
run: cp .env.example .env

- name: 🖼 Build icons
run: npm run build:icons

- name: ⚡ Run vitest
run: npm run test -- --coverage

playwright:
name: 🎭 Playwright
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 🏄 Copy test env vars
run: cp .env.example .env

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22

- name: 📥 Download deps
uses: bahmutov/npm-install@v1

- name: 📥 Install Playwright Browsers
run: npm run test:e2e:install

- name: 🛠 Setup Database
run: npx prisma migrate deploy

- name: 🏦 Cache Database
id: db-cache
uses: actions/cache@v4
with:
path: prisma/data.db
key:
db-cache-schema_${{ hashFiles('./prisma/schema.prisma')
}}-migrations_${{ hashFiles('./prisma/migrations/*/migration.sql')
}}

- name: 🌱 Seed Database
if: steps.db-cache.outputs.cache-hit != 'true'
run: npx prisma migrate reset --force

- name: 🏗 Build
run: npm run build

- name: 🎭 Playwright tests
run: npx playwright test

- name: 📊 Upload report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

deploy:
name: 🚀 Deploy
runs-on: ubuntu-22.04
needs: [lint, typecheck, vitest, playwright]
# only build/deploy branches on pushes
if: ${{ github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: '50'

- name: 👀 Read app name
uses: SebRollen/toml-action@v1.2.0
id: app_name
with:
file: 'fly.toml'
field: 'app'

- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@1.5

- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
run:
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
--app ${{ steps.app_name.outputs.value }}-staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run:
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 🔖 Version
on:
push:
branches:
- main
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
version:
name: 🚀 Update Version
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 🔢 Get HEAD commit hash
id: get_head_hash
run: echo "HEAD_HASH=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: 📅 Get current date
id: get_date
run:
echo "CURRENT_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT

- name: 📝 Update package.json
run: |
jq '
if .["epic-stack"] then
.["epic-stack"].head = "${{ steps.get_head_hash.outputs.HEAD_HASH }}" |
.["epic-stack"].date = "${{ steps.get_date.outputs.CURRENT_DATE }}"
else
.["epic-stack"] = {
"head": "${{ steps.get_head_hash.outputs.HEAD_HASH }}",
"date": "${{ steps.get_date.outputs.CURRENT_DATE }}"
}
end
' package.json > temp.json && mv temp.json package.json

- name: 💾 Commit changes
run: |
git config --local user.email "kody@epicweb.dev"
git config --local user.name "kody"
git add package.json
git commit -m "Update epic-stack version [skip ci]"
git push
26 changes: 26 additions & 0 deletions examples/federation/epic-stack-remote/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
node_modules
.DS_store

/build
/server-build
.env
.cache

/prisma/data.db
/prisma/data.db-journal
/tests/prisma

/test-results/
/playwright-report/
/playwright/.cache/
/tests/fixtures/email/
/coverage

/other/cache.db

# Easy way to create temporary files/folders that won't accidentally be added to git
*.local.*

# generated files
/app/components/ui/icons
.react-router/
15 changes: 15 additions & 0 deletions examples/federation/epic-stack-remote/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules

/build
/public/build
/server-build
.env

/test-results/
/playwright-report/
/playwright/.cache/
/tests/fixtures/email/*.json
/coverage
/prisma/migrations

package-lock.json
11 changes: 11 additions & 0 deletions examples/federation/epic-stack-remote/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"prisma.prisma",
"qwtel.sqlite-viewer",
"yoavbls.pretty-ts-errors",
"github.vscode-github-actions"
]
}
80 changes: 80 additions & 0 deletions examples/federation/epic-stack-remote/.vscode/remix.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"loader": {
"prefix": "/loader",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
"",
"export async function loader({ request }: Route.LoaderArgs) {",
" return {}",
"}",
],
},
"action": {
"prefix": "/action",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
"",
"export async function action({ request }: Route.ActionArgs) {",
" return {}",
"}",
],
},
"default": {
"prefix": "/default",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"export default function ${TM_FILENAME_BASE/[^a-zA-Z0-9]*([a-zA-Z0-9])([a-zA-Z0-9]*)/${1:/capitalize}${2}/g}() {",
" return (",
" <div>",
" <h1>Unknown Route</h1>",
" </div>",
" )",
"}",
],
},
"headers": {
"prefix": "/headers",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
"export const headers: Route.HeadersFunction = ({ loaderHeaders }) => ({",
" 'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',",
"})",
],
},
"links": {
"prefix": "/links",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
"",
"export const links: Route.LinksFunction = () => {",
" return []",
"}",
],
},
"meta": {
"prefix": "/meta",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
"",
"export const meta: Route.MetaFunction = ({ data }) => [{",
" title: 'Title',",
"}]",
],
},
"shouldRevalidate": {
"prefix": "/shouldRevalidate",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type ShouldRevalidateFunctionArgs } from 'react-router'",
"",
"export function shouldRevalidate({ defaultShouldRevalidate }: ShouldRevalidateFunctionArgs) {",
" return defaultShouldRevalidate",
"}",
],
},
}
Loading