Compare commits

...

17 Commits

@ -0,0 +1,16 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,*.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3307
MYSQL_DATABASE_NAME=gs_database
MYSQL_DATABASE_USERNAME=gs_username
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=gs_password
SMTP_HOST=mail.infomaniak.com
SMTP_PORT=587
SMTP_USERNAME=synology@naser.fr
SMTP_PASSWORD=Em18071988!
SMTP_DEFAULT_FROM=no-reply@strapi.io
SMTP_DEFAULT_REPLY=synology@naser.fr

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3306
MYSQL_DATABASE_NAME=dpxtrufj_gs_database
MYSQL_DATABASE_USERNAME=dpxtrufj_gs_username
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=q7=@oa*F*s4?8*Hq4H
SMTP_HOST=node143-eu.n0c.com
SMTP_PORT=587
SMTP_USERNAME=no-reply@nasercloud.fr
SMTP_PASSWORD=GuitarSchool123!
SMTP_DEFAULT_FROM=no-reply@strapi.io
SMTP_DEFAULT_REPLY=synology@naser.fr

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3306
MYSQL_DATABASE_NAME=dpxtrufj_gs_database
MYSQL_DATABASE_USERNAME=dpxtrufj_gs_user
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=q7=@oa*F*s4?8*Hq4H
SMTP_HOST=node143-eu.n0c.com
SMTP_PORT=587
SMTP_USERNAME=no-reply@nasercloud.fr
SMTP_PASSWORD=GuitarSchool123!
SMTP_DEFAULT_FROM=no-reply@nasercloud.fr
SMTP_DEFAULT_REPLY=contact@nasercloud.fr

@ -0,0 +1,3 @@
.cache
build
**/node_modules/**

@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"es6": true,
"node": true,
"browser": false
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": false
},
"sourceType": "module"
},
"globals": {
"strapi": true
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-console": 0,
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}

115
.gitignore vendored

@ -0,0 +1,115 @@
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
.tmp
*.log
*.sql
*.sqlite
*.sqlite3
############################
# Misc.
############################
*#
ssl
.idea
nbproject
public/uploads/*
!public/uploads/.gitkeep
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
############################
# Tests
############################
testApp
coverage
############################
# Strapi
############################
.env
license.txt
exports
*.cache
dist
build
.strapi-updater.json

@ -0,0 +1,18 @@
/**
* This file was automatically generated by Strapi.
* Any modifications made will be discarded.
*/
import i18N from "@strapi/plugin-i18n/strapi-admin";
import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin";
import importExportEntries from "strapi-plugin-import-export-entries/strapi-admin";
import menus from "strapi-plugin-menus/strapi-admin";
import { renderAdmin } from "@strapi/strapi/admin";
renderAdmin(document.getElementById("strapi"), {
plugins: {
i18n: i18N,
"users-permissions": usersPermissions,
"import-export-entries": importExportEntries,
menus: menus,
},
});

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<!--
This file was automatically generated by Strapi.
Any modifications made will be discarded.
-->
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<meta name="robots" content="noindex" />
<meta name="referrer" content="same-origin" />
<title>Strapi Admin</title>
<style>
html,
body,
#strapi {
height: 100%;
}
body {
margin: 0;
-webkit-font-smoothing: antialiased;
}
</style>
</head>
<body>
<div id="strapi"></div>
<noscript
><div class="strapi--root">
<div class="strapi--no-js">
<style type="text/css">
.strapi--root {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: #fff;
}
.strapi--no-js {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
font-family: helvetica, arial, sans-serif;
}
</style>
<h1>JavaScript disabled</h1>
<p>
Please
<a href="https://www.enable-javascript.com/">enable JavaScript</a>
in your browser and reload the page to proceed.
</p>
</div>
</div></noscript
>
</body>
</html>

@ -0,0 +1,8 @@
export default ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET'),
},
apiToken: {
salt: env('API_TOKEN_SALT'),
},
});

