├── sandbox.config.json ├── .npmrc ├── apps ├── astro │ ├── src │ │ ├── env.d.ts │ │ ├── layouts │ │ │ └── Layout.astro │ │ ├── components │ │ │ └── Card.astro │ │ └── pages │ │ │ └── index.astro │ ├── tsconfig.json │ ├── astro.config.mjs │ ├── .gitignore │ ├── package.json │ ├── public │ │ └── favicon.svg │ ├── Dockerfile │ └── README.md ├── vite │ ├── src │ │ ├── vite-env.d.ts │ │ ├── pages │ │ │ ├── index.tsx │ │ │ ├── Cats │ │ │ │ └── index.tsx │ │ │ ├── AddUser │ │ │ │ └── index.tsx │ │ │ └── About │ │ │ │ └── index.tsx │ │ ├── index.css │ │ ├── store │ │ │ └── index.ts │ │ ├── router │ │ │ ├── routes.ts │ │ │ └── index.tsx │ │ ├── services │ │ │ ├── queryClient.ts │ │ │ └── trpc.ts │ │ ├── mocks │ │ │ ├── browser.ts │ │ │ ├── server.ts │ │ │ └── handlers.ts │ │ ├── main.tsx │ │ ├── App.spec.tsx │ │ ├── hooks │ │ │ └── usePrevious.ts │ │ ├── App.css │ │ ├── App.tsx │ │ └── components │ │ │ ├── AddUserForm │ │ │ └── AddUserForm.tsx │ │ │ └── Navbar.tsx │ ├── postcss.config.cjs │ ├── tsconfig.json │ ├── index.html │ ├── .gitignore │ ├── tailwind.config.cjs │ ├── setupTests.ts │ ├── .eslintcache │ ├── vite.config.ts │ ├── public │ │ ├── vite.svg │ │ └── mockServiceWorker.js │ ├── package.json │ └── Dockerfile ├── remix │ ├── styles │ │ └── app.css │ ├── remix.env.d.ts │ ├── public │ │ └── favicon.ico │ ├── app │ │ ├── routes │ │ │ ├── index.spec.tsx │ │ │ ├── jokes │ │ │ │ ├── index.tsx │ │ │ │ ├── $jokeId.tsx │ │ │ │ └── new.tsx │ │ │ ├── jokes.tsx │ │ │ └── index.tsx │ │ ├── root.tsx │ │ ├── entry.client.tsx │ │ └── entry.server.tsx │ ├── tsconfig.json │ ├── tailwind.config.js │ ├── .eslintrc.js │ ├── .eslintcache │ ├── remix.config.js │ ├── package.json │ ├── README.md │ └── Dockerfile ├── nextjs │ ├── public │ │ ├── favicon.ico │ │ ├── vercel.svg │ │ ├── thirteen.svg │ │ └── next.svg │ ├── postcss.config.js │ ├── services │ │ ├── queryClient.ts │ │ └── trpc.ts │ ├── setupTests.ts │ ├── next-env.d.ts │ ├── .eslintrc.js │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── api │ │ │ └── hello.ts │ │ └── index.tsx │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── vitest.config.ts │ ├── __tests__ │ │ ├── e2e │ │ │ ├── click-boop-button.spec.ts │ │ │ └── demo-todo-app.spec.ts │ │ └── index.spec.tsx │ ├── .gitignore │ ├── next.config.js │ ├── package.json │ ├── README.md │ ├── Dockerfile │ ├── styles │ │ ├── globals.css │ │ └── Home.module.css │ └── playwright.config.ts └── backend │ └── express │ ├── vitest.config.js │ ├── src │ ├── controllers │ │ └── cat.ts │ ├── server.ts │ ├── app.spec.ts │ ├── trpc │ │ ├── isAuthedMiddleware.ts │ │ ├── loggerMiddleware.ts │ │ ├── trpc.ts │ │ ├── appRouter.ts │ │ └── context.ts │ └── app.ts │ ├── tsconfig.json │ ├── package.json │ ├── Dockerfile │ └── .eslintcache ├── pnpm-workspace.yaml ├── .dockerignore ├── .vscode ├── settings.json └── extensions.json ├── docs ├── logo.png ├── apps │ ├── remix.png │ ├── storybook.png │ ├── vite.svg │ ├── nextjs.svg │ └── astro.svg └── CONTRIBUTING.md ├── packages ├── ui │ ├── .storybook │ │ ├── preview-head.html │ │ ├── styles.css │ │ ├── preview.js │ │ └── main.js │ ├── src │ │ ├── index.tsx │ │ ├── Button │ │ │ ├── Button.tsx │ │ │ ├── Button.test.tsx │ │ │ └── Button.stories.tsx │ │ └── UsersList │ │ │ ├── UsersList.stories.tsx │ │ │ └── UsersList.tsx │ ├── postcss.config.js │ ├── setupTests.ts │ ├── tsconfig.json │ ├── vitest.config.ts │ ├── tailwind.config.cjs │ ├── .eslintcache │ └── package.json ├── schema │ ├── src │ │ ├── index.ts │ │ └── zod │ │ │ ├── userSchema.ts │ │ │ └── catSchema.ts │ ├── package.json │ ├── tsconfig.json │ └── .eslintcache ├── database │ ├── prisma │ │ ├── dev.db │ │ ├── migrations │ │ │ ├── migration_lock.toml │ │ │ └── 20221026152715_init │ │ │ │ └── migration.sql │ │ └── schema.prisma │ ├── src │ │ ├── client.ts │ │ ├── index.spec.ts │ │ └── index.ts │ ├── setupTests.ts │ ├── tsconfig.json │ ├── .env │ ├── package.json │ └── .eslintcache └── eslint-config-custom │ ├── index.js │ └── package.json ├── .husky ├── pre-commit └── commit-msg ├── .prettierignore ├── commitlint.config.js ├── prettier.config.js ├── .lintstagedrc.js ├── .eslintrc.js ├── e2e ├── artillery-vite.yml ├── index-page-next.spec.ts └── index-page-vite.spec.ts ├── .github └── workflows │ ├── dev-stack.yml │ └── ci.yml ├── .gitignore ├── turbo.json ├── docker-compose.yml ├── package.json ├── playwright.config.ts └── README.md /sandbox.config.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern[]=*prisma* 2 | -------------------------------------------------------------------------------- /apps/astro/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /apps/vite/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/**/*" 3 | - "packages/**/*" 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .next 5 | build 6 | dist -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "prettier.configPath": "prettier.config.js" 3 | } 4 | -------------------------------------------------------------------------------- /apps/vite/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./About"; 2 | export * from "./AddUser"; 3 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/docs/logo.png -------------------------------------------------------------------------------- /packages/ui/.storybook/preview-head.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/remix/styles/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /apps/vite/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | pnpm lint-staged 5 | -------------------------------------------------------------------------------- /docs/apps/remix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/docs/apps/remix.png -------------------------------------------------------------------------------- /packages/schema/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./zod/userSchema"; 2 | export * from "./zod/catSchema"; 3 | -------------------------------------------------------------------------------- /apps/vite/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { atom } from "jotai"; 2 | 3 | export const countAtom = atom(0); 4 | -------------------------------------------------------------------------------- /packages/ui/.storybook/styles.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /packages/ui/src/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./Button/Button"; 2 | export * from "./UsersList/UsersList"; 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | out 3 | dist 4 | .next 5 | public 6 | .husky 7 | next-env.d.ts 8 | yarn.lock 9 | -------------------------------------------------------------------------------- /docs/apps/storybook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/docs/apps/storybook.png -------------------------------------------------------------------------------- /apps/remix/remix.env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | module.exports = { extends: ["@commitlint/config-conventional"] }; 3 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit ${1} 5 | -------------------------------------------------------------------------------- /apps/remix/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/apps/remix/public/favicon.ico -------------------------------------------------------------------------------- /apps/nextjs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/apps/nextjs/public/favicon.ico -------------------------------------------------------------------------------- /apps/vite/src/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const ROUTES = { 2 | HOME: "/", 3 | CATS: "cats", 4 | ABOUT: "about", 5 | }; 6 | -------------------------------------------------------------------------------- /packages/database/prisma/dev.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaminskypavel/fullpower-stack/HEAD/packages/database/prisma/dev.db -------------------------------------------------------------------------------- /packages/database/src/client.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | export const prisma = new PrismaClient(); 3 | -------------------------------------------------------------------------------- /apps/nextjs/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/vite/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /packages/ui/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /apps/nextjs/services/queryClient.ts: -------------------------------------------------------------------------------- 1 | import { QueryClient } from "@tanstack/react-query"; 2 | 3 | export const queryClient = new QueryClient(); 4 | -------------------------------------------------------------------------------- /apps/vite/src/services/queryClient.ts: -------------------------------------------------------------------------------- 1 | import { QueryClient } from "@tanstack/react-query"; 2 | 3 | export const queryClient = new QueryClient(); 4 | -------------------------------------------------------------------------------- /packages/database/setupTests.ts: -------------------------------------------------------------------------------- 1 | import { expect } from "vitest"; 2 | import matchers from "@testing-library/jest-dom/matchers"; 3 | 4 | expect.extend(matchers); 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-playwright.playwright" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /apps/astro/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/base", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "react" 6 | } 7 | } -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | // https://github.com/tailwindlabs/prettier-plugin-tailwindcss 2 | module.exports = { 3 | plugins: [require("prettier-plugin-tailwindcss")], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/database/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "sqlite" -------------------------------------------------------------------------------- /packages/schema/src/zod/userSchema.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | export const addUserSchemaInput = z.object({ 4 | name: z.string().min(5), 5 | email: z.string().email(), 6 | }); 7 | -------------------------------------------------------------------------------- /.lintstagedrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "*.{js,jsx,ts,tsx}": [ 3 | "prettier --write --ignore-unknown --cache", 4 | "eslint --quiet --fix --cache", 5 | // "vitest related" 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /apps/nextjs/setupTests.ts: -------------------------------------------------------------------------------- 1 | import { expect } from "vitest"; 2 | import matchers from "@testing-library/jest-dom/matchers"; 3 | import "@testing-library/jest-dom/extend-expect"; 4 | 5 | expect.extend(matchers); 6 | -------------------------------------------------------------------------------- /apps/remix/app/routes/index.spec.tsx: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | 3 | describe("dummy remix test", () => { 4 | it("dummy test", () => { 5 | expect(1).toBe(1); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/ui/setupTests.ts: -------------------------------------------------------------------------------- 1 | import { expect } from "vitest"; 2 | import matchers from "@testing-library/jest-dom/matchers"; 3 | import "@testing-library/jest-dom/extend-expect"; 4 | 5 | expect.extend(matchers); 6 | -------------------------------------------------------------------------------- /apps/backend/express/vitest.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | // https://vitejs.dev/config/ 4 | export default defineConfig({ 5 | test: { 6 | globals: true, 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /apps/remix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/remix/tsconfig.json", 3 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], 4 | "compilerOptions": { 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/remix/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./**/*.{js,ts,jsx,tsx}", 5 | ], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | } -------------------------------------------------------------------------------- /apps/nextjs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/database/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | // test index.ts 2 | 3 | import { expect, it, describe } from "vitest"; 4 | 5 | describe("index.ts", () => { 6 | it("should be true", () => { 7 | expect(true).toBe(true); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /apps/vite/src/services/trpc.ts: -------------------------------------------------------------------------------- 1 | // https://trpc.io/docs/v10/react 2 | import { createTRPCReact } from "@trpc/react-query"; 3 | import { AppRouter } from "@fullpower-stack/express-backend"; 4 | 5 | export const trpc = createTRPCReact(); 6 | -------------------------------------------------------------------------------- /apps/nextjs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "plugin:@next/next/recommended", 4 | "@fullpower-stack/eslint-config-custom", 5 | ], 6 | env: { 7 | browser: true, 8 | amd: true, 9 | node: true, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /apps/remix/app/routes/jokes/index.tsx: -------------------------------------------------------------------------------- 1 | export default function JokesIndexRoute() { 2 | return ( 3 |
4 |

