Skip to content

Commit b64b98e

Browse files
author
Luferov Victor
committed
Init
0 parents  commit b64b98e

File tree

986 files changed

+101111
-0
lines changed

Some content is hidden

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

986 files changed

+101111
-0
lines changed

.editorconfig

+442
Large diffs are not rendered by default.

.flake8

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[flake8]
2+
max-line-length = 120
3+
per-file-ignores =
4+
__init__.py:F401
5+
ignore = F401, SC200, ANN002, ANN003, ANN001, ANN101, I100, I201, I202
6+
exclude = .git,.github,.venv,__pycache__,migrations,docs
7+
# ignore = ANN001, ANN002, ANN003, ANN101,ANN102, ANN206, D107
8+
import-order-style = pycharm
9+
dictionaries=en_US,python,technical,django

.github/dependabot.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "client"
5+
schedule:
6+
interval: daily
7+
time: "02:00"
8+
open-pull-requests-limit: 10
9+
10+
- package-ecosystem: pip
11+
directory: "server"
12+
schedule:
13+
interval: daily
14+
time: "02:00"
15+
open-pull-requests-limit: 10
16+
17+
- package-ecosystem: github-actions
18+
directory: "/"
19+
schedule:
20+
interval: daily
21+
time: "02:00"
22+
open-pull-requests-limit: 10

.github/workflows/build.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build_server:
14+
name: Build server
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Log in to the Cntainer registry
22+
uses: docker/login-action@v2
23+
with:
24+
registry: ${{ env.REGISTRY }}
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Extra metadata (tags, labels)
28+
id: meta
29+
uses: docker/metadata-action@v4
30+
with:
31+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/eleden-server
32+
- name: Build and push Docker image
33+
uses: docker/build-push-action@v3
34+
with:
35+
context: ./server
36+
push: true
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}
39+
40+
build_client:
41+
name: Build client
42+
runs-on: ubuntu-latest
43+
permissions:
44+
contents: read
45+
packages: write
46+
steps:
47+
- uses: actions/checkout@v3
48+
- name: Log in to the Cntainer registry
49+
uses: docker/login-action@v2
50+
with:
51+
registry: ${{ env.REGISTRY }}
52+
username: ${{ github.actor }}
53+
password: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Extra metadata (tags, labels)
55+
id: meta
56+
uses: docker/metadata-action@v4
57+
with:
58+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/eleden-client
59+
- name: Build and push Docker image
60+
uses: docker/build-push-action@v3
61+
with:
62+
context: ./client
63+
push: true
64+
tags: ${{ steps.meta.outputs.tags }}
65+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.idea/
2+
client/.nuxt/
3+
client/nuxt-dist/
4+
client/coverage/
5+
client/node_modules/
6+
client/static/storage
7+
cliet/.output
8+
server/venv/
9+
venv/
10+
__pycache__/
11+
.env
12+
client/.env
13+
server/.env
14+
server/storage/**
15+
!server/storage/readme.md
16+
client/static/sw.js
17+
client/dist

.graphqlconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "Eleden",
3+
"schemaPath": "client/schema.graphql",
4+
"extensions": {
5+
"endpoints": {
6+
"Default GraphQL Endpoint": {
7+
"url": "http://localhost:8000/graphql/",
8+
"headers": {
9+
"user-agent": "JS GraphQL"
10+
},
11+
"introspect": true
12+
}
13+
}
14+
}
15+
}

client/.babelrc

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"plugins": [
3+
["@babel/plugin-proposal-private-methods", { "loose": true }],
4+
["@babel/plugin-proposal-class-properties", { "loose": true }],
5+
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
6+
["@babel/plugin-proposal-optional-chaining", { "loose": true }]
7+
],
8+
"presets": [
9+
["@babel/preset-env", { "targets": { "node": true }}]
10+
],
11+
"env": {
12+
"test": {
13+
"presets": [
14+
[
15+
"@babel/preset-env",
16+
{
17+
"targets": {
18+
"node": "current",
19+
"esmodules": true
20+
}
21+
}
22+
]
23+
]
24+
}
25+
}
26+
}

client/.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.nuxt/
2+
node_modules/
3+
.editorconfig
4+
.env
5+
.env.example
6+
README.md

client/.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

client/.env.example

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
APP_NAME="Электронная образовательная среда"
2+
URL=https://devind.ru
3+
API_URL=http://localhost:8000/graphql/
4+
API_URL_BROWSER=http://localhost:8000/graphql/
5+
WS_URL=ws://localhost:8000/graphql/
6+
CLIENT_ID=4nbfxL69fcCMLrYVXcomGJzexAtfMg8B5b2cuxED
7+
CLIENT_SECRET=eIgbGP38siVvFpqk1WLbtAZkzppDkwB9WsoW8nZXbfiQoK9d5VAIEAn0wVoPVV9c9Q9cAAnPvl2KWFZbnvfDg0T426FpNtQCeBoKLhBPy9dBH5f4YiM3EcAirlhblwO4
8+
9+
SENTRY_CLIENT_DSN=
10+
11+
ASK=
12+
13+
BUILD=eleden

client/.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
static/sw.js
2+
node_modules/

client/.eslintrc.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true
6+
},
7+
extends: [
8+
'@nuxtjs/eslint-config-typescript',
9+
'plugin:nuxt/recommended'
10+
],
11+
plugins: ['import'],
12+
// add your custom rules here
13+
rules: {},
14+
settings: {
15+
'import/parsers': {
16+
'@typescript-eslint/parser': ['.ts', '.tsx']
17+
},
18+
'import/resolver': {
19+
typescript: './tsconfig.json'
20+
}
21+
},
22+
overrides: [{
23+
files: ['**/*.d.ts'],
24+
rules: {
25+
'no-unused-vars': 'off',
26+
'@typescript-eslint/no-unused-vars': 'off',
27+
'no-use-before-define': 'off',
28+
'@typescript-eslint/no-use-before-define': 'off'
29+
}
30+
},
31+
{
32+
files: ['**/*.vue'],
33+
rules: {
34+
'no-use-before-define': 'off',
35+
'@typescript-eslint/no-use-before-define': 'off',
36+
'vue/multi-word-component-names': 'off'
37+
}
38+
},
39+
{
40+
files: ['**/*.ts'],
41+
rules: {
42+
'no-undef': 'off',
43+
'import/no-mutable-exports': 'off'
44+
}
45+
},
46+
{
47+
files: ['**/graphql.d.ts'],
48+
rules: {
49+
camelcase: 'off'
50+
}
51+
}]
52+
}