@ -0,0 +1,10 @@
export default {
responses: {
privateAttributes: ['_v', 'id', 'created_at'],
},
rest: {
defaultLimit: 100,
maxLimit: 250,
withCount: true,
},
};

@ -0,0 +1,20 @@
export default ({env}) => ({
connection: {
client: 'mysql',
connection: {
host: env('MYSQL_DATABASE_HOST', 'localhost'),
port: env.int('MYSQL_DATABASE_PORT', 3306),
database: env('MYSQL_DATABASE_NAME', 'bank'),
user: env('MYSQL_DATABASE_USERNAME', 'postgres'),
password: env('MYSQL_DATABASE_PASSWORD', '0000'),
},
debug: false,
},
// connection: {
// client: 'sqlite',
// connection: {
// filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')),
// },
// useNullAsDefault: true,
// },
});

@ -0,0 +1,30 @@
export default [
'strapi::errors',
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ['\'self\'', 'https:'],
'img-src': ['\'self\'', 'data:', 'blob:', 'res.cloudinary.com'],
'media-src': [
'\'self\'',
'data:',
'blob:',
'res.cloudinary.com',
],
upgradeInsecureRequests: null,
},
},
},
},
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];

@ -0,0 +1,40 @@
module.exports = ({env}) => ({
// ...
email: {
config: {
provider: 'nodemailer',
providerOptions: {
host: env('SMTP_HOST', 'smtp.example.com'),
port: env('SMTP_PORT', 587),
auth: {
user: env('SMTP_USERNAME'),
pass: env('SMTP_PASSWORD'),
},
// ... any custom nodemailer options
},
settings: {
defaultFrom: env('SMTP_DEFAULT_FROM', 'no-reply@strapi.io'),
defaultReplyTo: env('SMTP_DEFAULT_REPLY', 'synology@naser.fr'),
},
},
},
'import-export-entries': {
enabled: true
},
upload: {
config: {
provider: 'cloudinary',
providerOptions: {
cloud_name: 'djgzqzujy',
api_key: '161331531972295',
api_secret: '-Yk554hkcAD9x7_pkPN_2knXAMg',
},
actionOptions: {
upload: {},
uploadStream: {},
delete: {},
},
},
},
// ...
});

@ -0,0 +1,7 @@
export default ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});

@ -0,0 +1,46 @@
services:
# PostgreSQL (Database)
#gs_postgres:
# extends:
# file: apps/backend/postgres.yml
# service: gs_postgres
# MySQL (Database)
gs_mysql:
extends:
file: ./mysql.yml
service: gs_mysql
gs_phpmyadmin:
extends:
file: ./mysql.yml
service: gs_phpmyadmin
gs_redis:
image: "redis:alpine"
ports:
- "6379:6379"
gs-meili:
image: "getmeili/meilisearch"
ports:
- "7700:7700"
environment:
- MEILI_MASTER_KEY=GuitarMasterKeys
gs_redis_commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:gs_redis:6379
ports:
- "8081:8081"
depends_on:
- gs_redis
volumes:
gs_postgres-master:
driver: local
gs_mariadb-master:
driver: local

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,32 @@
services:
gs_mysql:
image: 'mariadb:10.3'
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE_NAME}
# So you don't have to use root, but you can if you like
MYSQL_USER: ${MYSQL_DATABASE_USERNAME}
# You can use whatever password you like
MYSQL_PASSWORD: ${MYSQL_DATABASE_PASSWORD}
# Password for root access
MYSQL_ROOT_PASSWORD: ${MYSQL_DATABASE_ROOT_PASSWORD}
ports:
# <Port exposed> : < MySQL Port running inside container>
- '${MYSQL_DATABASE_PORT}:3306'
expose:
# Opens port 3306 on the container
- '${MYSQL_DATABASE_PORT}'
# Where our data will be persisted
volumes:
- gs_mariadb-master:/var/lib/mysql
gs_phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: gs-phpmyadmin
environment:
PMA_ARBITRARY: 1
PMA_HOST: gs_mysql
PMA_USER: root
PMA_PASSWORD: ${MYSQL_DATABASE_ROOT_PASSWORD}
UPLOAD_LIMIT: 20M
ports:
- 8899:80

