Skip to content

Commit 3d33476

Browse files
committed
Add backoffice
1 parent 898ba5b commit 3d33476

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+28849
-2
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ OPENAI_API_KEY=
3030
# ----------------------
3131

3232
DEV_FRONTEND_PORT=3000
33+
DEV_CONSOLE_PORT=3002
3334
DEV_SERVER_PORT=3001
3435
DEV_POSTGRES_PORT=5432

console/.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Dockerfile
2+
.dockerignore
3+
.git
4+
.gitignore
5+
.gitattributes
6+
README.md
7+
.npmrc
8+
.prettierrc
9+
.eslintrc.cjs
10+
.graphqlrc
11+
.editorconfig
12+
.svelte-kit
13+
.vscode
14+
node_modules
15+
build
16+
package
17+
**/.env

console/.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

console/.eslintrc.cjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:svelte/recommended",
7+
"prettier",
8+
"plugin:storybook/recommended",
9+
"plugin:storybook/recommended"
10+
],
11+
parser: '@typescript-eslint/parser',
12+
plugins: ['@typescript-eslint'],
13+
parserOptions: {
14+
sourceType: 'module',
15+
ecmaVersion: 2020,
16+
extraFileExtensions: ['.svelte']
17+
},
18+
env: {
19+
browser: true,
20+
es2017: true,
21+
node: true
22+
},
23+
overrides: [
24+
{
25+
files: ['*.svelte'],
26+
parser: 'svelte-eslint-parser',
27+
parserOptions: {
28+
parser: '@typescript-eslint/parser'
29+
}
30+
}
31+
]
32+
};

console/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
vite.config.js.timestamp-*
10+
vite.config.ts.timestamp-*

console/.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/agent-ui.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/jsLibraryMappings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/jsLinters/eslint.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/prettier.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
resolution-mode=highest

console/.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

console/.prettierrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"useTabs": true,
3+
"trailingComma": "none",
4+
"tabWidth": 4,
5+
"printWidth": 100,
6+
"semi": true,
7+
"singleQuote": false,
8+
"jsxBracketSameLine": true,
9+
"overrides": [ {
10+
"files": "*.svelte",
11+
"options": {
12+
"svelteBracketNewLine": false,
13+
"svelteAllowShorthand": false,
14+
"svelteSortOrder" : "options-scripts-styles-markup",
15+
"plugins": [ "prettier-plugin-svelte" ]
16+
}
17+
} ],
18+
"pluginSearchDirs": [ "." ]
19+
}

console/.storybook/main.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { StorybookConfig } from "@storybook/sveltekit";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx|svelte)"],
5+
addons: [
6+
"@storybook/addon-svelte-csf",
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials",
9+
"@storybook/addon-interactions",
10+
{
11+
name: "@storybook/addon-styling",
12+
options: {}
13+
}
14+
],
15+
framework: {
16+
name: "@storybook/sveltekit",
17+
options: {}
18+
},
19+
docs: {
20+
autodocs: "tag"
21+
}
22+
};
23+
export default config;

console/.storybook/preview.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type { Preview } from "@storybook/svelte";
2+
3+
import { withThemeByClassName } from "@storybook/addon-styling";
4+
5+
import "../src/app.css";
6+
7+
const preview: Preview = {
8+
parameters: {
9+
actions: { argTypesRegex: "^on[A-Z].*" },
10+
controls: {
11+
matchers: {
12+
color: /(background|color)$/i,
13+
date: /Date$/
14+
}
15+
}
16+
},
17+
18+
decorators: [
19+
// Adds theme switching support.
20+
// NOTE: requires setting "darkMode" to "class" in your tailwind config
21+
withThemeByClassName({
22+
themes: {
23+
light: "light",
24+
dark: "dark"
25+
},
26+
defaultTheme: "light"
27+
})
28+
]
29+
};
30+
31+
export default preview;

console/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM node:20-alpine3.17 as build-stage
2+
3+
WORKDIR /app
4+
5+
COPY package*.json .
6+
7+
RUN npm ci
8+
9+
COPY . .
10+
11+
RUN npm run check
12+
13+
RUN npm run build
14+
15+
RUN npm prune --production
16+
17+
FROM node:20-alpine3.17
18+
19+
WORKDIR /app
20+
21+
COPY --from=build-stage /app/build build/
22+
COPY --from=build-stage /app/node_modules node_modules/
23+
COPY package.json .
24+
25+
ENV NODE_ENV=production
26+
27+
28+
CMD [ "sh", "-c", "node -r dotenv/config build" ]

console/Dockerfile.dev

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:20-alpine3.17
2+
3+
WORKDIR /app
4+
5+
VOLUME [ "/app" ]
6+
7+
# IMPORTANT:
8+
# As svelte kit uses vite under the hood, which itself use esbuild, it is necessary to install the deps from inside
9+
# the container as esbuild is a native dependency and it needs to be compiled for the target platform.
10+
11+
ENTRYPOINT [ "sh", "-c", "npm install && npm run dev -- --port 3000 --host" ]

console/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npm create svelte@latest
12+
13+
# create a new project in my-app
14+
npm create svelte@latest my-app
15+
```
16+
17+
## Developing
18+
19+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
21+
```bash
22+
npm run dev
23+
24+
# or start the server and open the app in a new browser tab
25+
npm run dev -- --open
26+
```
27+
28+
## Building
29+
30+
To create a production version of your app:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
You can preview the production build with `npm run preview`.
37+
38+
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

0 commit comments

Comments
 (0)