feat: initial commit

This commit is contained in:
Wlad Meixner 2023-01-06 17:55:11 +01:00
parent 28ea5ec8f1
commit 143739ad95
18 changed files with 1985 additions and 0 deletions

1
assets/logo.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 297.35 94.95"><defs><style>.cls-1{font-size:12px;}.cls-1,.cls-2{font-family:Manrope-Medium, Manrope;font-variation-settings:'wght' 500;font-weight:500;}.cls-1,.cls-3{fill:#53bc83;}.cls-2{font-size:43.84px;}.cls-4{stroke-width:3px;}.cls-4,.cls-5{fill:none;stroke:#53bc83;stroke-miterlimit:10;}.cls-6{letter-spacing:-.04em;}.cls-7{letter-spacing:0em;}.cls-8{fill:#fff;letter-spacing:0em;}.cls-5{stroke-width:4px;}.cls-9{letter-spacing:-.1em;}</style></defs><g id="Layer_1-2"><g><rect class="cls-3" x="226.12" y="11.65" width="56.81" height="48.06" rx="12" ry="12"/><rect class="cls-5" x="2" y="2" width="293.35" height="90.95"/><text class="cls-2" transform="translate(92.43 51.04)"><tspan class="cls-3" x="0" y="0">Compl </tspan><tspan class="cls-8" x="141.92" y="0">AI</tspan></text><text class="cls-1" transform="translate(108.8 76.95)"><tspan x="0" y="0">COMP</tspan><tspan class="cls-9" x="34.99" y="0">L</tspan><tspan class="cls-6" x="40.01" y="0">Y</tspan><tspan class="cls-7" x="46.42" y="0" xml:space="preserve"> WITH THE FUTURE</tspan></text><g><polygon class="cls-4" points="16.56 29.8 16.56 65.43 47.41 83.24 78.25 65.43 78.25 29.8 47.41 11.99 16.56 29.8"/><polygon class="cls-4" points="23.83 34 23.83 61.23 47.41 74.84 70.98 61.23 70.98 34 47.41 20.39 23.83 34"/><line class="cls-4" x1="47.41" y1="20.39" x2="47.37" y2="12.43"/><line class="cls-4" x1="23.83" y1="34" x2="16.98" y2="30.24"/><line class="cls-4" x1="23.83" y1="61.23" x2="16.91" y2="65.25"/><line class="cls-4" x1="47.41" y1="74.84" x2="47.41" y2="83.24"/><line class="cls-4" x1="70.74" y1="60.78" x2="78.25" y2="65.43"/><line class="cls-4" x1="70.98" y1="34" x2="77.91" y2="30.16"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

13
frontend/.eslintignore Normal file
View File

@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

20
frontend/.eslintrc.cjs Normal file
View File

@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};

10
frontend/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
frontend/.npmrc Normal file
View File

@ -0,0 +1 @@
engine-strict=true

13
frontend/.prettierignore Normal file
View File

@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

9
frontend/.prettierrc Normal file
View File

@ -0,0 +1,9 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

38
frontend/README.md Normal file
View File

@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

31
frontend/package.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^1.0.0",
"@sveltejs/kit": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"svelte": "^3.54.0",
"svelte-check": "^2.9.2",
"tslib": "^2.4.1",
"typescript": "^4.9.3",
"vite": "^4.0.0"
},
"type": "module"
}

1768
frontend/pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

9
frontend/src/app.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
declare namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}

12
frontend/src/app.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

View File

@ -0,0 +1,19 @@
<div>
<img src="/logo.svg" width="400" />
</div>
<style global>
div,
body,
html {
width: 100%;
height: 100%;
}
div {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
</style>

BIN
frontend/static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

1
frontend/static/logo.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 297.35 94.95"><defs><style>.cls-1{font-size:12px;}.cls-1,.cls-2{font-family:Manrope-Medium, Manrope;font-variation-settings:'wght' 500;font-weight:500;}.cls-1,.cls-3{fill:#53bc83;}.cls-2{font-size:43.84px;}.cls-4{stroke-width:3px;}.cls-4,.cls-5{fill:none;stroke:#53bc83;stroke-miterlimit:10;}.cls-6{letter-spacing:-.04em;}.cls-7{letter-spacing:0em;}.cls-8{fill:#fff;letter-spacing:0em;}.cls-5{stroke-width:4px;}.cls-9{letter-spacing:-.1em;}</style></defs><g id="Layer_1-2"><g><rect class="cls-3" x="226.12" y="11.65" width="56.81" height="48.06" rx="12" ry="12"/><rect class="cls-5" x="2" y="2" width="293.35" height="90.95"/><text class="cls-2" transform="translate(92.43 51.04)"><tspan class="cls-3" x="0" y="0">Compl </tspan><tspan class="cls-8" x="141.92" y="0">AI</tspan></text><text class="cls-1" transform="translate(108.8 76.95)"><tspan x="0" y="0">COMP</tspan><tspan class="cls-9" x="34.99" y="0">L</tspan><tspan class="cls-6" x="40.01" y="0">Y</tspan><tspan class="cls-7" x="46.42" y="0" xml:space="preserve"> WITH THE FUTURE</tspan></text><g><polygon class="cls-4" points="16.56 29.8 16.56 65.43 47.41 83.24 78.25 65.43 78.25 29.8 47.41 11.99 16.56 29.8"/><polygon class="cls-4" points="23.83 34 23.83 61.23 47.41 74.84 70.98 61.23 70.98 34 47.41 20.39 23.83 34"/><line class="cls-4" x1="47.41" y1="20.39" x2="47.37" y2="12.43"/><line class="cls-4" x1="23.83" y1="34" x2="16.98" y2="30.24"/><line class="cls-4" x1="23.83" y1="61.23" x2="16.91" y2="65.25"/><line class="cls-4" x1="47.41" y1="74.84" x2="47.41" y2="83.24"/><line class="cls-4" x1="70.74" y1="60.78" x2="78.25" y2="65.43"/><line class="cls-4" x1="70.98" y1="34" x2="77.91" y2="30.16"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

15
frontend/svelte.config.js Normal file
View File

@ -0,0 +1,15 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
adapter: adapter()
}
};
export default config;

17
frontend/tsconfig.json Normal file
View File

@ -0,0 +1,17 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

8
frontend/vite.config.ts Normal file
View File

@ -0,0 +1,8 @@
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
const config: UserConfig = {
plugins: [sveltekit()]
};
export default config;