5860
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -4,17 +4,32 @@
"version": "0.1.0", "version": "0.1.0",
"description": "A Strapi application", "description": "A Strapi application",
"scripts": { "scripts": {
"predevelop": "docker-compose up -d",
"develop": "strapi develop", "develop": "strapi develop",
"start": "strapi start", "start": "strapi start",
"build": "strapi build", "build": "strapi build",
"strapi": "strapi" "strapi": "strapi",
"build:staging": "npm run build",
"generate:staging": "node scripts/strapi/build-staging.js"
}, },
"devDependencies": {},
"dependencies": { "dependencies": {
"@strapi/strapi": "4.6.0", "@strapi/plugin-i18n": "4.24.0",
"@strapi/plugin-users-permissions": "4.6.0", "@strapi/plugin-users-permissions": "4.24.0",
"@strapi/plugin-i18n": "4.6.0", "@strapi/provider-email-nodemailer": "4.24.0",
"better-sqlite3": "7.4.6" "@strapi/provider-upload-cloudinary": "4.24.0",
"@strapi/strapi": "4.24.0",
"@strapi/utils": "4.24.0",
"better-sqlite3": "9.5.0",
"cloudinary": "2.2.0",
"mysql": "2.18.1",
"pg": "8.11.5",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-router-dom": "5.2.0",
"strapi-plugin-import-export-entries": "1.23.1",
"strapi-plugin-menus": "1.6.1",
"strapi-plugin-populate-deep": "3.0.1",
"styled-components": "5.3.11"
}, },
"author": { "author": {
"name": "A Strapi developer" "name": "A Strapi developer"
@ -26,5 +41,9 @@
"node": ">=14.19.1 <=18.x.x", "node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0" "npm": ">=6.0.0"
}, },
"license": "MIT" "license": "MIT",
"devDependencies": {
"caniuse-lite": "^1.0.30001612",
"request": "^2.88.2"
}
} }

@ -0,0 +1,20 @@
services:
gs_postgres:
image: postgres:14-alpine
container_name: gs_postgres
shm_size: '4gb'
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
TZ: Europe/Paris
healthcheck:
test: 'PGPASSWORD="${DATABASE_PASSWORD}" psql --host ${DATABASE_HOST} --username ${DATABASE_USERNAME} --dbname ${DATABASE_NAME} -c "select 1" ; [ "0" -eq "$$?" ]; echo $$?'
interval: 30s
timeout: 10s
retries: 3
volumes:
- gs_postgres-master:/var/lib/postgresql/data:z
- ./.db/init:/docker-entrypoint-initdb.d
ports:
- ${DATABASE_PORT}:5432 # DB

@ -0,0 +1,9 @@
const fs = require('fs');
const fse = require('fs-extra');
const path = require('path');
fse.copySync(path.join(__dirname, '..', '..', 'public'), path.join(__dirname, '..', '..', 'dist', 'strapi', 'public'));
fs.copyFileSync(path.join(__dirname, '..', '..', '.env.staging'), path.join(__dirname, '..', '..', 'dist', 'strapi', '.env'));
fs.copyFileSync(path.join(__dirname, 'sources/server.js'), path.join(__dirname, '..', '..', 'dist', 'strapi', 'server.js'));
fs.copyFileSync(path.join(__dirname, 'sources/package.json'), path.join(__dirname, '..', '..', 'dist', 'strapi', 'package.json'));
fs.copyFileSync(path.join(__dirname, 'sources/strapi-updater.json'), path.join(__dirname, '..', '..', 'dist', 'strapi', '.strapi-updater.json'));