Here's a random joke:

5 |

I was wondering why the frisbee was getting bigger, then it hit me.

6 |
7 | ); 8 | } 9 | -------------------------------------------------------------------------------- /apps/vite/src/mocks/browser.ts: -------------------------------------------------------------------------------- 1 | // src/mocks/browser.js 2 | import { setupWorker } from "msw"; 3 | import { handlers } from "./handlers"; 4 | 5 | // This configures a Service Worker with the given request handlers. 6 | export const worker = setupWorker(...handlers); 7 | -------------------------------------------------------------------------------- /apps/astro/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | // https://docs.astro.build/en/getting-started/ 3 | import react from "@astrojs/react"; 4 | 5 | // https://astro.build/config 6 | export default defineConfig({ 7 | integrations: [react()] 8 | }); -------------------------------------------------------------------------------- /apps/remix/app/routes/jokes.tsx: -------------------------------------------------------------------------------- 1 | import { Outlet } from "@remix-run/react"; 2 | 3 | export default function JokesRoute() { 4 | return ( 5 |
6 |

J🤪KES

7 |
8 | 9 |
10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /apps/vite/src/mocks/server.ts: -------------------------------------------------------------------------------- 1 | // src/mocks/server.js 2 | import { setupServer } from "msw/node"; 3 | import { handlers } from "./handlers"; 4 | 5 | // This configures a request mocking server with the given request handlers. 6 | export const server = setupServer(...handlers); 7 | -------------------------------------------------------------------------------- /packages/ui/.storybook/preview.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | 3 | export const parameters = { 4 | actions: { argTypesRegex: "^on[A-Z].*" }, 5 | controls: { 6 | matchers: { 7 | color: /(background|color)$/i, 8 | date: /Date$/, 9 | }, 10 | }, 11 | } -------------------------------------------------------------------------------- /packages/schema/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@fullpower-stack/schema", 3 | "main": "./src/index.ts", 4 | "types": "./src/index.ts", 5 | "license": "MIT", 6 | "scripts": { 7 | "lint": "eslint .", 8 | "build": "tsup src/index.ts --format cjs --dts" 9 | } 10 | } -------------------------------------------------------------------------------- /apps/remix/.eslintrc.js: -------------------------------------------------------------------------------- 1 | 2 | /** @type {import('eslint').Linter.Config} */ 3 | module.exports = { 4 | // https://github.com/eslint/eslint/issues/13385 5 | root: true, 6 | extends: [ 7 | "@remix-run/eslint-config", 8 | "@remix-run/eslint-config/node" 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /apps/remix/app/routes/index.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "@fullpower-stack/ui"; 2 | 3 | export default function Index() { 4 | return ( 5 |

