diff --git a/.gitignore b/.gitignore index 974124e..92551d9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ node_modules # Testing coverage +/test-results/ +/__screenshots__/ # Turbo .turbo @@ -25,6 +27,7 @@ build dist + # Debug npm-debug.log* yarn-debug.log* diff --git a/README.md b/README.md index cb230ed..4ca0111 100644 --- a/README.md +++ b/README.md @@ -33,25 +33,26 @@ The monorepo is powered by Turborepo and Bun workspaces, consisting of: ### Technologies -| Category | Technology | Version | -|-------------------|------------|---------| -| Monorepo | [Turborepo](https://turbo.build/repo) [Turborepo](https://turbo.build/repo) | 2.3.3 | -| Workspace/Runtime | [Bun](https://bun.sh) [Bun](https://bun.sh) | 1.1.38 | -| Linting | [Biome](https://biomejs.dev/) [Biome](https://biomejs.dev/) | 1.9.4 | -| Language | [TypeScript](https://www.typescriptlang.org/) [TypeScript](https://www.typescriptlang.org/) | 5.5.4 | -| Server | [Hono](https://hono.dev) [Hono](https://hono.dev) | 4.6.13 | -| API | [tRPC](https://trpc.io) [tRPC](https://trpc.io) | 11.0.0-rc.660 | -| Schema Validation | [Zod](https://zod.dev) [Zod](https://zod.dev) | 3.23.8 | -| UI Framework | [React Router](https://reactrouter.com) [React Router](https://reactrouter.com) | 7.0.2 | -| UI Library | [React](https://react.dev) [React](https://react.dev) | 19.0.0 | -| Styling | [Tailwind CSS](https://tailwindcss.com) [Tailwind CSS](https://tailwindcss.com) | 4.0.0-beta.6 | -| E2E Testing | [Playwright](https://playwright.dev) [Playwright](https://playwright.dev) | 1.49.0 | -| Bundler | [Vite](https://vitejs.dev) [Vite](https://vitejs.dev) | 6.0.3 | -| CI | [GitHub Actions](https://github.com/features/actions) [GitHub Actions](https://github.com/features/actions) | N/A | +| Category | Technology | Version | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| +| Build system | [Turborepo](https://turbo.build/repo) [Turborepo](https://turbo.build/repo) | 2.3.3 | +| Workspace/runtime | [Bun](https://bun.sh) [Bun](https://bun.sh) | 1.1.38 | +| Linting | [Biome](https://biomejs.dev/) [Biome](https://biomejs.dev/) | 1.9.4 | +| Language | [TypeScript](https://www.typescriptlang.org/) [TypeScript](https://www.typescriptlang.org/) | 5.5.4 | +| Server | [Hono](https://hono.dev) [Hono](https://hono.dev) | 4.6.13 | +| API | [tRPC](https://trpc.io) [tRPC](https://trpc.io) | 11.0.0-rc.660 | +| Schema validation | [Zod](https://zod.dev) [Zod](https://zod.dev) | 3.23.8 | +| UI framework | [React Router](https://reactrouter.com) [React Router](https://reactrouter.com) | 7.0.2 | +| UI library | [React](https://react.dev) [React](https://react.dev) | 19.0.0 | +| Styling | [Tailwind CSS](https://tailwindcss.com) [Tailwind CSS](https://tailwindcss.com) | 4.0.0-beta.6 | +| E2E testing | [Playwright](https://playwright.dev) [Playwright](https://playwright.dev) | 1.49.0 | +| Integration testing | [Vitest](https://vitest.dev) [Vitest (Browser Mode)](https://vitest.dev) | 2.1.8 | +| Bundler | [Vite](https://vitejs.dev) [Vite](https://vitejs.dev) | 6.0.3 | +| CI | [GitHub Actions](https://github.com/features/actions) [GitHub Actions](https://github.com/features/actions) | N/A | ### Still to come * Database connectivity - SQL and NoSQL -* Vitest + Vitest Browser Mode -* Docker + * realtime subscriptions +* Containerisation with Docker * Deployment via CD, powered by Github Actions \ No newline at end of file diff --git a/apps/web/app/routes/_index.tsx b/apps/web/app/routes/_index.tsx index 7deb449..c896001 100644 --- a/apps/web/app/routes/_index.tsx +++ b/apps/web/app/routes/_index.tsx @@ -1,4 +1,4 @@ -import { client } from 'index'; +import { client } from '../server'; import type { Route } from './+types/_index'; export function meta({}: Route.MetaArgs) { diff --git a/apps/web/app/server/index.ts b/apps/web/app/server/index.ts new file mode 100644 index 0000000..64e4eca --- /dev/null +++ b/apps/web/app/server/index.ts @@ -0,0 +1,10 @@ +import { createTRPCClient, httpBatchLink } from '@trpc/client'; +import type { AppRouter } from '../../../server/src'; + +export const client = createTRPCClient({ + links: [ + httpBatchLink({ + url: 'http://localhost:3000/trpc', + }), + ], +}); diff --git a/apps/web/index.ts b/apps/web/index.ts index 7b96533..e69de29 100644 --- a/apps/web/index.ts +++ b/apps/web/index.ts @@ -1,10 +0,0 @@ -import { createTRPCProxyClient, httpBatchLink } from '@trpc/client'; -import type { AppRouter } from '../server/src/router'; - -export const client = createTRPCProxyClient({ - links: [ - httpBatchLink({ - url: 'http://localhost:3000/trpc', - }), - ], -});