@ -0,0 +1,32 @@
{
"name": "nx-guitar-school",
"version": "0.0.0",
"overrides": {
"@strapi/strapi": "4.5.4"
},
"dependencies": {
"@strapi/plugin-i18n": "4.6.0",
"@strapi/plugin-users-permissions": "4.6.0",
"@strapi/provider-email-nodemailer": "4.5.6",
"@strapi/strapi": "^4.6.0",
"@strapi/utils": "4.5.6",
"better-sqlite3": "7.4.6",
"mysql": "2.18.1",
"pg": "8.8.0",
"strapi-plugin-import-export-entries": "1.18.0",
"strapi-plugin-meilisearch": "^0.9.1",
"strapi-plugin-menus": "1.2.1",
"strapi-plugin-populate-deep": "1.1.2"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "d1de7a93-c68b-4597-80ee-b5b56ea4eb10"
},
"engines": {
"node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}

@ -0,0 +1,3 @@
const strapi = require('@strapi/strapi');
const app = strapi({distDir: './dist'});
app.start();

@ -0,0 +1,4 @@
{
"latest": "4.5.6",
"lastUpdateCheck": 1674315789881
}

@ -0,0 +1,35 @@
export default {
config: {
locales: [
// 'ar',
// 'fr',
// 'cs',
// 'de',
// 'dk',
// 'es',
// 'he',
// 'id',
// 'it',
// 'ja',
// 'ko',
// 'ms',
// 'nl',
// 'no',
// 'pl',
// 'pt-BR',
// 'pt',
// 'ru',
// 'sk',
// 'sv',
// 'th',
// 'tr',
// 'uk',
// 'vi',
// 'zh-Hans',
// 'zh',
],
},
bootstrap(app) {
console.log(app);
},
};

@ -0,0 +1,13 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/admin",
"include": [
"../plugins/**/admin/src/**/*",
"./"
],
"exclude": [
"node_modules/",
"build/",
"dist/",
"**/*.test.ts"
]
}

@ -1,9 +1,12 @@
'use strict'; 'use strict';
const MonacoWebackPlugin = require('monaco-editor-webpack-plugin');
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
module.exports = (config, webpack) => { module.exports = (config, webpack) => {
// Note: we provide webpack above so you should not `require` it // Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config // Perform customizations to webpack config
// Important: return the modified config // Important: return the modified config
config.plugins.push(new MonacoWebackPlugin())
return config; return config;
}; };

@ -0,0 +1,57 @@
{
"kind": "collectionType",
"collectionName": "articles",
"info": {
"singularName": "article",
"pluralName": "articles",
"displayName": "Article",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"content": {
"type": "richtext"
},
"slug": {
"type": "uid",
"targetField": "title"
},
"category": {
"type": "relation",
"relation": "manyToOne",
"target": "api::category.category",
"inversedBy": "articles"
},
"image": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
},
"author": {
"type": "relation",
"relation": "manyToOne",
"target": "api::writer.writer",
"inversedBy": "articles"
},
"seo": {
"type": "component",
"repeatable": false,
"component": "shared.seo"
}
}
}

