Repository: echobind/bisonapp
Pull request #316 (2023-04-28 15:31:32)

feat: add src directory
Adds `src` directory.

## Changes

<h2>Changes</h2>

- Reorganizes to use `src` directory: https://github.com/echobind/bisonapp/tree/feat/src-directory/packages/create-bison-app/template
- Moves `tests/factories` to `prisma/factories`
- tsconfig path changes:
     ```
   "paths": {
      "~/*": ["./*"],
      "@/*": ["./src/*"]
    }
    ```





## Checklist

- [ ] Requires dependency update?
- [x] Generating a new app works



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22a58b4..8f41b5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,14 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+## 1.13.0-canary.23 (2023-04-28)
+
+**Note:** Version bump only for package root
+
+
+
+
+
 ## 1.13.0-canary.22 (2023-04-21)
 
 **Note:** Version bump only for package root
diff --git a/lerna.json b/lerna.json
index ed51243..435c289 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
 {
-  "version": "1.13.0-canary.22",
+  "version": "1.13.0-canary.23",
   "npmClient": "yarn",
   "useWorkspaces": true,
   "packages": [
diff --git a/packages/create-bison-app/CHANGELOG.md b/packages/create-bison-app/CHANGELOG.md
index 04d0cec..2d72122 100644
--- a/packages/create-bison-app/CHANGELOG.md
+++ b/packages/create-bison-app/CHANGELOG.md
@@ -3,6 +3,14 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+## 1.13.0-canary.23 (2023-04-28)
+
+**Note:** Version bump only for package create-bison-app
+
+
+
+
+
 ## 1.13.0-canary.22 (2023-04-21)
 
 **Note:** Version bump only for package create-bison-app
diff --git a/packages/create-bison-app/package.json b/packages/create-bison-app/package.json
index f7b3600..d9d19fc 100644
--- a/packages/create-bison-app/package.json
+++ b/packages/create-bison-app/package.json
@@ -1,6 +1,6 @@
 {
   "name": "create-bison-app",
-  "version": "1.13.0-canary.22",
+  "version": "1.13.0-canary.23",
   "description": "Creates a production-ready full-stack Jamstack app",
   "license": "MIT",
   "repository": "echobind/bisonapp",
diff --git a/packages/create-bison-app/tasks/copyFiles.js b/packages/create-bison-app/tasks/copyFiles.js
index 2d5b408..bdb73ef 100644
--- a/packages/create-bison-app/tasks/copyFiles.js
+++ b/packages/create-bison-app/tasks/copyFiles.js
@@ -7,12 +7,14 @@ const { copyDirectoryWithTemplate } = require('../utils/copyDirectoryWithTemplat
 
 const templateFolder = path.join(__dirname, '..', 'template');
 const fromPath = (file) => path.join(templateFolder, file);
+const fromSrcPath = (file) => path.join(templateFolder, 'src', file);
 
 /**
  * Copies files based on variables and a target folder
  */
 async function copyFiles({ variables, targetFolder }) {
   const toPath = (file) => path.join(targetFolder, file);
+  const toSrcPath = (file) => path.join(targetFolder, 'src', file);
 
   // Files to render when using Heroku
   const isHeroku = variables.host.name === 'heroku';
@@ -51,10 +53,10 @@ async function copyFiles({ variables, targetFolder }) {
 
     copyDirectoryWithTemplate(fromPath('.github'), toPath('.github'), variables),
 
-    copyDirectoryWithTemplate(fromPath('pages'), toPath('pages'), variables),
+    copyDirectoryWithTemplate(fromSrcPath('pages'), toSrcPath('pages'), variables),
     copyDirectoryWithTemplate(fromPath('prisma'), toPath('prisma'), variables),
 
-    copyDirectoryWithTemplate(fromPath('server'), toPath('server'), variables),
+    copyDirectoryWithTemplate(fromSrcPath('server'), toSrcPath('server'), variables),
 
     copyDirectoryWithTemplate(fromPath('tests'), toPath('tests'), variables),
 
@@ -65,23 +67,13 @@ async function copyFiles({ variables, targetFolder }) {
         '__mocks__',
         '_templates',
         '.vscode',
-        'components',
-        'context',
-        'hooks',
-        'layouts',
-        'lib',
         'prisma',
         'public',
         'scripts',
-        'services',
-        'styles',
-        'types',
-        'utils',
         '.eslintrc.js',
         '.hygen.js',
         '.nvmrc',
         '.tool-versions',
-        'constants.ts',
         'jest.config.js',
         'playwright.config.ts',
         'next-env.d.ts',
@@ -90,7 +82,6 @@ async function copyFiles({ variables, targetFolder }) {
         'tsconfig.cjs.json',
         'tailwind.config.js',
         'postcss.config.js',
-        'config.ts',
       ],
       targetFolder,
       {
@@ -100,6 +91,29 @@ async function copyFiles({ variables, targetFolder }) {
         parents: true,
       }
     ),
+
+    cpy(
+      [
+        'components',
+        'context',
+        'hooks',
+        'layouts',
+        'lib',
+        'services',
+        'styles',
+        'types',
+        'utils',
+        'config.ts',
+        'constants.ts',
+      ],
+      path.join(targetFolder, 'src'),
+      {
+        cwd: path.join(templateFolder, 'src'),
+        dot: true,
+        // preserve path
+        parents: true,
+      }
+    ),
   ]);
 }
 
diff --git a/packages/create-bison-app/template/tests/factories/index.ts b/packages/create-bison-app/template/prisma/factories/index.ts
similarity index 100%
rename from packages/create-bison-app/template/tests/factories/index.ts
rename to packages/create-bison-app/template/prisma/factories/index.ts
diff --git a/packages/create-bison-app/template/tests/factories/user.ts b/packages/create-bison-app/template/prisma/factories/user.ts
similarity index 100%
rename from packages/create-bison-app/template/tests/factories/user.ts
rename to packages/create-bison-app/template/prisma/factories/user.ts
diff --git a/packages/create-bison-app/template/prisma/scripts/exampleUserScript.ts b/packages/create-bison-app/template/prisma/scripts/exampleUserScript.ts
index 6662c2a..506c182 100644
--- a/packages/create-bison-app/template/prisma/scripts/exampleUserScript.ts
+++ b/packages/create-bison-app/template/prisma/scripts/exampleUserScript.ts
@@ -1,7 +1,7 @@
 import { Prisma, Role } from '@prisma/client';
 
+import { seedUsers } from '~/prisma/seeds/users';
 import { hashPassword } from '@/services/auth';
-import { seedUsers } from '@/prisma/seeds/users';
 import { prisma } from '@/lib/prisma';
 
 // HR: Hey, we've had a few more employees join -- can you create an account for them?!
diff --git a/packages/create-bison-app/template/components/AllProviders.tsx b/packages/create-bison-app/template/src/components/AllProviders.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/AllProviders.tsx
rename to packages/create-bison-app/template/src/components/AllProviders.tsx
diff --git a/packages/create-bison-app/template/components/CenteredBoxForm.tsx b/packages/create-bison-app/template/src/components/CenteredBoxForm.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/CenteredBoxForm.tsx
rename to packages/create-bison-app/template/src/components/CenteredBoxForm.tsx
diff --git a/packages/create-bison-app/template/components/ErrorText.tsx b/packages/create-bison-app/template/src/components/ErrorText.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ErrorText.tsx
rename to packages/create-bison-app/template/src/components/ErrorText.tsx
diff --git a/packages/create-bison-app/template/components/Footer.tsx b/packages/create-bison-app/template/src/components/Footer.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/Footer.tsx
rename to packages/create-bison-app/template/src/components/Footer.tsx
diff --git a/packages/create-bison-app/template/components/FullPageSpinner.tsx b/packages/create-bison-app/template/src/components/FullPageSpinner.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/FullPageSpinner.tsx
rename to packages/create-bison-app/template/src/components/FullPageSpinner.tsx
diff --git a/packages/create-bison-app/template/components/Logo.tsx b/packages/create-bison-app/template/src/components/Logo.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/Logo.tsx
rename to packages/create-bison-app/template/src/components/Logo.tsx
diff --git a/packages/create-bison-app/template/components/Nav.tsx b/packages/create-bison-app/template/src/components/Nav.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/Nav.tsx
rename to packages/create-bison-app/template/src/components/Nav.tsx
diff --git a/packages/create-bison-app/template/components/auth/LoginForm.tsx b/packages/create-bison-app/template/src/components/auth/LoginForm.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/auth/LoginForm.tsx
rename to packages/create-bison-app/template/src/components/auth/LoginForm.tsx
diff --git a/packages/create-bison-app/template/components/auth/PasswordField.tsx b/packages/create-bison-app/template/src/components/auth/PasswordField.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/auth/PasswordField.tsx
rename to packages/create-bison-app/template/src/components/auth/PasswordField.tsx
diff --git a/packages/create-bison-app/template/components/auth/SignUpForm.tsx b/packages/create-bison-app/template/src/components/auth/SignUpForm.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/auth/SignUpForm.tsx
rename to packages/create-bison-app/template/src/components/auth/SignUpForm.tsx
diff --git a/packages/create-bison-app/template/components/errors/GenericError.tsx b/packages/create-bison-app/template/src/components/errors/GenericError.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/errors/GenericError.tsx
rename to packages/create-bison-app/template/src/components/errors/GenericError.tsx
diff --git a/packages/create-bison-app/template/components/ui/Button.tsx b/packages/create-bison-app/template/src/components/ui/Button.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/Button.tsx
rename to packages/create-bison-app/template/src/components/ui/Button.tsx
diff --git a/packages/create-bison-app/template/components/ui/Input.tsx b/packages/create-bison-app/template/src/components/ui/Input.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/Input.tsx
rename to packages/create-bison-app/template/src/components/ui/Input.tsx
diff --git a/packages/create-bison-app/template/components/ui/Label.tsx b/packages/create-bison-app/template/src/components/ui/Label.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/Label.tsx
rename to packages/create-bison-app/template/src/components/ui/Label.tsx
diff --git a/packages/create-bison-app/template/components/ui/NavigationMenu.tsx b/packages/create-bison-app/template/src/components/ui/NavigationMenu.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/NavigationMenu.tsx
rename to packages/create-bison-app/template/src/components/ui/NavigationMenu.tsx
diff --git a/packages/create-bison-app/template/components/ui/Toast.tsx b/packages/create-bison-app/template/src/components/ui/Toast.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/Toast.tsx
rename to packages/create-bison-app/template/src/components/ui/Toast.tsx
diff --git a/packages/create-bison-app/template/components/ui/Toaster.tsx b/packages/create-bison-app/template/src/components/ui/Toaster.tsx
similarity index 100%
rename from packages/create-bison-app/template/components/ui/Toaster.tsx
rename to packages/create-bison-app/template/src/components/ui/Toaster.tsx
diff --git a/packages/create-bison-app/template/config.ts b/packages/create-bison-app/template/src/config.ts
similarity index 100%
rename from packages/create-bison-app/template/config.ts
rename to packages/create-bison-app/template/src/config.ts
diff --git a/packages/create-bison-app/template/constants.ts b/packages/create-bison-app/template/src/constants.ts
similarity index 100%
rename from packages/create-bison-app/template/constants.ts
rename to packages/create-bison-app/template/src/constants.ts
diff --git a/packages/create-bison-app/template/hooks/useDisclosure.ts b/packages/create-bison-app/template/src/hooks/useDisclosure.ts
similarity index 100%
rename from packages/create-bison-app/template/hooks/useDisclosure.ts
rename to packages/create-bison-app/template/src/hooks/useDisclosure.ts
diff --git a/packages/create-bison-app/template/hooks/useToast.tsx b/packages/create-bison-app/template/src/hooks/useToast.tsx
similarity index 100%
rename from packages/create-bison-app/template/hooks/useToast.tsx
rename to packages/create-bison-app/template/src/hooks/useToast.tsx
diff --git a/packages/create-bison-app/template/layouts/LoggedIn.tsx b/packages/create-bison-app/template/src/layouts/LoggedIn.tsx
similarity index 100%
rename from packages/create-bison-app/template/layouts/LoggedIn.tsx
rename to packages/create-bison-app/template/src/layouts/LoggedIn.tsx
diff --git a/packages/create-bison-app/template/layouts/LoggedOut.tsx b/packages/create-bison-app/template/src/layouts/LoggedOut.tsx
similarity index 79%
rename from packages/create-bison-app/template/layouts/LoggedOut.tsx
rename to packages/create-bison-app/template/src/layouts/LoggedOut.tsx
index 275141c..11a773c 100644
--- a/packages/create-bison-app/template/layouts/LoggedOut.tsx
+++ b/packages/create-bison-app/template/src/layouts/LoggedOut.tsx
@@ -15,10 +15,8 @@ export function LoggedOutLayout({ children }: Props) {
         <div className="flex justify-between items-center p-4">
           <Logo />
 
-          <Link href="/login" passHref>
-            <a className={buttonVariants({ variant: 'outline' })} href="/login">
-              Login
-            </a>
+          <Link className={buttonVariants({ variant: 'outline' })} href="/login" passHref>
+            Login
           </Link>
         </div>
       </>
diff --git a/packages/create-bison-app/template/tsconfig.json b/packages/create-bison-app/template/tsconfig.json
index 5b1ea19..0b5830f 100644
--- a/packages/create-bison-app/template/tsconfig.json
+++ b/packages/create-bison-app/template/tsconfig.json
@@ -19,7 +19,8 @@
     "rootDir": ".",
     "baseUrl": ".",
     "paths": {
-      "@/*": ["./*"]
+      "~/*": ["./*"],
+      "@/*": ["./src/*"]
     },
     "incremental": true
   },
diff --git a/packages/create-bison-app/utils/copyDirectoryWithTemplate.js b/packages/create-bison-app/utils/copyDirectoryWithTemplate.js
index 1eeb778..6ea49c5 100644
--- a/packages/create-bison-app/utils/copyDirectoryWithTemplate.js
+++ b/packages/create-bison-app/utils/copyDirectoryWithTemplate.js
@@ -28,7 +28,7 @@ async function copyDirectoryWithTemplate(from, to, variables) {
 
   // Glob patterns can only contain forward-slashes (even on Windows)
   const globPattern = `${from.replace(/\\/g, '/')}/**`;
-  const files = await globby([globPattern], { expandDirectories: true });
+  const files = await globby([globPattern], { expandDirectories: true, dot: true });
 
   return await Promise.all(
     files.map(async (file) => {


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0b070d1..ea9adaa 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -65,7 +65,7 @@ jobs:
 
     steps:
       - name: Download bison app
-        uses: actions/download-artifact@v2
+        uses: actions/download-artifact@v3
         with:
           name: ${{ needs.create-app.outputs.appName }}
 
diff --git a/packages/create-bison-app/template/lib/cookies.ts b/packages/create-bison-app/template/src/lib/cookies.ts
similarity index 100%
rename from packages/create-bison-app/template/lib/cookies.ts
rename to packages/create-bison-app/template/src/lib/cookies.ts
diff --git a/packages/create-bison-app/template/lib/prisma.ts b/packages/create-bison-app/template/src/lib/prisma.ts
similarity index 100%
rename from packages/create-bison-app/template/lib/prisma.ts
rename to packages/create-bison-app/template/src/lib/prisma.ts
diff --git a/packages/create-bison-app/template/lib/type-witchcraft.ts b/packages/create-bison-app/template/src/lib/type-witchcraft.ts
similarity index 100%
rename from packages/create-bison-app/template/lib/type-witchcraft.ts
rename to packages/create-bison-app/template/src/lib/type-witchcraft.ts
diff --git a/packages/create-bison-app/template/lib/utils.ts b/packages/create-bison-app/template/src/lib/utils.ts
similarity index 100%
rename from packages/create-bison-app/template/lib/utils.ts
rename to packages/create-bison-app/template/src/lib/utils.ts
diff --git a/packages/create-bison-app/template/pages/_app.tsx b/packages/create-bison-app/template/src/pages/_app.tsx
similarity index 100%
rename from packages/create-bison-app/template/pages/_app.tsx
rename to packages/create-bison-app/template/src/pages/_app.tsx
diff --git a/packages/create-bison-app/template/pages/api/auth/[...nextauth].ts b/packages/create-bison-app/template/src/pages/api/auth/[...nextauth].ts
similarity index 100%
rename from packages/create-bison-app/template/pages/api/auth/[...nextauth].ts
rename to packages/create-bison-app/template/src/pages/api/auth/[...nextauth].ts
diff --git a/packages/create-bison-app/template/pages/api/health.ts b/packages/create-bison-app/template/src/pages/api/health.ts
similarity index 100%
rename from packages/create-bison-app/template/pages/api/health.ts
rename to packages/create-bison-app/template/src/pages/api/health.ts
diff --git a/packages/create-bison-app/template/pages/api/testTranslator.ts b/packages/create-bison-app/template/src/pages/api/testTranslator.ts
similarity index 100%
rename from packages/create-bison-app/template/pages/api/testTranslator.ts
rename to packages/create-bison-app/template/src/pages/api/testTranslator.ts
diff --git a/packages/create-bison-app/template/pages/api/trpc/[trpc].ts b/packages/create-bison-app/template/src/pages/api/trpc/[trpc].ts
similarity index 100%
rename from packages/create-bison-app/template/pages/api/trpc/[trpc].ts
rename to packages/create-bison-app/template/src/pages/api/trpc/[trpc].ts
diff --git a/packages/create-bison-app/template/pages/index.tsx b/packages/create-bison-app/template/src/pages/index.tsx
similarity index 100%
rename from packages/create-bison-app/template/pages/index.tsx
rename to packages/create-bison-app/template/src/pages/index.tsx
diff --git a/packages/create-bison-app/template/pages/login.tsx b/packages/create-bison-app/template/src/pages/login.tsx
similarity index 100%
rename from packages/create-bison-app/template/pages/login.tsx
rename to packages/create-bison-app/template/src/pages/login.tsx
diff --git a/packages/create-bison-app/template/pages/signup.tsx b/packages/create-bison-app/template/src/pages/signup.tsx
similarity index 100%
rename from packages/create-bison-app/template/pages/signup.tsx
rename to packages/create-bison-app/template/src/pages/signup.tsx
diff --git a/packages/create-bison-app/template/server/context.ts b/packages/create-bison-app/template/src/server/context.ts
similarity index 100%
rename from packages/create-bison-app/template/server/context.ts
rename to packages/create-bison-app/template/src/server/context.ts
diff --git a/packages/create-bison-app/template/server/middleware/auth.ts b/packages/create-bison-app/template/src/server/middleware/auth.ts
similarity index 100%
rename from packages/create-bison-app/template/server/middleware/auth.ts
rename to packages/create-bison-app/template/src/server/middleware/auth.ts
diff --git a/packages/create-bison-app/template/server/middleware/timing.ts b/packages/create-bison-app/template/src/server/middleware/timing.ts
similarity index 100%
rename from packages/create-bison-app/template/server/middleware/timing.ts
rename to packages/create-bison-app/template/src/server/middleware/timing.ts
diff --git a/packages/create-bison-app/template/server/routers/_app.ts b/packages/create-bison-app/template/src/server/routers/_app.ts
similarity index 100%
rename from packages/create-bison-app/template/server/routers/_app.ts
rename to packages/create-bison-app/template/src/server/routers/_app.ts
diff --git a/packages/create-bison-app/template/server/routers/user.ts b/packages/create-bison-app/template/src/server/routers/user.ts
similarity index 100%
rename from packages/create-bison-app/template/server/routers/user.ts
rename to packages/create-bison-app/template/src/server/routers/user.ts
diff --git a/packages/create-bison-app/template/server/trpc.ts b/packages/create-bison-app/template/src/server/trpc.ts
similarity index 100%
rename from packages/create-bison-app/template/server/trpc.ts
rename to packages/create-bison-app/template/src/server/trpc.ts
diff --git a/packages/create-bison-app/template/services/auth.ts b/packages/create-bison-app/template/src/services/auth.ts
similarity index 100%
rename from packages/create-bison-app/template/services/auth.ts
rename to packages/create-bison-app/template/src/services/auth.ts
diff --git a/packages/create-bison-app/template/services/permissions.ts b/packages/create-bison-app/template/src/services/permissions.ts
similarity index 100%
rename from packages/create-bison-app/template/services/permissions.ts
rename to packages/create-bison-app/template/src/services/permissions.ts
diff --git a/packages/create-bison-app/template/styles/globals.css b/packages/create-bison-app/template/src/styles/globals.css
similarity index 100%
rename from packages/create-bison-app/template/styles/globals.css
rename to packages/create-bison-app/template/src/styles/globals.css
diff --git a/packages/create-bison-app/template/types/next-auth.d.ts b/packages/create-bison-app/template/src/types/next-auth.d.ts
similarity index 100%
rename from packages/create-bison-app/template/types/next-auth.d.ts
rename to packages/create-bison-app/template/src/types/next-auth.d.ts
diff --git a/packages/create-bison-app/template/utils/getDefaultServerSideProps.ts b/packages/create-bison-app/template/src/utils/getDefaultServerSideProps.ts
similarity index 100%
rename from packages/create-bison-app/template/utils/getDefaultServerSideProps.ts
rename to packages/create-bison-app/template/src/utils/getDefaultServerSideProps.ts
diff --git a/packages/create-bison-app/template/utils/i18n-translator.ts b/packages/create-bison-app/template/src/utils/i18n-translator.ts
similarity index 100%
rename from packages/create-bison-app/template/utils/i18n-translator.ts
rename to packages/create-bison-app/template/src/utils/i18n-translator.ts
diff --git a/packages/create-bison-app/template/utils/setErrors.ts b/packages/create-bison-app/template/src/utils/setErrors.ts
similarity index 100%
rename from packages/create-bison-app/template/utils/setErrors.ts
rename to packages/create-bison-app/template/src/utils/setErrors.ts
diff --git a/packages/create-bison-app/template/utils/trpc.ts b/packages/create-bison-app/template/src/utils/trpc.ts
similarity index 100%
rename from packages/create-bison-app/template/utils/trpc.ts
rename to packages/create-bison-app/template/src/utils/trpc.ts
diff --git a/packages/create-bison-app/template/tests/e2e/auth.play.ts b/packages/create-bison-app/template/tests/e2e/auth.play.ts
index 30f2753..b8281a9 100644
--- a/packages/create-bison-app/template/tests/e2e/auth.play.ts
+++ b/packages/create-bison-app/template/tests/e2e/auth.play.ts
@@ -4,7 +4,7 @@ import { Role } from '@prisma/client';
 
 import { loginAs } from './helpers';
 
-import { resetDB } from '@/tests/helpers/db';
+import { resetDB } from '~/tests/helpers/db';
 import { disconnect } from '@/lib/prisma';
 
 test.beforeEach(async () => resetDB());
diff --git a/packages/create-bison-app/template/tests/e2e/global-teardown.ts b/packages/create-bison-app/template/tests/e2e/global-teardown.ts
index 97c1ba2..64cb1dc 100644
--- a/packages/create-bison-app/template/tests/e2e/global-teardown.ts
+++ b/packages/create-bison-app/template/tests/e2e/global-teardown.ts
@@ -1,7 +1,7 @@
 import { FullConfig } from '@playwright/test';
 
 import { prisma } from '@/lib/prisma';
-import { getSchema } from '@/tests/helpers/db';
+import { getSchema } from '~/tests/helpers/db';
 import { config } from '@/config';
 
 async function globalTeardown(_config: FullConfig) {
diff --git a/packages/create-bison-app/template/tests/e2e/helpers.ts b/packages/create-bison-app/template/tests/e2e/helpers.ts
index 3aac1f0..f317291 100644
--- a/packages/create-bison-app/template/tests/e2e/helpers.ts
+++ b/packages/create-bison-app/template/tests/e2e/helpers.ts
@@ -4,8 +4,8 @@ import { Role } from '@prisma/client';
 import { encode as encodeJwt } from 'next-auth/jwt';
 import { nanoid } from 'nanoid';
 
-import { UserFactory } from '@/tests/factories/user';
-import playwrightConfig from '@/playwright.config';
+import { UserFactory } from '~/prisma/factories/user';
+import playwrightConfig from '~/playwright.config';
 import { config } from '@/config';
 
 const chance = new Chance();
diff --git a/packages/create-bison-app/template/tests/requests/user/createUser.test.ts b/packages/create-bison-app/template/tests/requests/user/createUser.test.ts
index 93da37a..757dfd8 100644
--- a/packages/create-bison-app/template/tests/requests/user/createUser.test.ts
+++ b/packages/create-bison-app/template/tests/requests/user/createUser.test.ts
@@ -1,7 +1,7 @@
 import { Role } from '@prisma/client';
 
-import { resetDB, disconnect, trpcRequest } from '@/tests/helpers';
-import { UserFactory } from '@/tests/factories/user';
+import { resetDB, disconnect, trpcRequest } from '~/tests/helpers';
+import { UserFactory } from '~/prisma/factories/user';
 
 beforeEach(async () => resetDB());
 afterAll(async () => disconnect());
diff --git a/packages/create-bison-app/template/tests/requests/user/me.test.ts b/packages/create-bison-app/template/tests/requests/user/me.test.ts
index c7bcafc..7dc15c7 100644
--- a/packages/create-bison-app/template/tests/requests/user/me.test.ts
+++ b/packages/create-bison-app/template/tests/requests/user/me.test.ts
@@ -1,5 +1,5 @@
-import { trpcRequest, resetDB, disconnect } from '@/tests/helpers';
-import { UserFactory } from '@/tests/factories/user';
+import { trpcRequest, resetDB, disconnect } from '~/tests/helpers';
+import { UserFactory } from '~/prisma/factories/user';
 
 beforeEach(async () => resetDB());
 afterAll(async () => disconnect());
diff --git a/packages/create-bison-app/template/tests/requests/user/users.test.ts b/packages/create-bison-app/template/tests/requests/user/users.test.ts
index dee3143..8bb4f21 100644
--- a/packages/create-bison-app/template/tests/requests/user/users.test.ts
+++ b/packages/create-bison-app/template/tests/requests/user/users.test.ts
@@ -1,7 +1,7 @@
 import { Role } from '@prisma/client';
 
-import { resetDB, disconnect, trpcRequest } from '@/tests/helpers';
-import { UserFactory } from '@/tests/factories/user';
+import { resetDB, disconnect, trpcRequest } from '~/tests/helpers';
+import { UserFactory } from '~/prisma/factories/user';
 
 beforeEach(async () => resetDB());
 afterAll(async () => disconnect());
diff --git a/packages/create-bison-app/template/tests/unit/components/CenteredBoxForm.test.tsx b/packages/create-bison-app/template/tests/unit/components/CenteredBoxForm.test.tsx
index cc9718c..13c577e 100644
--- a/packages/create-bison-app/template/tests/unit/components/CenteredBoxForm.test.tsx
+++ b/packages/create-bison-app/template/tests/unit/components/CenteredBoxForm.test.tsx
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 
-import { render } from '@/tests/utils';
+import { render } from '~/tests/utils';
 import { CenteredBoxForm } from '@/components/CenteredBoxForm';
 
 describe('CenteredBoxForm', () => {
diff --git a/packages/create-bison-app/template/tests/unit/components/ErrorText.test.tsx b/packages/create-bison-app/template/tests/unit/components/ErrorText.test.tsx
index 1ca9c65..d41b891 100644
--- a/packages/create-bison-app/template/tests/unit/components/ErrorText.test.tsx
+++ b/packages/create-bison-app/template/tests/unit/components/ErrorText.test.tsx
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 
-import { render } from '@/tests/utils';
+import { render } from '~/tests/utils';
 import { ErrorText } from '@/components/ErrorText';
 
 describe('ErrorText', () => {
diff --git a/packages/create-bison-app/template/tests/unit/components/Logo.test.tsx b/packages/create-bison-app/template/tests/unit/components/Logo.test.tsx
index 24ae6fb..513444e 100644
--- a/packages/create-bison-app/template/tests/unit/components/Logo.test.tsx
+++ b/packages/create-bison-app/template/tests/unit/components/Logo.test.tsx
@@ -2,9 +2,9 @@
  * @jest-environment jsdom
  */
 
-import { render } from '@/tests/utils';
+import { render } from '~/tests/utils';
 import { Logo } from '@/components/Logo';
-import '@/tests/matchMedia.mock';
+import '~/tests/matchMedia.mock';
 
 describe('Logo', () => {
   it('loads', async () => {
diff --git a/packages/create-bison-app/template/tests/unit/components/Nav.test.tsx b/packages/create-bison-app/template/tests/unit/components/Nav.test.tsx
index 6a61807..5caf06c 100644
--- a/packages/create-bison-app/template/tests/unit/components/Nav.test.tsx
+++ b/packages/create-bison-app/template/tests/unit/components/Nav.test.tsx
@@ -2,8 +2,8 @@
  * @jest-environment jsdom
  */
 
-import { render } from '@/tests/utils';
-import '@/tests/matchMedia.mock';
+import { render } from '~/tests/utils';
+import '~/tests/matchMedia.mock';
 import { Nav } from '@/components/Nav';
 
 describe('Nav', () => {
diff --git a/packages/create-bison-app/template/tests/unit/components/SignupForm.test.tsx b/packages/create-bison-app/template/tests/unit/components/SignupForm.test.tsx
index b675c0c..12c1ecc 100644
--- a/packages/create-bison-app/template/tests/unit/components/SignupForm.test.tsx
+++ b/packages/create-bison-app/template/tests/unit/components/SignupForm.test.tsx
@@ -2,7 +2,7 @@
  * @jest-environment jsdom
  */
 
-import { render, waitFor, userEvent, fireEvent, act } from '@/tests/utils';
+import { render, waitFor, userEvent, fireEvent, act } from '~/tests/utils';
 import { SignUpForm } from '@/components/auth/SignUpForm';
 
 // need this in order to use `act`
diff --git a/packages/create-bison-app/template/tests/utils.tsx b/packages/create-bison-app/template/tests/utils.tsx
index 799d58e..90fddc0 100644
--- a/packages/create-bison-app/template/tests/utils.tsx
+++ b/packages/create-bison-app/template/tests/utils.tsx
@@ -8,7 +8,7 @@ import { NextRouter } from 'next/router';
 import fetch from 'cross-fetch';
 import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
 import '@testing-library/jest-dom/extend-expect';
-import '@/tests/matchMedia.mock';
+import '~/tests/matchMedia.mock';
 
 import { AllProviders } from '@/components/AllProviders';
 import type { AppRouter } from '@/server/routers/_app';
diff --git a/packages/create-bison-app/test/cli.test.js b/packages/create-bison-app/test/cli.test.js
index 1c69eba..6d415f7 100644
--- a/packages/create-bison-app/test/cli.test.js
+++ b/packages/create-bison-app/test/cli.test.js
@@ -1,4 +1,4 @@
-describe("cli", () => {
+describe('cli', () => {
   let createBisonApp;
   let originalArgv;
 
@@ -7,8 +7,8 @@ describe("cli", () => {
     // multiple times with different arguments.
     jest.resetModules();
 
-    jest.mock("..");
-    createBisonApp = require("..");
+    jest.mock('..');
+    createBisonApp = require('..');
 
     // Each test overwrites process arguments so store the original arguments
     originalArgv = process.argv;
@@ -19,8 +19,8 @@ describe("cli", () => {
     process.argv = originalArgv;
   });
 
-  it("should create app with default configuration", async () => {
-    await runCreateBisonAppCommand("appName1", "--acceptDefaults");
+  it('should create app with default configuration', async () => {
+    await runCreateBisonAppCommand('appName1', '--acceptDefaults');
 
     expect(createBisonApp).toHaveBeenCalledTimes(1);
     expect(createBisonApp.mock.calls[0][0]).toMatchInlineSnapshot(`
@@ -45,12 +45,8 @@ describe("cli", () => {
     `);
   });
 
-  it("should create app with default configuration and override with any arguments", async () => {
-    await runCreateBisonAppCommand(
-      "appName2",
-      "--acceptDefaults",
-      "--db.dev.name=custom"
-    );
+  it('should create app with default configuration and override with any arguments', async () => {
+    await runCreateBisonAppCommand('appName2', '--acceptDefaults', '--db.dev.name=custom');
 
     expect(createBisonApp).toHaveBeenCalledTimes(1);
     expect(createBisonApp.mock.calls[0][0]).toMatchInlineSnapshot(`
@@ -84,11 +80,11 @@ describe("cli", () => {
  */
 async function runCreateBisonAppCommand(appName, ...options) {
   process.argv = [
-    "node", // Not used but required at this index in the array
-    "../cli.js", // Not used but required at this index in the array
+    'node', // Not used but required at this index in the array
+    '../cli.js', // Not used but required at this index in the array
     appName, // App name positional argument
     ...options, // Any option arguments
   ];
 
-  return require("../cli");
+  return require('../cli');
 }
diff --git a/packages/create-bison-app/test/tasks/copyFiles.test.js b/packages/create-bison-app/test/tasks/copyFiles.test.js
index 1fe5b90..cced738 100644
--- a/packages/create-bison-app/test/tasks/copyFiles.test.js
+++ b/packages/create-bison-app/test/tasks/copyFiles.test.js
@@ -26,7 +26,7 @@ const DEFAULT_VARS = {
 
 describe('copyFiles', () => {
   describe('defaults', () => {
-    let targetFolder, variables;
+    let targetFolder, targetSrcFolder, targetTestFolder, variables;
 
     beforeAll(async () => {
       variables = {
@@ -36,6 +36,8 @@ describe('copyFiles', () => {
 
       const temp = await makeTempDir();
       targetFolder = path.join(temp, variables.name);
+      targetSrcFolder = path.join(targetFolder, 'src');
+      targetTestFolder = path.join(targetFolder, 'tests');
       await copyFiles({ variables, targetFolder });
     });
 
@@ -78,7 +80,6 @@ describe('copyFiles', () => {
         '.eslintrc.js',
         '.hygen.js',
         '.tool-versions',
-        'constants.ts',
         'jest.config.js',
         'playwright.config.ts',
         'next-env.d.ts',
@@ -94,6 +95,19 @@ describe('copyFiles', () => {
       });
     });
 
+    it('copies src files', async () => {
+      const files = [
+        'config.ts',
+        'constants.ts',
+      ];
+
+      files.forEach((file) => {
+        const filePath = path.join(targetSrcFolder, file);
+
+        expect(() => fs.statSync(filePath)).not.toThrowError();
+      });
+    });
+
     it('copies package.json with the expected content', async () => {
       const filePath = path.join(targetFolder, 'package.json');
       const contents = require(filePath);
@@ -106,7 +120,7 @@ describe('copyFiles', () => {
       const files = ['api/trpc/[trpc].ts', '_app.tsx', 'index.tsx', 'login.tsx', 'signup.tsx'];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'pages', file);
+        const filePath = path.join(targetSrcFolder, 'pages', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -145,7 +159,7 @@ describe('copyFiles', () => {
       ];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'server', file);
+        const filePath = path.join(targetSrcFolder, 'server', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -161,7 +175,7 @@ describe('copyFiles', () => {
       ];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'tests', 'e2e', file);
+        const filePath = path.join(targetTestFolder, 'e2e', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -171,7 +185,7 @@ describe('copyFiles', () => {
       const files = ['user.ts', 'index.ts'];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'tests', 'factories', file);
+        const filePath = path.join(targetFolder, 'prisma', 'factories', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -181,7 +195,7 @@ describe('copyFiles', () => {
       const files = ['createUser.test.ts', 'me.test.ts', 'users.test.ts'];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'tests', 'requests', 'user', file);
+        const filePath = path.join(targetTestFolder, 'requests', 'user', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -198,7 +212,7 @@ describe('copyFiles', () => {
       ];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'tests', 'unit', file);
+        const filePath = path.join(targetTestFolder, 'unit', file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });
@@ -216,7 +230,7 @@ describe('copyFiles', () => {
       ];
 
       files.forEach((file) => {
-        const filePath = path.join(targetFolder, 'tests', file);
+        const filePath = path.join(targetTestFolder, file);
 
         expect(() => fs.statSync(filePath)).not.toThrowError();
       });