client/Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:16.15.0
2+
3+
MAINTAINER Luferov Victor <[email protected]>
4+
5+
ENV HOST 0.0.0.0
6+
7+
RUN apt-get update -y && apt-get upgrade -y
8+
9+
RUN mkdir -p /usr/src/app
10+
11+
WORKDIR /usr/src/app
12+
13+
COPY . /usr/src/app
14+
15+
RUN yarn
16+
17+
ENV NODE_ENV=production
18+
RUN yarn build
19+
20+
EXPOSE 3000

client/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# devind-launcher
2+
3+
4+
## Build Setup
5+
6+
```bash
7+
# install dependencies
8+
$ yarn install
9+
10+
# serve with hot reload at localhost:3000
11+
$ yarn dev
12+
13+
# build for production and launch server
14+
$ yarn build
15+
$ yarn start
16+
17+
# generate static project
18+
$ yarn generate
19+
```
20+
21+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

client/assets/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ASSETS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

client/assets/variables.scss

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Ref: https://github.com/nuxt-community/vuetify-module#customvariables
2+
//
3+
// The variables you want to modify
4+
// $font-size-root: 20px;
5+
6+
.page_title {
7+
font-size: 3rem;
8+
font-weight: 300;
9+
letter-spacing: 0;
10+
}

client/codegen.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
overwrite: true
2+
schema: "http://127.0.0.1:8000/graphql/"
3+
documents: 'gql/**/*.graphql'
4+
generates:
5+
schema.graphql:
6+
plugins:
7+
- schema-ast
8+
config:
9+
includeDirectives: true
10+
./types/graphql.d.ts:
11+
hooks:
12+
afterOneFileWrite:
13+
- eslint --fix
14+
plugins:
15+
- typescript
16+
- typescript-operations
17+
# - typescript-vue-apollo
18+
config:
19+
enumsAsTypes: true
20+
# withCompositionFunctions: true
21+
# vueCompositionApiImportFrom: vue

client/components/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# COMPONENTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
The components directory contains your Vue.js Components.
6+
7+
_Nuxt.js doesn't supercharge these components._
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template lang="pug">
2+
v-container(v-bind="$attrs")
3+
v-breadcrumbs.px-0(:items="links")
4+
template(#divider)
5+
v-icon mdi-chevron-double-right
6+
slot
7+
</template>
8+
9+
<script lang="ts">
10+
import type { ComputedRef, PropType } from '#app'
11+
import { computed, defineComponent } from '#app'
12+
import { useI18n } from '~/composables'
13+
import { BreadCrumbsItem } from '~/types/devind'
14+
15+
export default defineComponent({
16+
props: {
17+
items: { type: Array as PropType<BreadCrumbsItem[]>, required: true }
18+
},
19+
setup (props) {
20+
const { t, localePath } = useI18n()
21+
22+
const links: ComputedRef<BreadCrumbsItem[]> = computed<BreadCrumbsItem[]>(() => {
23+
if (localePath({ path: props.items[0].to }) === localePath({ path: '/' })) {
24+
return props.items
25+
}
26+
return [
27+
{ text: t('index.main') as string, disabled: false, to: localePath('index') },
28+
...props.items
29+
]
30+
})
31+
return { links }
32+
}
33+
})
34+
</script>

0 commit comments

Comments
 (0)