@ -0,0 +1,7 @@
/**
* article controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::article.article');

@ -0,0 +1,7 @@
/**
* article router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::article.article');

@ -0,0 +1,7 @@
/**
* article service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::article.article');

@ -0,0 +1,45 @@
{
"kind": "collectionType",
"collectionName": "categories",
"info": {
"singularName": "category",
"pluralName": "categories",
"displayName": "Category",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name"
},
"articles": {
"type": "relation",
"relation": "oneToMany",
"target": "api::article.article",
"mappedBy": "category"
},
"image": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
},
"seo": {
"type": "component",
"repeatable": false,
"component": "shared.seo"
}
}
}

@ -0,0 +1,7 @@
/**
* category controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::category.category');

@ -0,0 +1,7 @@
/**
* category router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::category.category');

@ -0,0 +1,7 @@
/**
* category service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::category.category');

@ -0,0 +1,35 @@
{
"kind": "collectionType",
"collectionName": "filter_categories",
"info": {
"singularName": "filter-category",
"pluralName": "filter-categories",
"displayName": "filter category",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "label"
},
"filter_items": {
"type": "relation",
"relation": "oneToMany",
"target": "api::filter-item.filter-item",
"mappedBy": "filter_category"
},
"filter_section": {
"type": "relation",
"relation": "manyToOne",
"target": "api::filter-section.filter-section",
"inversedBy": "filter_categories"
}
}
}

@ -0,0 +1,7 @@
/**
* filter-category controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::filter-category.filter-category');

@ -0,0 +1,7 @@
/**
* filter-category router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::filter-category.filter-category');

@ -0,0 +1,7 @@
/**
* filter-category service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::filter-category.filter-category');

@ -0,0 +1,35 @@
{
"kind": "collectionType",
"collectionName": "filter_items",
"info": {
"singularName": "filter-item",
"pluralName": "filter-items",
"displayName": "Filter item",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "label"
},
"product": {
"type": "relation",
"relation": "manyToOne",
"target": "api::product.product",
"inversedBy": "filter_items"
},
"filter_category": {
"type": "relation",
"relation": "manyToOne",
"target": "api::filter-category.filter-category",
"inversedBy": "filter_items"
}
}
}

@ -0,0 +1,7 @@
/**
* filter-item controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::filter-item.filter-item');

@ -0,0 +1,7 @@
/**
* filter-item router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::filter-item.filter-item');

@ -0,0 +1,7 @@
/**
* filter-item service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::filter-item.filter-item');

@ -0,0 +1,29 @@
{
"kind": "collectionType",
"collectionName": "filter_sections",
"info": {
"singularName": "filter-section",
"pluralName": "filter-sections",
"displayName": "Filter section",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "label"
},
"filter_categories": {
"type": "relation",
"relation": "oneToMany",
"target": "api::filter-category.filter-category",
"mappedBy": "filter_section"
}
}
}

@ -0,0 +1,7 @@
/**
* filter-section controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::filter-section.filter-section');

@ -0,0 +1,7 @@
/**
* filter-section router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::filter-section.filter-section');

@ -0,0 +1,7 @@
/**
* filter-section service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::filter-section.filter-section');

@ -0,0 +1,37 @@
{
"kind": "collectionType",
"collectionName": "pages",
"info": {
"singularName": "page",
"pluralName": "pages",
"displayName": "Pages",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "label"
},
"seo": {
"type": "component",
"repeatable": false,
"component": "shared.seo"
},
"home": {
"type": "dynamiczone",
"components": [
"media.mosaic",
"content.text-box",
"media.video-box",
"content.carousel"
]
}
}
}

@ -0,0 +1,7 @@
/**
* page controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::page.page');

@ -0,0 +1,7 @@
/**
* page router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::page.page');

@ -0,0 +1,7 @@
/**
* page service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::page.page');

@ -0,0 +1,43 @@
{
"kind": "collectionType",
"collectionName": "products",
"info": {
"singularName": "product",
"pluralName": "products",
"displayName": "Product",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"content": {
"type": "richtext"
},
"slug": {
"type": "uid",
"targetField": "title"
},
"amount": {
"type": "decimal"
},
"vat": {
"type": "relation",
"relation": "oneToOne",
"target": "api::vat.vat"
},
"filter_items": {
"type": "relation",
"relation": "oneToMany",
"target": "api::filter-item.filter-item",
"mappedBy": "product"
}
}
}

@ -0,0 +1,7 @@
/**
* product controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::product.product');

@ -0,0 +1,7 @@
/**
* product router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::product.product');

@ -0,0 +1,7 @@
/**
* product service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::product.product');

@ -0,0 +1,17 @@
/**
* A set of functions called "actions" for `username`
*/
export default {
findOne: async (ctx, next) => {
try {
const data = await strapi
.service("api::username.username")
.findUsername(ctx.params.username);
ctx.body = data;
} catch (err) {
ctx.badRequest("Post report controller error", {moreDetails: err});
}
}
};

@ -0,0 +1,13 @@
export default {
routes: [
{
method: 'GET',
path: '/username/:username',
handler: 'username.findOne',
config: {
policies: [],
middlewares: [],
},
},
],
};

