From 56dfcefd5768491c0c5388d9397925ae6ffdba4c Mon Sep 17 00:00:00 2001 From: Charuka Samarakoon Date: Sun, 24 Jul 2022 01:14:52 +0000 Subject: [PATCH] feat(doctor): :sparkles: Doctor next app init --- .vscode/settings.json | 3 +- apps/e2e/doctor-e2e/.eslintrc.json | 10 + apps/e2e/doctor-e2e/cypress.json | 12 + apps/e2e/doctor-e2e/project.json | 28 ++ apps/e2e/doctor-e2e/src/fixtures/example.json | 4 + .../doctor-e2e/src/integration/app.spec.ts | 13 + apps/e2e/doctor-e2e/src/support/app.po.ts | 1 + apps/e2e/doctor-e2e/src/support/commands.ts | 33 ++ apps/e2e/doctor-e2e/src/support/index.ts | 17 + apps/e2e/doctor-e2e/tsconfig.json | 10 + apps/frontend/doctor/.eslintrc.json | 31 ++ apps/frontend/doctor/index.d.ts | 6 + apps/frontend/doctor/jest.config.ts | 11 + apps/frontend/doctor/next-env.d.ts | 5 + apps/frontend/doctor/next.config.js | 15 + apps/frontend/doctor/pages/_app.tsx | 18 + apps/frontend/doctor/pages/index.tsx | 420 ++++++++++++++++++ apps/frontend/doctor/pages/styles.css | 400 +++++++++++++++++ apps/frontend/doctor/project.json | 60 +++ apps/frontend/doctor/public/.gitkeep | 0 apps/frontend/doctor/specs/index.spec.tsx | 11 + apps/frontend/doctor/tsconfig.json | 19 + apps/frontend/doctor/tsconfig.spec.json | 21 + workspace.json | 2 + 24 files changed, 1149 insertions(+), 1 deletion(-) create mode 100644 apps/e2e/doctor-e2e/.eslintrc.json create mode 100644 apps/e2e/doctor-e2e/cypress.json create mode 100644 apps/e2e/doctor-e2e/project.json create mode 100644 apps/e2e/doctor-e2e/src/fixtures/example.json create mode 100644 apps/e2e/doctor-e2e/src/integration/app.spec.ts create mode 100644 apps/e2e/doctor-e2e/src/support/app.po.ts create mode 100644 apps/e2e/doctor-e2e/src/support/commands.ts create mode 100644 apps/e2e/doctor-e2e/src/support/index.ts create mode 100644 apps/e2e/doctor-e2e/tsconfig.json create mode 100644 apps/frontend/doctor/.eslintrc.json create mode 100644 apps/frontend/doctor/index.d.ts create mode 100644 apps/frontend/doctor/jest.config.ts create mode 100644 apps/frontend/doctor/next-env.d.ts create mode 100644 apps/frontend/doctor/next.config.js create mode 100644 apps/frontend/doctor/pages/_app.tsx create mode 100644 apps/frontend/doctor/pages/index.tsx create mode 100644 apps/frontend/doctor/pages/styles.css create mode 100644 apps/frontend/doctor/project.json create mode 100644 apps/frontend/doctor/public/.gitkeep create mode 100644 apps/frontend/doctor/specs/index.spec.tsx create mode 100644 apps/frontend/doctor/tsconfig.json create mode 100644 apps/frontend/doctor/tsconfig.spec.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 04a1eb5..94e3851 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,8 @@ "ui", "types", "api", - "next-auth" + "next-auth", + "doctor" ], "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" diff --git a/apps/e2e/doctor-e2e/.eslintrc.json b/apps/e2e/doctor-e2e/.eslintrc.json new file mode 100644 index 0000000..3947051 --- /dev/null +++ b/apps/e2e/doctor-e2e/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/e2e/doctor-e2e/cypress.json b/apps/e2e/doctor-e2e/cypress.json new file mode 100644 index 0000000..a6c94e5 --- /dev/null +++ b/apps/e2e/doctor-e2e/cypress.json @@ -0,0 +1,12 @@ +{ + "fileServerFolder": ".", + "fixturesFolder": "./src/fixtures", + "integrationFolder": "./src/integration", + "modifyObstructiveCode": false, + "supportFile": "./src/support/index.ts", + "pluginsFile": false, + "video": true, + "videosFolder": "../../../dist/cypress/apps/e2e/doctor-e2e/videos", + "screenshotsFolder": "../../../dist/cypress/apps/e2e/doctor-e2e/screenshots", + "chromeWebSecurity": false +} diff --git a/apps/e2e/doctor-e2e/project.json b/apps/e2e/doctor-e2e/project.json new file mode 100644 index 0000000..4f47c40 --- /dev/null +++ b/apps/e2e/doctor-e2e/project.json @@ -0,0 +1,28 @@ +{ + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/e2e/doctor-e2e/src", + "projectType": "application", + "targets": { + "e2e": { + "executor": "@nrwl/cypress:cypress", + "options": { + "cypressConfig": "apps/e2e/doctor-e2e/cypress.json", + "devServerTarget": "frontend-doctor:serve:development" + }, + "configurations": { + "production": { + "devServerTarget": "frontend-doctor:serve:production" + } + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/e2e/doctor-e2e/**/*.{js,ts}"] + } + } + }, + "tags": [], + "implicitDependencies": ["frontend-doctor"] +} diff --git a/apps/e2e/doctor-e2e/src/fixtures/example.json b/apps/e2e/doctor-e2e/src/fixtures/example.json new file mode 100644 index 0000000..294cbed --- /dev/null +++ b/apps/e2e/doctor-e2e/src/fixtures/example.json @@ -0,0 +1,4 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io" +} diff --git a/apps/e2e/doctor-e2e/src/integration/app.spec.ts b/apps/e2e/doctor-e2e/src/integration/app.spec.ts new file mode 100644 index 0000000..9b79ac9 --- /dev/null +++ b/apps/e2e/doctor-e2e/src/integration/app.spec.ts @@ -0,0 +1,13 @@ +import { getGreeting } from '../support/app.po'; + +describe('frontend-doctor', () => { + beforeEach(() => cy.visit('/')); + + it('should display welcome message', () => { + // Custom command example, see `../support/commands.ts` file + cy.login('my-email@something.com', 'myPassword'); + + // Function helper example, see `../support/app.po.ts` file + getGreeting().contains('Welcome frontend-doctor'); + }); +}); diff --git a/apps/e2e/doctor-e2e/src/support/app.po.ts b/apps/e2e/doctor-e2e/src/support/app.po.ts new file mode 100644 index 0000000..3293424 --- /dev/null +++ b/apps/e2e/doctor-e2e/src/support/app.po.ts @@ -0,0 +1 @@ +export const getGreeting = () => cy.get('h1'); diff --git a/apps/e2e/doctor-e2e/src/support/commands.ts b/apps/e2e/doctor-e2e/src/support/commands.ts new file mode 100644 index 0000000..310f1fa --- /dev/null +++ b/apps/e2e/doctor-e2e/src/support/commands.ts @@ -0,0 +1,33 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** + +// eslint-disable-next-line @typescript-eslint/no-namespace +declare namespace Cypress { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface Chainable { + login(email: string, password: string): void; + } +} +// +// -- This is a parent command -- +Cypress.Commands.add('login', (email, password) => { + console.log('Custom command example: Login', email, password); +}); +// +// -- This is a child command -- +// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/apps/e2e/doctor-e2e/src/support/index.ts b/apps/e2e/doctor-e2e/src/support/index.ts new file mode 100644 index 0000000..3d469a6 --- /dev/null +++ b/apps/e2e/doctor-e2e/src/support/index.ts @@ -0,0 +1,17 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands'; diff --git a/apps/e2e/doctor-e2e/tsconfig.json b/apps/e2e/doctor-e2e/tsconfig.json new file mode 100644 index 0000000..54bd5ce --- /dev/null +++ b/apps/e2e/doctor-e2e/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "sourceMap": false, + "outDir": "../../../dist/out-tsc", + "allowJs": true, + "types": ["cypress", "node"] + }, + "include": ["src/**/*.ts", "src/**/*.js"] +} diff --git a/apps/frontend/doctor/.eslintrc.json b/apps/frontend/doctor/.eslintrc.json new file mode 100644 index 0000000..fff5b3c --- /dev/null +++ b/apps/frontend/doctor/.eslintrc.json @@ -0,0 +1,31 @@ +{ + "extends": [ + "plugin:@nrwl/nx/react-typescript", + "../../../.eslintrc.json", + "next", + "next/core-web-vitals" + ], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@next/next/no-html-link-for-pages": [ + "error", + "apps/frontend/doctor/pages" + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ], + "env": { + "jest": true + } +} diff --git a/apps/frontend/doctor/index.d.ts b/apps/frontend/doctor/index.d.ts new file mode 100644 index 0000000..7ba08fa --- /dev/null +++ b/apps/frontend/doctor/index.d.ts @@ -0,0 +1,6 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +declare module '*.svg' { + const content: any; + export const ReactComponent: any; + export default content; +} diff --git a/apps/frontend/doctor/jest.config.ts b/apps/frontend/doctor/jest.config.ts new file mode 100644 index 0000000..64b2482 --- /dev/null +++ b/apps/frontend/doctor/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: 'frontend-doctor', + preset: '../../../jest.preset.js', + transform: { + '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest', + '^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }], + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../../coverage/apps/frontend/doctor', +}; diff --git a/apps/frontend/doctor/next-env.d.ts b/apps/frontend/doctor/next-env.d.ts new file mode 100644 index 0000000..4f11a03 --- /dev/null +++ b/apps/frontend/doctor/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/frontend/doctor/next.config.js b/apps/frontend/doctor/next.config.js new file mode 100644 index 0000000..7922ea7 --- /dev/null +++ b/apps/frontend/doctor/next.config.js @@ -0,0 +1,15 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const withNx = require('@nrwl/next/plugins/with-nx'); + +/** + * @type {import('@nrwl/next/plugins/with-nx').WithNxOptions} + **/ +const nextConfig = { + nx: { + // Set this to true if you would like to to use SVGR + // See: https://github.com/gregberge/svgr + svgr: false, + }, +}; + +module.exports = withNx(nextConfig); diff --git a/apps/frontend/doctor/pages/_app.tsx b/apps/frontend/doctor/pages/_app.tsx new file mode 100644 index 0000000..1f41fd9 --- /dev/null +++ b/apps/frontend/doctor/pages/_app.tsx @@ -0,0 +1,18 @@ +import { AppProps } from 'next/app'; +import Head from 'next/head'; +import './styles.css'; + +function CustomApp({ Component, pageProps }: AppProps) { + return ( + <> + + Welcome to doctor! + +
+ +
+ + ); +} + +export default CustomApp; diff --git a/apps/frontend/doctor/pages/index.tsx b/apps/frontend/doctor/pages/index.tsx new file mode 100644 index 0000000..aa44346 --- /dev/null +++ b/apps/frontend/doctor/pages/index.tsx @@ -0,0 +1,420 @@ +import styled from '@emotion/styled'; + +const StyledPage = styled.div` + .page { + } +`; + +export function Index() { + /* + * Replace the elements below with your own. + * + * Note: The corresponding styles are in the ./index.@emotion/styled file. + */ + return ( + +
+
+
+

+ Hello there, + Welcome doctor 👋 +

+
+ +
+
+

+ + + + You're up and running +

+ What's next? +
+
+ + + +
+
+ + + +
+

Next steps

+

Here are some things you can do with Nx:

+
+ + + + + Add UI library + +
+                # Generate UI lib
+                nx g @nrwl/angular:lib ui
+                # Add a component
+                nx g @nrwl/angular:component button --project ui
+              
+
+
+ + + + + View interactive project graph + +
nx graph
+
+
+ + + + + Run affected commands + +
+                # see what's been affected by changes
+                nx affected:graph
+                # run tests for current changes
+                nx affected:test
+                # run e2e tests for current changes
+                nx affected:e2e
+              
+
+
+ +

+ Carefully crafted with + + + +

+
+
+
+ ); +} + +export default Index; diff --git a/apps/frontend/doctor/pages/styles.css b/apps/frontend/doctor/pages/styles.css new file mode 100644 index 0000000..7fe31fd --- /dev/null +++ b/apps/frontend/doctor/pages/styles.css @@ -0,0 +1,400 @@ +html { + -webkit-text-size-adjust: 100%; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, + Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; + line-height: 1.5; + tab-size: 4; + scroll-behavior: smooth; +} +body { + font-family: inherit; + line-height: inherit; + margin: 0; +} +h1, +h2, +p, +pre { + margin: 0; +} +*, +::before, +::after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: currentColor; +} +h1, +h2 { + font-size: inherit; + font-weight: inherit; +} +a { + color: inherit; + text-decoration: inherit; +} +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + Liberation Mono, Courier New, monospace; +} +svg { + display: block; + vertical-align: middle; + shape-rendering: auto; + text-rendering: optimizeLegibility; +} +pre { + background-color: rgba(55, 65, 81, 1); + border-radius: 0.25rem; + color: rgba(229, 231, 235, 1); + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + Liberation Mono, Courier New, monospace; + overflow: scroll; + padding: 0.5rem 0.75rem; +} + +.shadow { + box-shadow: 0 0 #0000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); +} +.rounded { + border-radius: 1.5rem; +} +.wrapper { + width: 100%; +} +.container { + margin-left: auto; + margin-right: auto; + max-width: 768px; + padding-bottom: 3rem; + padding-left: 1rem; + padding-right: 1rem; + color: rgba(55, 65, 81, 1); + width: 100%; +} +#welcome { + margin-top: 2.5rem; +} +#welcome h1 { + font-size: 3rem; + font-weight: 500; + letter-spacing: -0.025em; + line-height: 1; +} +#welcome span { + display: block; + font-size: 1.875rem; + font-weight: 300; + line-height: 2.25rem; + margin-bottom: 0.5rem; +} +#hero { + align-items: center; + background-color: hsla(214, 62%, 21%, 1); + border: none; + box-sizing: border-box; + color: rgba(55, 65, 81, 1); + display: grid; + grid-template-columns: 1fr; + margin-top: 3.5rem; +} +#hero .text-container { + color: rgba(255, 255, 255, 1); + padding: 3rem 2rem; +} +#hero .text-container h2 { + font-size: 1.5rem; + line-height: 2rem; + position: relative; +} +#hero .text-container h2 svg { + color: hsla(162, 47%, 50%, 1); + height: 2rem; + left: -0.25rem; + position: absolute; + top: 0; + width: 2rem; +} +#hero .text-container h2 span { + margin-left: 2.5rem; +} +#hero .text-container a { + background-color: rgba(255, 255, 255, 1); + border-radius: 0.75rem; + color: rgba(55, 65, 81, 1); + display: inline-block; + margin-top: 1.5rem; + padding: 1rem 2rem; + text-decoration: inherit; +} +#hero .logo-container { + display: none; + justify-content: center; + padding-left: 2rem; + padding-right: 2rem; +} +#hero .logo-container svg { + color: rgba(255, 255, 255, 1); + width: 66.666667%; +} +#middle-content { + align-items: flex-start; + display: grid; + gap: 4rem; + grid-template-columns: 1fr; + margin-top: 3.5rem; +} +#learning-materials { + padding: 2.5rem 2rem; +} +#learning-materials h2 { + font-weight: 500; + font-size: 1.25rem; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; +} +.list-item-link { + align-items: center; + border-radius: 0.75rem; + display: flex; + margin-top: 1rem; + padding: 1rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 100%; +} +.list-item-link svg:first-child { + margin-right: 1rem; + height: 1.5rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 1.5rem; +} +.list-item-link > span { + flex-grow: 1; + font-weight: 400; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.list-item-link > span > span { + color: rgba(107, 114, 128, 1); + display: block; + flex-grow: 1; + font-size: 0.75rem; + font-weight: 300; + line-height: 1rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.list-item-link svg:last-child { + height: 1rem; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 1rem; +} +.list-item-link:hover { + color: rgba(255, 255, 255, 1); + background-color: hsla(162, 47%, 50%, 1); +} +.list-item-link:hover > span { +} +.list-item-link:hover > span > span { + color: rgba(243, 244, 246, 1); +} +.list-item-link:hover svg:last-child { + transform: translateX(0.25rem); +} +#other-links { +} +.button-pill { + padding: 1.5rem 2rem; + transition-duration: 300ms; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + align-items: center; + display: flex; +} +.button-pill svg { + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + flex-shrink: 0; + width: 3rem; +} +.button-pill > span { + letter-spacing: -0.025em; + font-weight: 400; + font-size: 1.125rem; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; +} +.button-pill span span { + display: block; + font-size: 0.875rem; + font-weight: 300; + line-height: 1.25rem; +} +.button-pill:hover svg, +.button-pill:hover { + color: rgba(255, 255, 255, 1) !important; +} +#nx-console:hover { + background-color: rgba(0, 122, 204, 1); +} +#nx-console svg { + color: rgba(0, 122, 204, 1); +} +#nx-repo:hover { + background-color: rgba(24, 23, 23, 1); +} +#nx-repo svg { + color: rgba(24, 23, 23, 1); +} +#nx-cloud { + margin-bottom: 2rem; + margin-top: 2rem; + padding: 2.5rem 2rem; +} +#nx-cloud > div { + align-items: center; + display: flex; +} +#nx-cloud > div svg { + border-radius: 0.375rem; + flex-shrink: 0; + width: 3rem; +} +#nx-cloud > div h2 { + font-size: 1.125rem; + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; +} +#nx-cloud > div h2 span { + display: block; + font-size: 0.875rem; + font-weight: 300; + line-height: 1.25rem; +} +#nx-cloud p { + font-size: 1rem; + line-height: 1.5rem; + margin-top: 1rem; +} +#nx-cloud pre { + margin-top: 1rem; +} +#nx-cloud a { + color: rgba(107, 114, 128, 1); + display: block; + font-size: 0.875rem; + line-height: 1.25rem; + margin-top: 1.5rem; + text-align: right; +} +#nx-cloud a:hover { + text-decoration: underline; +} +#commands { + padding: 2.5rem 2rem; + margin-top: 3.5rem; +} +#commands h2 { + font-size: 1.25rem; + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; +} +#commands p { + font-size: 1rem; + font-weight: 300; + line-height: 1.5rem; + margin-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; +} +details { + align-items: center; + display: flex; + margin-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; + width: 100%; +} +details pre > span { + color: rgba(181, 181, 181, 1); + display: block; +} +summary { + border-radius: 0.5rem; + display: flex; + font-weight: 400; + padding: 0.5rem; + cursor: pointer; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +summary:hover { + background-color: rgba(243, 244, 246, 1); +} +summary svg { + height: 1.5rem; + margin-right: 1rem; + width: 1.5rem; +} +#love { + color: rgba(107, 114, 128, 1); + font-size: 0.875rem; + line-height: 1.25rem; + margin-top: 3.5rem; + opacity: 0.6; + text-align: center; +} +#love svg { + color: rgba(252, 165, 165, 1); + width: 1.25rem; + height: 1.25rem; + display: inline; + margin-top: -0.25rem; +} +@media screen and (min-width: 768px) { + #hero { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + #hero .logo-container { + display: flex; + } + #middle-content { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} diff --git a/apps/frontend/doctor/project.json b/apps/frontend/doctor/project.json new file mode 100644 index 0000000..45fb5e9 --- /dev/null +++ b/apps/frontend/doctor/project.json @@ -0,0 +1,60 @@ +{ + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/frontend/doctor", + "projectType": "application", + "targets": { + "build": { + "executor": "@nrwl/next:build", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "root": "apps/frontend/doctor", + "outputPath": "dist/apps/frontend/doctor" + }, + "configurations": { + "development": {}, + "production": {} + } + }, + "serve": { + "executor": "@nrwl/next:server", + "defaultConfiguration": "development", + "options": { + "buildTarget": "frontend-doctor:build", + "dev": true + }, + "configurations": { + "development": { + "buildTarget": "frontend-doctor:build:development", + "dev": true + }, + "production": { + "buildTarget": "frontend-doctor:build:production", + "dev": false + } + } + }, + "export": { + "executor": "@nrwl/next:export", + "options": { + "buildTarget": "frontend-doctor:build:production" + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/apps/frontend/doctor"], + "options": { + "jestConfig": "apps/frontend/doctor/jest.config.ts", + "passWithNoTests": true + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/frontend/doctor/**/*.{ts,tsx,js,jsx}"] + } + } + }, + "tags": [] +} diff --git a/apps/frontend/doctor/public/.gitkeep b/apps/frontend/doctor/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/frontend/doctor/specs/index.spec.tsx b/apps/frontend/doctor/specs/index.spec.tsx new file mode 100644 index 0000000..42c9402 --- /dev/null +++ b/apps/frontend/doctor/specs/index.spec.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { render } from '@testing-library/react'; + +import Index from '../pages/index'; + +describe('Index', () => { + it('should render successfully', () => { + const { baseElement } = render(); + expect(baseElement).toBeTruthy(); + }); +}); diff --git a/apps/frontend/doctor/tsconfig.json b/apps/frontend/doctor/tsconfig.json new file mode 100644 index 0000000..51ccd18 --- /dev/null +++ b/apps/frontend/doctor/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "jsx": "preserve", + "jsxImportSource": "@emotion/react", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "resolveJsonModule": true, + "isolatedModules": true, + "incremental": true, + "types": ["jest", "node"] + }, + "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts"], + "exclude": ["node_modules", "jest.config.ts"] +} diff --git a/apps/frontend/doctor/tsconfig.spec.json b/apps/frontend/doctor/tsconfig.spec.json new file mode 100644 index 0000000..8be8672 --- /dev/null +++ b/apps/frontend/doctor/tsconfig.spec.json @@ -0,0 +1,21 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"], + "jsx": "react" + }, + "include": [ + "jest.config.ts", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/workspace.json b/workspace.json index 89be322..54a42d9 100644 --- a/workspace.json +++ b/workspace.json @@ -3,8 +3,10 @@ "version": 2, "projects": { "api": "apps/api", + "e2e-doctor-e2e": "apps/e2e/doctor-e2e", "e2e-ui-e2e": "apps/e2e/ui-e2e", "e2e-user-e2e": "apps/e2e/user-e2e", + "frontend-doctor": "apps/frontend/doctor", "frontend-user": "apps/frontend/user", "next": "libs/next", "types": "libs/types",