Skip to content

Commit

Permalink
Project Initialized. End of Section 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zreecespieces committed Sep 22, 2020
0 parents commit 049e88d
Show file tree
Hide file tree
Showing 57 changed files with 32,760 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions backend/.editorconfig
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions backend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
build
**/node_modules/**
27 changes: 27 additions & 0 deletions backend/.eslintrc
Original file line number Diff line number Diff line change
@@ -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"]
}
}
114 changes: 114 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
############################
# 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
build
3 changes: 3 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Strapi application

A quick description of your strapi application
Empty file added backend/api/.gitkeep
Empty file.
52 changes: 52 additions & 0 deletions backend/api/category/config/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/categories",
"handler": "category.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/categories/count",
"handler": "category.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/categories/:id",
"handler": "category.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/categories",
"handler": "category.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/categories/:id",
"handler": "category.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/categories/:id",
"handler": "category.delete",
"config": {
"policies": []
}
}
]
}
8 changes: 8 additions & 0 deletions backend/api/category/controllers/category.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};
8 changes: 8 additions & 0 deletions backend/api/category/models/category.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
* to customize this model
*/

module.exports = {};
31 changes: 31 additions & 0 deletions backend/api/category/models/category.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"kind": "collectionType",
"collectionName": "categories",
"info": {
"name": "Category"
},
"options": {
"increments": true,
"timestamps": true
},
"attributes": {
"name": {
"type": "string",
"required": true,
"unique": true
},
"description": {
"type": "text",
"required": true,
"unique": true
},
"filterOptions": {
"type": "json",
"required": false
},
"products": {
"via": "category",
"collection": "product"
}
}
}
8 changes: 8 additions & 0 deletions backend/api/category/services/category.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
* to customize this service
*/

module.exports = {};
52 changes: 52 additions & 0 deletions backend/api/product/config/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/products",
"handler": "product.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/products/count",
"handler": "product.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/products/:id",
"handler": "product.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/products",
"handler": "product.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/products/:id",
"handler": "product.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/products/:id",
"handler": "product.delete",
"config": {
"policies": []
}
}
]
}
8 changes: 8 additions & 0 deletions backend/api/product/controllers/product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/

module.exports = {};
8 changes: 8 additions & 0 deletions backend/api/product/models/product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
* to customize this model
*/

module.exports = {};
34 changes: 34 additions & 0 deletions backend/api/product/models/product.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "products",
"info": {
"name": "Product"
},
"options": {
"increments": true,
"timestamps": true
},
"attributes": {
"name": {
"type": "string",
"required": true,
"unique": false
},
"description": {
"type": "text",
"required": true,
"unique": true
},
"featured": {
"type": "boolean"
},
"category": {
"model": "category",
"via": "products"
},
"variants": {
"via": "product",
"collection": "variant"
}
}
}
8 changes: 8 additions & 0 deletions backend/api/product/services/product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
* to customize this service
*/

module.exports = {};
Loading

0 comments on commit 049e88d

Please sign in to comment.