@ -0,0 +1,18 @@
/**
* username service
*/
export default () => ({
findUsername: async (username) => {
try {
console.log(username);
let users = await strapi.entityService.findMany(
"plugin::users-permissions.user", {filters: {email: username}}
);
return users.length !== 0;
} catch (err) {
return err;
}
}
});

@ -0,0 +1,21 @@
{
"kind": "collectionType",
"collectionName": "vats",
"info": {
"singularName": "vat",
"pluralName": "vats",
"displayName": "Vat"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string"
},
"amount": {
"type": "decimal"
}
}
}

@ -0,0 +1,7 @@
/**
* vat controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::vat.vat');

@ -0,0 +1,7 @@
/**
* vat router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::vat.vat');

@ -0,0 +1,7 @@
/**
* vat service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::vat.vat');

@ -0,0 +1,36 @@
{
"kind": "collectionType",
"collectionName": "vendor",
"info": {
"singularName": "vendor",
"pluralName": "vendors",
"displayName": "Vendor",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name",
"required": true,
"private": true
},
"active": {
"type": "boolean"
},
"admin_users": {
"type": "relation",
"relation": "oneToMany",
"target": "admin::user"
},
"override": {
"type": "boolean"
}
}
}

@ -0,0 +1,7 @@
/**
* vendor controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::vendor.vendor');

@ -0,0 +1,7 @@
/**
* vendor router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::vendor.vendor');

@ -0,0 +1,7 @@
/**
* vendor service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::vendor.vendor');

@ -0,0 +1,37 @@
{
"kind": "collectionType",
"collectionName": "writers",
"info": {
"singularName": "writer",
"pluralName": "writers",
"displayName": "Writer"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"picture": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
},
"articles": {
"type": "relation",
"relation": "oneToMany",
"target": "api::article.article",
"mappedBy": "author"
},
"email": {
"type": "string"
}
}
}

@ -0,0 +1,7 @@
/**
* writer controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::writer.writer');

@ -0,0 +1,7 @@
/**
* writer router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::writer.writer');

@ -0,0 +1,7 @@
/**
* writer service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::writer.writer');

@ -0,0 +1,29 @@
{
"collectionName": "components_actions_buttons",
"info": {
"displayName": "button"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"primary",
"secondary"
]
},
"source": {
"type": "enumeration",
"enum": [
"external",
"internal"
]
}
}
}

@ -0,0 +1,18 @@
{
"collectionName": "components_content_carousels",
"info": {
"displayName": "carousel",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"items": {
"type": "component",
"repeatable": true,
"component": "media.carousel-item"
}
}
}

@ -0,0 +1,35 @@
{
"collectionName": "components_content_text_boxes",
"info": {
"displayName": "Text Box"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"content": {
"type": "richtext"
},
"imageLeft": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
},
"imageRight": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
}
}

@ -0,0 +1,28 @@
{
"collectionName": "components_media_carousel_images",
"info": {
"displayName": "carousel image",
"description": ""
},
"options": {},
"attributes": {
"orientation": {
"type": "enumeration",
"enum": [
"rightside",
"leftside"
]
},
"cover": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
}
}
}

@ -0,0 +1,33 @@
{
"collectionName": "components_media_carousel_items",
"info": {
"displayName": "carousel item",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"illustration": {
"type": "component",
"repeatable": false,
"component": "media.carousel-image"
},
"actions": {
"type": "component",
"repeatable": true,
"component": "actions.button"
},
"columns": {
"type": "enumeration",
"enum": [
"one",
"two"
]
}
}
}

@ -0,0 +1,18 @@
{
"collectionName": "components_media_mosaic_items",
"info": {
"displayName": "Mosaic item"
},
"options": {},
"attributes": {
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
}
}
}

@ -0,0 +1,21 @@
{
"collectionName": "components_media_mosaics",
"info": {
"displayName": "mosaic",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"items": {
"type": "component",
"repeatable": true,
"component": "media.mosaic-item"
}
}
}

@ -0,0 +1,25 @@
{
"collectionName": "components_media_video_boxes",
"info": {
"displayName": "Video Box"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "richtext"
},
"video": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
}
}

@ -0,0 +1,16 @@
{
"collectionName": "components_meta_metas",
"info": {
"displayName": "meta",
"icon": "network-wired"
},
"options": {},
"attributes": {
"property": {
"type": "string"
},
"content": {
"type": "string"
}
}
}

@ -0,0 +1,41 @@
{
"collectionName": "components_shared_seos",
"info": {
"displayName": "Seo",
"icon": "book",
"description": ""
},
"options": {},
"attributes": {
"metaTitle": {
"type": "string"
},
"metaDescription": {
"type": "text"
},
"SharedImage": {
"displayName": "SharedImage",
"type": "component",
"repeatable": false,
"component": "shared.shared-image"
},
"preventIndexing": {
"type": "boolean",
"default": false
},
"structuredData": {
"type": "json"
},
"metaType": {
"type": "enumeration",
"enum": [
"article",
"website",
"profile",
"video",
"music",
"book"
]
}
}
}

@ -0,0 +1,24 @@
{
"collectionName": "components_shared_shared_images",
"info": {
"displayName": "SharedImage",
"icon": "file-image",
"description": ""
},
"options": {},
"attributes": {
"alt": {
"type": "string"
},
"media": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
}
}

@ -0,0 +1,19 @@
{
"collectionName": "components_utils_navigates",
"info": {
"displayName": "Navigate"
},
"options": {},
"attributes": {
"path": {
"type": "string"
},
"source": {
"type": "enumeration",
"enum": [
"external",
"internal"
]
}
}
}

@ -0,0 +1,78 @@
{
"kind": "collectionType",
"collectionName": "up_users",
"info": {
"name": "user",
"description": "",
"singularName": "user",
"pluralName": "users",
"displayName": "User"
},
"options": {
"draftAndPublish": false
},
"attributes": {
"username": {
"type": "string",
"minLength": 3,
"unique": true,
"configurable": false,
"required": true
},
"email": {
"type": "email",
"minLength": 6,
"configurable": false,
"required": true
},
"provider": {
"type": "string",
"configurable": false
},
"password": {
"type": "password",
"minLength": 6,
"configurable": false,
"private": true
},
"resetPasswordToken": {
"type": "string",
"configurable": false,
"private": true
},
"confirmationToken": {
"type": "string",
"configurable": false,
"private": true
},
"confirmed": {
"type": "boolean",
"default": false,
"configurable": false
},
"blocked": {
"type": "boolean",
"default": false,
"configurable": false
},
"role": {
"type": "relation",
"relation": "manyToOne",
"target": "plugin::users-permissions.role",
"inversedBy": "users",
"configurable": false
},
"avatar": {
"allowedTypes": [
"images"
],
"type": "media",
"configurable": false,
"multiple": false
},
"newsletter": {
"type": "boolean",
"default": false
}
}
}

@ -0,0 +1,18 @@
export default {
/**
* An asynchronous register function that runs before
* your application is initialized.
*
* This gives you an opportunity to extend code.
*/
register(/*{ strapi }*/) {},
/**
* An asynchronous bootstrap function that runs before
* your application gets started.
*
* This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic.
*/
bootstrap(/*{ strapi }*/) {},
};

