Code Monkey home page Code Monkey logo

epic-stack's Introduction

Ditch analysis paralysis and start shipping Epic Web apps.

This is an opinionated project starter and reference that allows teams to ship their ideas to production faster and on a more stable foundation based on the experience of Kent C. Dodds and contributors.

npx create-epic-app@latest

The Epic Stack

The Epic Stack


Watch Kent's Introduction to The Epic Stack

Epic Stack Talk slide showing Flynn Rider with knives, the text "I've been around and I've got opinions" and Kent speaking in the corner

"The Epic Stack" by Kent C. Dodds

Docs

Read the docs (please ๐Ÿ™).

Support

Branding

Want to talk about the Epic Stack in a blog post or talk? Great! Here are some assets you can use in your material: EpicWeb.dev/brand

Thanks

You rock ๐Ÿชจ

epic-stack's People

Contributors

alemtuzlak avatar andrecasal avatar arpitdalal avatar benhsm avatar chessydk avatar devlinmorrow avatar edmundhung avatar fredericrous avatar hakimlyon avatar jacobparis avatar kentcdodds avatar kiliman avatar l-steinmacher avatar mediabakery avatar michaeldeboey avatar mosattler avatar mxschmitt avatar nathanvale avatar nichtsam avatar onemen avatar paolapog avatar rajeshg avatar rperon avatar rustworthy avatar samialdury avatar saurabhp75 avatar simonswiss avatar vinstah avatar xhomu avatar xstevenyung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epic-stack's Issues

LiveReload not working

Setup a new project today following the readme but as I make changes in the app I'm not getting updates in the browser on localhost.

๐Ÿ’ฟ File changed: app/routes/users+/$username.tsx ๐Ÿ’ฟ Rebuilding... ๐Ÿ’ฟ Rebuilt in 717ms Waiting for app server (47fa8b37)

Fly volume in wrong region

I've been following the README and when I deployed I got this error.

Error: error creating a new machine: failed to launch VM: Mounts source volume "vol_lgz1vppx35yv78m3" is in the wrong region ("dfw" != "iad")

So, I created a new volume in iad and I got this message:

Error: error creating a new machine: failed to launch VM: Mounts source volume "vol_1q85vg7xkgzvzdxe" is in the wrong region ("iad" != "dfw")

What's happening? When I created the apps I wasn't asked for a region and when I created the volumes I chose dfw for both.

??

Didn't mean to create this here.

Dev script doesn't work "spawn npm run dev:server ENOENT"

Hi, I have issue running npm run dev since the dev script was moved into its own subprocess with #133

To reproduce

On a fresh new epic-stack project.

npx create-remix@latest --typescript --install --template epicweb-dev/epic-stack

? Would you like to setup deployment right now? No
Ok, check the docs (https://github.com/epicweb-dev/epic-stack/blob/main/docs/deployment.md) when you're ready to set that up.
Setup is complete. You're now ready to rock and roll ๐Ÿจ

What's next?

- Start development with `npm run dev`
- Run tests with `npm run test` and `npm run test:e2e`
๐Ÿ’ฟ That's it! `cd` into "/Users/philippelattention/Code/epic-stack-dev-problem" and check the README for development and deploy instructions!

Then running npm run dev

โ–ถ npm run dev

> dev
> remix dev -c "node ./server/dev-server.js" --no-restart

Loading environment variables from .env
๐Ÿ’ฟ Building...
๐Ÿ’ฟ Built in 1.3s
Waiting for app server (26682627)
> node ./server/dev-server.js
Remix dev server ready
node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: spawn tsx watch --clear-screen=false --ignore "app/**" --ignore "build/**" --ignore "node_modules/**" --inspect ./index.js ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn tsx watch --clear-screen=false --ignore "app/**" --ignore "build/**" --ignore "node_modules/**" --inspect ./index.js',
  path: 'tsx watch --clear-screen=false --ignore "app/**" --ignore "build/**" --ignore "node_modules/**" --inspect ./index.js',
  spawnargs: []
}