6 | Welcome to Fullpower Stack 7 |

9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/vite/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/vite-react/tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["vitest/globals"] 5 | }, 6 | "include": ["vite.config.ts", "./src", "./setupTests.ts"], 7 | "exclude": ["node_modules", "**/*.spec.tsx", "**/*.test.tsx", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/backend/express/src/controllers/cat.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const getCatImage = async (text = "hello world") => { 4 | const { data } = await axios.get( 5 | `https://cataas.com/cat/says/${text}?json=true` 6 | ); 7 | return data; 8 | }; 9 | 10 | export { getCatImage }; 11 | -------------------------------------------------------------------------------- /apps/vite/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | import "./index.css"; 5 | 6 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( 7 | 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /apps/backend/express/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "rootDir": "./src", 6 | "types": ["node", "vitest/globals"] 7 | }, 8 | "include": ["src"], 9 | "exclude": ["node_modules", "**/*.spec.ts", "dist"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/nextjs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import "../styles/globals.css"; 2 | 3 | import type { AppType } from "next/app"; 4 | import { trpc } from "../services/trpc"; 5 | 6 | const MyApp: AppType = ({ Component, pageProps }) => { 7 | return ; 8 | }; 9 | 10 | export default trpc.withTRPC(MyApp); 11 | -------------------------------------------------------------------------------- /apps/remix/app/routes/jokes/$jokeId.tsx: -------------------------------------------------------------------------------- 1 | export default function JokeRoute() { 2 | return ( 3 |
4 |

Here's your hilarious joke:

5 |

6 | Why don't you find hippopotamuses hiding in trees? They're really good 7 | at it. 8 |

9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /apps/nextjs/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/vite-react/tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["vitest/globals", "@testing-library/jest-dom"] 5 | }, 6 | "include": ["vite.config.ts", "vitest.config.ts", "./src", "./setupTests.ts"], 7 | "exclude": ["node_modules", "dist", "build"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/astro/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | .output/ 4 | 5 | # dependencies 6 | node_modules/ 7 | 8 | # logs 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | 14 | 15 | # environment variables 16 | .env 17 | .env.production 18 | 19 | # macOS-specific files 20 | .DS_Store 21 | -------------------------------------------------------------------------------- /apps/nextjs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./pages/**/*.{js,ts,jsx,tsx}", 5 | "./components/**/*.{js,ts,jsx,tsx}", 6 | "@fullpower-stack/**/*.{js,ts,jsx,tsx}", 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | }; 13 | -------------------------------------------------------------------------------- /apps/backend/express/src/server.ts: -------------------------------------------------------------------------------- 1 | // express server starting the app 2 | 3 | import app from "./app"; 4 | 5 | // eslint-disable-next-line turbo/no-undeclared-env-vars 6 | const PORT = process.env.PORT || 4000; 7 | 8 | app.listen(PORT); 9 | console.log(`Express started on port ${PORT} 🚀`); 10 | 11 | export * from "./trpc/appRouter"; 12 | -------------------------------------------------------------------------------- /packages/schema/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": ["."], 4 | "exclude": ["dist", "build", "node_modules"], 5 | "compilerOptions": { 6 | "sourceMap": true, 7 | "outDir": "dist", 8 | "strict": true, 9 | "lib": ["esnext"], 10 | "esModuleInterop": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/database/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": ["."], 4 | "exclude": ["dist", "build", "node_modules"], 5 | "compilerOptions": { 6 | "sourceMap": true, 7 | "outDir": "dist", 8 | "strict": true, 9 | "lib": ["esnext"], 10 | "esModuleInterop": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react() as any], 6 | test: { 7 | globals: true, 8 | environment: "happy-dom", // or 'jsdom', 'node' 9 | setupFiles: "./setupTests.ts", 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ["@fullpower-stack/eslint-config-custom"], 5 | ignorePatterns: ["dist", "node_modules", ".next", ".cache"], 6 | settings: { 7 | next: { 8 | rootDir: ["apps/*/"], 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## install localy 4 | 5 | ### to install the packages for the whole project 6 | 7 | `pnpm i` 8 | 9 | ### to generate Prisma Client 10 | 11 | `npm --prefix packages\database run prisma:generate` 12 | 13 | ### run tests 14 | 15 | `pnpm run test` 16 | 17 | ### run dev environment 18 | 19 | `pnpm run dev` 20 | -------------------------------------------------------------------------------- /apps/remix/.eslintcache: -------------------------------------------------------------------------------- 1 | [{"C:\\Users\\kamin\\Desktop\\fullpower-stack\\apps\\remix\\remix.env.d.ts":"1"},{"size":83,"mtime":1669634556322,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1tzbx0g","C:\\Users\\kamin\\Desktop\\fullpower-stack\\apps\\remix\\remix.env.d.ts",[]] -------------------------------------------------------------------------------- /apps/nextjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/next/tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["vitest/globals"] 5 | }, 6 | 7 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 8 | "exclude": [ 9 | "node_modules", 10 | "/**/*.spec.tsx", 11 | "/**/*.test.tsx", 12 | "dist", 13 | ".next", 14 | "next.config.js" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /apps/nextjs/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from "next"; 3 | 4 | type Data = { 5 | name: string; 6 | }; 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({ name: "John Doe" }); 13 | } 14 | -------------------------------------------------------------------------------- /apps/nextjs/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react() as any], 6 | test: { 7 | globals: true, 8 | environment: "happy-dom", // or 'jsdom', 'node' 9 | setupFiles: "./setupTests.ts", 10 | exclude: ["**/node_modules/**", "**/e2e/**/*.spec.*"], 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "turbo", 4 | "prettier", 5 | "eslint:recommended", 6 | "plugin:@typescript-eslint/recommended", 7 | "prettier", 8 | ], 9 | parser: "@typescript-eslint/parser", 10 | plugins: ["@typescript-eslint"], 11 | rules: { 12 | "@next/next/no-html-link-for-pages": "off", 13 | "react/jsx-key": "off", 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /apps/backend/express/src/app.spec.ts: -------------------------------------------------------------------------------- 1 | import request from "supertest"; 2 | import app from "./app"; 3 | import { describe, expect, it } from "vitest"; 4 | 5 | describe("app.ts", () => { 6 | it('should return return "Hello World!"', async () => { 7 | const res = await request(app).get( 8 | `/trpc/cat?batch=1&input={"0":{"text":"hello"}}` 9 | ); 10 | expect(res.statusCode).toEqual(200); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /apps/vite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/ui/src/Button/Button.tsx: -------------------------------------------------------------------------------- 1 | export const Button: React.FC = () => { 2 | return ( 3 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /apps/vite/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | **/*/test-results/ 27 | **/*/playwright-report/ 28 | **/*/playwright/.cache/ 29 | -------------------------------------------------------------------------------- /packages/ui/src/Button/Button.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from "@testing-library/react"; 2 | import { PrimaryButton } from "./Button.stories"; 3 | 4 | describe("#PrimaryButton", () => { 5 | it("renders a count button", () => { 6 | render(); 7 | const button = screen.getByRole("button", { 8 | name: /boop/i, 9 | }); 10 | 11 | expect(button).toBeVisible(); 12 | // console.log(screen.logTestingPlaygroundURL()); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /apps/remix/remix.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@remix-run/dev').AppConfig} */ 2 | 3 | module.exports = { 4 | // appDirectory: "app", 5 | // assetsBuildDirectory: "public/build", 6 | // serverBuildPath: "build/index.js", 7 | // publicPath: "/build/", 8 | ignoredRouteFiles: ["**/.*", "**/*.css", "**/*.{test,spec}.{js,jsx,ts,tsx}"], 9 | serverDependenciesToBundle: ['@fullpower-stack/ui'], 10 | watchPaths: [ 11 | './../../packages/ui/**/*.tsx', 12 | ], 13 | 14 | }; 15 | -------------------------------------------------------------------------------- /packages/database/.env: -------------------------------------------------------------------------------- 1 | # Environment variables declared in this file are automatically made available to Prisma. 2 | # See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema 3 | 4 | # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. 5 | # See the documentation for all the connection string options: https://pris.ly/d/connection-strings 6 | 7 | DATABASE_URL="file:./dev.db" -------------------------------------------------------------------------------- /packages/schema/src/zod/catSchema.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | export const getCatImageInputSchema = z.object({ 4 | text: z.string().optional(), 5 | }); 6 | 7 | export const getCatImageOutputSchema = z.object({ 8 | tags: z.array(z.string()), 9 | createdAt: z.string(), 10 | updatedAt: z.string(), 11 | validated: z.boolean(), 12 | owner: z.null(), 13 | file: z.string(), 14 | mimetype: z.string(), 15 | size: z.number(), 16 | _id: z.string(), 17 | url: z.string(), 18 | }); 19 | -------------------------------------------------------------------------------- /e2e/artillery-vite.yml: -------------------------------------------------------------------------------- 1 | # https://www.artillery.io/docs/guides/guides/test-script-reference 2 | config: 3 | target: "http://localhost:5173" 4 | phases: 5 | - duration: 60 6 | arrivalRate: 5 7 | name: Warm up 8 | - duration: 120 9 | arrivalRate: 5 10 | rampTo: 50 11 | name: Ramp up load 12 | - duration: 600 13 | arrivalRate: 50 14 | name: Sustained load 15 | scenarios: 16 | - name: vite main page 17 | flow: 18 | - get: 19 | url: / 20 | -------------------------------------------------------------------------------- /apps/vite/src/App.spec.tsx: -------------------------------------------------------------------------------- 1 | // check that App is rendered with vitest and msw 2 | 3 | import { Button } from "@fullpower-stack/ui"; 4 | import { render, screen } from "@testing-library/react"; 5 | import { expect, it, describe } from "vitest"; 6 | 7 | describe("dummy", () => { 8 | it("should render a dummy button from a different package", () => { 9 | const { getByText } = render(