@ -0,0 +1,23 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/server",
"compilerOptions": {
"outDir": "dist/strapi/dist",
"rootDir": "."
},
"include": [
"./",
"./**/*.ts",
"./**/*.js",
"src/**/*.json"
],
"exclude": [
"node_modules/",
"build/",
"dist/",
".cache/",
".tmp/",
"src/admin/",
"**/*.test.*",
"src/plugins/**"
]
}

@ -0,0 +1,177 @@
import type { Schema, Attribute } from '@strapi/strapi';
export interface ActionsButton extends Schema.Component {
collectionName: 'components_actions_buttons';
info: {
displayName: 'button';
};
attributes: {
title: Attribute.String;
path: Attribute.String;
type: Attribute.Enumeration<['primary', 'secondary']>;
source: Attribute.Enumeration<['external', 'internal']>;
};
}
export interface ContentCarousel extends Schema.Component {
collectionName: 'components_content_carousels';
info: {
displayName: 'carousel';
description: '';
};
attributes: {
title: Attribute.String;
items: Attribute.Component<'media.carousel-item', true>;
};
}
export interface ContentTextBox extends Schema.Component {
collectionName: 'components_content_text_boxes';
info: {
displayName: 'Text Box';
};
attributes: {
title: Attribute.String;
content: Attribute.RichText;
imageLeft: Attribute.Media;
imageRight: Attribute.Media;
};
}
export interface MediaCarouselImage extends Schema.Component {
collectionName: 'components_media_carousel_images';
info: {
displayName: 'carousel image';
description: '';
};
attributes: {
orientation: Attribute.Enumeration<['rightside', 'leftside']>;
cover: Attribute.Media;
};
}
export interface MediaCarouselItem extends Schema.Component {
collectionName: 'components_media_carousel_items';
info: {
displayName: 'carousel item';
description: '';
};
attributes: {
title: Attribute.String;
subtitle: Attribute.String;
illustration: Attribute.Component<'media.carousel-image'>;
actions: Attribute.Component<'actions.button', true>;
columns: Attribute.Enumeration<['one', 'two']>;
};
}
export interface MediaMosaicItem extends Schema.Component {
collectionName: 'components_media_mosaic_items';
info: {
displayName: 'Mosaic item';
};
attributes: {
icon: Attribute.String;
title: Attribute.String;
description: Attribute.String;
};
}
export interface MediaMosaic extends Schema.Component {
collectionName: 'components_media_mosaics';
info: {
displayName: 'mosaic';
description: '';
};
attributes: {
title: Attribute.String;
subtitle: Attribute.String;
items: Attribute.Component<'media.mosaic-item', true>;
};
}
export interface MediaVideoBox extends Schema.Component {
collectionName: 'components_media_video_boxes';
info: {
displayName: 'Video Box';
};
attributes: {
title: Attribute.String;
description: Attribute.RichText;
video: Attribute.Media;
};
}
export interface MetaMeta extends Schema.Component {
collectionName: 'components_meta_metas';
info: {
displayName: 'meta';
icon: 'network-wired';
};
attributes: {
property: Attribute.String;
content: Attribute.String;
};
}
export interface SharedSeo extends Schema.Component {
collectionName: 'components_shared_seos';
info: {
displayName: 'Seo';
icon: 'book';
description: '';
};
attributes: {
metaTitle: Attribute.String;
metaDescription: Attribute.Text;
SharedImage: Attribute.Component<'shared.shared-image'>;
preventIndexing: Attribute.Boolean & Attribute.DefaultTo<false>;
structuredData: Attribute.JSON;
metaType: Attribute.Enumeration<
['article', 'website', 'profile', 'video', 'music', 'book']
>;
};
}
export interface SharedSharedImage extends Schema.Component {
collectionName: 'components_shared_shared_images';
info: {
displayName: 'SharedImage';
icon: 'file-image';
description: '';
};
attributes: {
alt: Attribute.String;
media: Attribute.Media;
};
}
export interface UtilsNavigate extends Schema.Component {
collectionName: 'components_utils_navigates';
info: {
displayName: 'Navigate';
};
attributes: {
path: Attribute.String;
source: Attribute.Enumeration<['external', 'internal']>;
};
}
declare module '@strapi/types' {
export module Shared {
export interface Components {
'actions.button': ActionsButton;
'content.carousel': ContentCarousel;
'content.text-box': ContentTextBox;
'media.carousel-image': MediaCarouselImage;
'media.carousel-item': MediaCarouselItem;
'media.mosaic-item': MediaMosaicItem;
'media.mosaic': MediaMosaic;
'media.video-box': MediaVideoBox;
'meta.meta': MetaMeta;
'shared.seo': SharedSeo;
'shared.shared-image': SharedSharedImage;
'utils.navigate': UtilsNavigate;
}
}
}

File diff suppressed because it is too large Load Diff

10631
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save