Node.js v18.15.0

OS, Binaries, packages:

This is my environment.

โ–ถ npx envinfo --system --binaries --browsers --npmPackages "execa,@remix-run/dev"

  System:
    OS: macOS 12.6
    CPU: (10) arm64 Apple M1 Pro
    Memory: 95.98 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Brave Browser: 96.1.33.106
    Chrome: 114.0.5735.90
    Firefox: 105.0.1
    Safari: 16.0
  npmPackages:
    @remix-run/dev: 1.16.1 => 1.16.1
    execa: ^7.1.1 => 7.1.1

I am unfortunately unfamiliar with execa so I couldn't find the cause of the problem but when the process spawn it seems that it doesn't find the ./index.js file? It may well be my setup, but I don't have any clue for now ๐Ÿ˜…

Manually rollback to previous version of the script

If anybody is facing the same problem, you can update your package.json dev scripts to the previous versions

    "dev": "remix dev -c \"npm run dev:server\" --no-restart",
    "dev:server": "cross-env MOCKS=true tsx watch --clear-screen=false --ignore \"app/**\" --ignore \"build/**\" --ignore \"node_modules/**\" ./index.js",

Fix flaky tests

After fixing the flaky logout, the logout POST request is not canceled in the browser anymore, but it's still aborted on Playwright tests. This causes the test to be flaky.

//...
await page.getByRole('link', { name: user.name ?? user.username }).click()
await page.getByRole('menuitem', { name: /logout/i }).click()
await expect(page).toHaveURL(`/`) // ๐Ÿ‘ˆ This doesn't help

await page.goto('/login')
await expect(page).toHaveURL(`/login`)
//...

Screenshot 2023-06-15 at 11 02 35

dependency check

running npx depcheck reveals some unused and missing dependencies

Unused dependencies

  • @radix-ui/react-popover
  • @radix-ui/react-separator
  • @radix-ui/react-tabs
  • @reach/dialog
  • downshift
  • remix-auth-socials
  • spin-delay

Missing dependencies

  • esbuild: .\other\build-server.ts

there are also report for Unused devDependencies but i don't sure how to check if those are really unused

Unused devDependencies
  • @remix-run/testing
  • @testing-library/dom
  • @testing-library/jest-dom
  • @testing-library/react
  • @testing-library/user-event
  • @types/eslint
  • @types/testing-library__jest-dom
  • @types/uuid
  • @vitest/coverage-c8
  • autoprefixer
  • c8
  • postcss
  • prettier-plugin-sql
  • prettier-plugin-tailwindcss
  • tailwindcss
  • tailwindcss-radix
  • tsconfig-paths
  • vitest-mock-extende

Outdated dependencies
@faker-js/faker ^7.6.0 โ†’ ^8.0.1 ๐Ÿ”ด
@remix-run/router ^1.6.1 โ†’ ^1.6.2
@testing-library/dom ^9.2.0 โ†’ ^9.3.0
@types/cookie ^0.5.0 โ†’ ^0.5.1
@types/glob 7.2.0 โ†’ 8.1.0
@types/node ^18.16.3 โ†’ ^20.2.1
@vitest/coverage-c8 ^0.31.0 โ†’ ^0.31.1
chalk ^4.1.2 โ†’ ^5.2.0 ๐Ÿ”ด
glob ^7.2.3 โ†’ ^10.2.5 ๐Ÿ”ด
lru-cache ^7.18.3 โ†’ ^9.1.1 ๐Ÿ”ด
prettier-plugin-tailwindcss ^0.2.8 โ†’ ^0.3.0
vite ^4.3.5 โ†’ ^4.3.8
vitest ^0.31.0 โ†’ ^0.31.1

we can upgrade to chalk 5.2.0 now that we are using ESM
why you are still using year old glob?

vitest afterAll fails on Windows

vitest afterAll fails on Windows: fs.promises.rm(DATABASE_PATH)

 FAIL  app/utils/encryption.server.test.ts [ app/utils/encryption.server.test.ts ]
Error: EBUSY: resource busy or locked, unlink 'C:\projects\kcd-apps\epic-stack\prisma\test\data.2.db'
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ
Serialized Error: {
  "code": "EBUSY",
  "errno": -4082,
  "path": "C:\projects\kcd-apps\epic-stack\prisma\test\data.2.db",
  "syscall": "unlink",
}
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ[1/2]โŽฏ

 FAIL  app/routes/resources+/delete-image.test.tsx [ app/routes/resources+/delete-image.test.tsx ]
Error: EBUSY: resource busy or locked, unlink 'C:\projects\kcd-apps\epic-stack\prisma\test\data.1.db'
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ
Serialized Error: {
  "code": "EBUSY",
  "errno": -4082,
  "path": "C:\projects\kcd-apps\epic-stack\prisma\test\data.1.db",
  "syscall": "unlink",
}
โŽฏโŽฏ

can create project using this template

the error message after I run npx create-remix@latest --typescript --install --template epicweb-dev/epic-stack

๐Ÿšจ The template could not be verified because you do not have access to the repository. Please double check the access rights of this repo and try again.

esbuild WARNING

I see this on Windows 10.

โ–ฒ [WARNING] "tsconfig.json" does not affect esbuild's own target setting [tsconfig.json]

    tsconfig.json:11:4:
      11 โ”‚     "target": "ES2022",
         โ•ต     ~~~~~~~~

  This is because esbuild supports reading from multiple "tsconfig.json" files within a single
  build, and using different language targets for different files in the same build wouldn't be
  correct. If you want to set esbuild's language target, you should use esbuild's own global
  "target" setting such as with "target: 'es2022'".

we use esbuild - version 0.18.5, only for server-build/index.js, the rest of the code is handle by remix with its esbuild - version 0.17.6
esbuild changelog - indicate that esbuild no longer use tsconfig.json target as its target.

I think it is bet to keep our version of esbuild in-sync with remix version. when remix will update to esbuild version 18+ we can drop the target from our tsconfig.json

Mailgun's integration

Mailgun's integration could be improved with a few points:

  • Remind setting MAILGUN_DOMAIN and MAILGUN_SENDING_KEY in .env. This is useful for local production.
  • Mailgun's API endpoint changes for Europe from api.mailgun.net to api.eu.mailgun.net, otherwise you'll get an Unauthorized, even with correct credentials.
  • Test mocks are also using a hard-coded api.mailgun.net that needs to change to api.eu.mailgun.net if you're in EU.

(I'll add more stuff to the list as it comes up)

Background jobs?

First of all, lots of cool ideas here, thank you for sharing it with the world.

One common use case I'm not seeing a solution for in the roadmap yet (though I may have missed it): Are there plans to support cron jobs (scheduled tasks), background jobs, etc?

Things like: "At 5am, compute and send this daily report to all subscribers"

This would help performance by offloading computationally intensive tasks. It would also be useful for common scenarios from automating routine maintenance tasks to queueing up and performing long-running work in the background.

Any plans for supporting this?

Upgrade to Native ESM

I'm pretty sure we want to use native ESM in this project. I believe Remix v2 will default to native ESM. It may be more trouble than it's worth, but I think it's worth looking into.

Zod: async function during sync operation

The signup page is showing this error:

Screenshot 2023-05-26 at 11 01 31

I'm not familiar enough with Conform and Zod to know how to fix this, but I think this pertains to the isEmailUnique() function being async, but the client-side validation running sync.

Implement Logging solution

In keeping with our avoid third party services principle, I'd like to find whether there's a good way to keep logs for easy retrieval and analysis later.

I've thought about doing this as a process running on the same VM, but that will miss startup logging and runs into limitations with combining logs from multiple instances. So we'll probably want this as a separate service.

However, I'd like to avoid signing up for an account on another service and I'd instead like to run something ourselves on Fly which I expect would be cheaper than using a hosted service and shouldn't take any more time. Fly has https://github.com/superfly/fly-log-shipper which allows for easy forwarding of logs to a running service. I think we just need to look for a good tool that allows for reviewing logs.

I would be willing to require signup for another service if it is sufficiently complex or costly to deploy and maintain our own running service.

Suggestions are welcome.

MSW not intercepting fetch requests

Hello everyone ๐Ÿ‘‹,

I have been refactoring my Remix App to use this stack (mainly for Mocking with MSW & e2e playwright tests).

Unfortunately, mocking data created in MSW Handler does not seem to intercept request from playwright test despite MOCKS variable being set to true in start:mocks command.

Am I missing something ?

Check actions here : https://github.com/Varkoff/epic-stack-msw/actions/runs/4949407241

Code snippets :

/** getMockData.spec.ts **/
import { test, expect } from '@playwright/test'

test('Test that Mocks are running', async ({ page }) => {
	// Accessing our Remix resource route '/data', calling an external http://example.com/posts API
	const [data] = await Promise.all([
		page.waitForResponse(`/data`).then(res => res.json()),
		page.goto(`/data`),
	])

	// response should contain objects
	expect(data).toBeInstanceOf(Array)
	expect(data.length).toEqual(1)
	const [firstPost] = data
	expect(firstPost.id).toEqual(18)
	expect(firstPost.title).toEqual('Mocked post')
})
/** mocks/index.ts **/
import { rest } from 'msw'
import { setupServer } from 'msw/node'
import closeWithGrace from 'close-with-grace'
import { requiredHeader, writeEmail } from './utils'

const handlers = [
	rest.get('http://example.com/posts', (req, res, ctx) => {
		return res(
			ctx.json([
				{
					id: 18,
					title: 'Mocked post',
				},
			]),
			ctx.status(200),
		)
	}),
].filter(Boolean)

const server = setupServer(...handlers)

server.listen({ onUnhandledRequest: 'warn' })
console.info('๐Ÿ”ถ Mock server installed')

closeWithGrace(() => {
	server.close()
})

Warning: Prop `href` did not match on accented usernames

Probably not a big deal, but usernames can be accented and this causes a href mismatch between the server and the client, because the href is URL encoded client-side:

Screenshot 2023-05-26 at 08 37 40

Should be a quick fix. I think the right approach would be to explicitly URL encode the href.

Use Fly Statics for static assets

The web server can handle the static files well without issue, but it would be nice to use Fly's static assets to free up traffic on our web server: https://fly.io/docs/reference/configuration/#the-statics-sections

Unfortunately this is on hold for now due to the caveat that you cannot specify cache headers so the browser will have to re-request these assets every time which will lead to worse perf in practice.

Having our web server handle these is fine, but we'll want to keep an eye on this feature for when it does allow specifying custom cache-control headers.

`npm run dev` -> `TypeError: routeSegments.at is not a function`

Wanted to try out the stack, installed via the getting-started.md instructions. Ran the setup command, and then tried to boot up the server (without touching any files or code) and got this:

โžœ npm run dev

> dev
> remix dev -c "npm run dev:server" --no-restart

TypeError: routeSegments.at is not a function
    at getRouteSegments (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:356:23)
    at getRouteInfo (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:210:25)
    at /Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:119:33
    at defaultVisitFiles (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:382:13)
    at defaultVisitFiles (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:379:13)
    at _flatRoutes (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:113:9)
    at flatRoutes (/Users/timothymalcham/dev/uu/node_modules/remix-flat-routes/dist/index.js:44:20)
    at Object.routes (file:///Users/timothymalcham/dev/uu/remix.config.js:22:10)
    at Object.readConfig (/Users/timothymalcham/dev/uu/node_modules/@remix-run/dev/dist/config.js:248:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Is there a recommended way of resolving this?

fix stylesheet types

'fontStylestylesheetUrl' is deprecated.ts(6385) client.d.ts(42, 6): The declaration was marked as deprecated here.

-  import fontStylestylesheetUrl from './styles/font.css'
-  import tailwindStylesheetUrl from './styles/tailwind.css'
+  import fontStylestylesheetUrl from './styles/font.css?inline'
+  import tailwindStylesheetUrl from './styles/tailwind.css?inline'

why we need this duplication in the same function?

epic-stack/app/root.tsx

Lines 40 to 43 in f21bbe9

// Preload CSS as a resource to avoid render blocking
{ rel: 'preload', href: fontStylestylesheetUrl, as: 'style' },
{ rel: 'preload', href: tailwindStylesheetUrl, as: 'style' },
cssBundleHref ? { rel: 'preload', href: cssBundleHref, as: 'style' } : null,

epic-stack/app/root.tsx

Lines 63 to 65 in f21bbe9

{ rel: 'stylesheet', href: fontStylestylesheetUrl },
{ rel: 'stylesheet', href: tailwindStylesheetUrl },
cssBundleHref ? { rel: 'stylesheet', href: cssBundleHref } : null,

Playwright e2e tests are visually broken

Super awesome feature Kent, thanks! I'm already using it on my platform ๐ŸŽ‰

However, even thought the e2e tests pass, they are visually broken as the Tailwind class CSS is not being injected onto the page:
Screenshot 2023-06-03 at 12 11 06

Update:

I've tracked the issue to the window.location.reload() line on the injected script.

Originally posted by @andrecasal in #64 (comment)

LiteFS not working

I created a demo app to test the stack, followed the instructions steps to deploy to Fly but seems like something related to LiteFS is not working.

The Deploy action fails with a timeout: https://github.com/ananni13/epic-demo/actions/runs/5110312304/jobs/9186104446

Error: timeout reached waiting for healthchecks to pass for machine e2865eddb7d278 failed to get VM e2865eddb7d278: Get "https://api.machines.dev/v1/apps/epic-demo-c661/machines/e2865eddb7d278": net/http: request canceled

Checking the app logs in Fly I see this message logged every second in a loop:

2023-05-29T09:14:53.283 app[e2865eddb7d278] sjc [info] A28237BB490D58F0: cannot acquire lease or find primary, retrying: fetch primary url: Get "http://127.0.0.1:8500/v1/kv/litefs/epic-demo-c661": dial tcp 127.0.0.1:8500: connect: connection refused

Init script incompatible with github user-based URLs

When using github fine-grained tokens instead of personal access tokens (now designated as "legacy" by github), you need to create a token for each account (personal and org), as these new token types cannot be scoped beyond a single account

Then, when cloning and working locally with git CLI, the CLI will only allow you to use one of these tokens as default. If your personal account is used by default and you want to work with a repo in an org, you need to use the org's name as your git username, e.g.

git clone https://[email protected]/myorg/myrepo

When I use this style of repo URL with the init script, it seems to be converted by the init script into [email protected]/myorg/myrepo, which will fail as git will attempt to connect to the repo using the default token, and not the token created for "myorg" - this will cause the initial setup script to fail at the git push step

Proposal to Disable ESLint Caching due to Potential Bugs with typescript-eslint

Hey there,

Really appreciate all the work you're doing on this package. It's been super useful for me!

So, here's the thing: I've been running into some hiccups with ESLint caching when using typescript-eslint. It's like ESLint caching doesn't quite play nice with typescript-eslint. Some changes, especially minor ones in TypeScript types, interfaces, and such, sometimes slip through the cracks. ESLint doesn't always lint these properly because of its caching.

There's already a discussion about this problem over on the TypeScript-ESLint repo (see #6373). It seems like the best way to get around this issue is to turn off ESLint caching for this package.

Sure, turning off caching might slow things down a bit, but I think it's worth it to avoid any sneaky bugs.

Would love to hear your thoughts on this.

Cheers,
Chris

React18 Suspense violate CSP script-src

I use React18 Suspense for my application. When I refreshed the whole page I got an error message below.

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'strict-dynamic' 'self' 'nonce-3d8ea51c7c94e7d047c71b5f52a6be5d'". Either the 'unsafe-inline' keyword, a hash ('sha256-t+32sreM3IZd/ngtsiPnbI+mF2Uv+Bcnx/8eVsE5w7s='), or a nonce ('nonce-...') is required to enable inline execution.

I get "refspec main does not match any" on setup

Hi!
I was just trying out this awesome stack. Its basically a perfect match for me :)

But when Im following all the scripts i get "refspec main does not match any. " when the script is trying to setup git actions. After i set the FLY_API_TOKEN.

error: src refspec main does not match any.
error: failed to push some refs to '[email protected]:iamrane/epic.git'
Error: Command failed with exit code 1: git push -u origin main
    at makeError (file:///Users/my-user/epic/remix.init/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///Users/my-user/epic/remix.init/node_modules/execa/index.js:124:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async setupDeployment (file:///Users/my-user/epic/remix.init/index.mjs:260:4)
    at async main (file:///Users/my-user/epic/remix.init/index.mjs:87:2)
    at async module.exports (/Users/my-user/epic/remix.init/index.js:3:2)
    at async Object.init (/Users/my-user/.npm/_npx/5164864a48bff686/node_modules/@remix-run/dev/dist/cli/commands.js:144:5)
    at async Object.run (/Users/my-user/.npm/_npx/5164864a48bff686/node_modules/@remix-run/dev/dist/cli/run.js:449:13) {
  shortMessage: 'Command failed with exit code 1: git push -u origin main',

git push -u origin main is not working when im doing it in the terminal, I need to run git branch -M main first. Then it works. Is there some kind of config when Im creating the repository I need to have in order?

I'm using node 18.

Make it possible to mock client-side API calls

The mocks directory currently only mocks server side requests.

It is intended to enable local development without internet access.

However, if you need to do API requests on the client-side, we loose this ability.

Context

One valid reason for having to do client-side API requests - even when using Remix - can be if you have large file uploads.

Using multipart form data forces you to save the file in memory on the server at least temporarily. If you have many people uploading medium-size files, or one person uploading a large file, it can blow up your Fly.io instance.

Therefore, you'll need to directly upload, e.g. to S3 from the client.

I'm sure there are more use cases, but this one is fresh on my mind since I ran into it on the weekend.

Proposal: Use shadcn UI components

shadcn has come up with a set of good UI components that align closely with the current choices of epic-stack.

Refer:

At the core, it's nothing but wrappers around Radix UI components with Tailwindcss for styling.

Pros:

  • Could remove some of the hassles around starting a new project, which is one of the things epic-stack could help with.
  • Comes with theming and complete customizability. We can just pick and choose the radix components to use, just like the radix components in use currently.

Cons:

  • Could be a little opinionated for some, but I guess it could be a good one to consider.
  • Could add a few more dependencies

Hydration error when rendering input fields

It seems that there is a hydration or value mismatch on input fields rendered. 2 places that I have noticed is on the login page and /users/kody/notes/new page

Here is the warning that I see on the browser console:

react-dom.development.js:86 Warning: Proprequireddid not match. Server: "null" Client: "true" at input at div at Field (http://localhost:3000/build/_shared/chunk-BSZPZSYR.js:962:3) at form at http://localhost:3000/build/_shared/chunk-BCML5FIO.js:4972:9 at fetcher.Form at NoteEditor (http://localhost:3000/build/_shared/chunk-PDY3WINQ.js:73:3) at NewNoteRoute at RemixRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:5795:3) at RenderedRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3482:5) at Outlet (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3810:26) at main at div at div at NotesRoute (http://localhost:3000/build/routes/users+/$username_+/notes-JGNJTVY3.js:61:16) at RemixRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:5795:3) at RenderedRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3482:5) at RenderErrorBoundary (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:4029:9) at Outlet (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3810:26) at div at body at html at App (http://localhost:3000/build/root-3JJ2C4UT.js:3216:16) at RemixRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:5795:3) at RenderedRoute (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3482:5) at RenderErrorBoundary (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:4029:9) at DataRoutes (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3745:5) at Router (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3817:15) at RouterProvider (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:3701:5) at RemixErrorBoundary (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:5357:5) at RemixBrowser (http://localhost:3000/build/_shared/chunk-BCML5FIO.js:7307:40)

Adding a console.log statement on the note-editor, I see the following:
Server-side

conform input { id: 'note-editor-title', name: 'title', form: 'note-editor', required: undefined, type: undefined, minLength: undefined, maxLength: undefined, min: undefined, max: undefined, step: undefined, pattern: undefined, multiple: undefined, defaultValue: undefined }

On the client:

conform input { defaultValue: undefined, form: "note-editor", id: "note-editor-title", max: undefined, maxLength: undefined, min: undefined, minLength: 1, multiple: undefined, name: "title", pattern: undefined, required: true, step: undefined, type: undefined, }

@edmundhung could this be a conform thing or something else from how react components are rendered?

Proposal: Creating a CLI to initialise epic-stack

Epic-stack is amazing. What will help it reach a wider audience is having a scaffolding CLI which helps users get started faster.

Enter create-epic-stack. People would be able to run npm create epic-stack or yarn create epic-stack to get started locally.

For reference, I can use create-t3-app. Let me know if I can try this out!

No route matches url "/mockServiceWorker.js"

I get this error for every route. Setup a fresh instance of Epic Stack to confirm and this is the first thing that comes up.

GET / 200 - - 28.852 ms
ErrorResponse {
  status: 404,
  statusText: 'Not Found',
  internal: true,
  data: 'Error: No route matches URL "/mockServiceWorker.js"',
  error: Error: No route matches URL "/mockServiceWorker.js"
      at getInternalRouterError (/temp/epicstack/epicstack/node_modules/@remix-run/router/dist/router.cjs.js:11:81684)
      at Object.query (/temp/epicstack/epicstack/node_modules/@remix-run/router/dist/router.cjs.js:11:59891)
      at handleDocumentRequestRR (/temp/epicstack/epicstack/node_modules/@remix-run/server-runtime/dist/server.js:11:4509)
      at requestHandler (/temp/epicstack/epicstack/node_modules/@remix-run/server-runtime/dist/server.js:11:1850)
      at /temp/epicstack/epicstack/node_modules/@remix-run/express/dist/server.js:11:426
}
No routes matched location "/mockServiceWorker.js" 
GET /mockServiceWorker.js 404 - - 56.179 ms

The route does load, but every request is accompanied by this error log.

Automatically install Playwright browsers

Discussed in #93

Originally posted by andrecasal May 24, 2023
I wanted to know why my Playwright tests were not running locally and then realized I had no browsers installed.

Wouldn't we want the browsers installed from the start?

Close modal redirection

Hello,

First of all, thank you for this stack.

I noticed that when you click outside of a modal (not on 'close'), such as the one for changing the profile picture, it redirects back to the home page rather than staying on the current page where the modal is located.

Best regards and keep up the great work maintaining this stack.

Proposal: Include Decision Record for Choosing GitHub Actions

In my opinion it's worth adding a decision record document outlining why the Epic Stack chooses to make use of GitHub and its actions as the official repository. This addition would promote transparency, inclusivity for non-GitHub users, and provide valuable insights for newcomers and contributors. Thank you for considering this proposal to further enhance the accessibility and adoption of the Epic Stack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.