├── api ├── .gitkeep ├── users │ ├── services │ │ └── Users.js │ ├── controllers │ │ └── Users.js │ ├── models │ │ ├── Users.settings.json │ │ └── Users.js │ └── config │ │ └── routes.json └── growers │ ├── services │ └── Growers.js │ ├── controllers │ └── Growers.js │ ├── config │ └── routes.json │ └── models │ ├── Growers.settings.json │ └── Growers.js ├── extensions ├── .gitkeep └── users-permissions │ └── config │ └── jwt.json ├── public ├── uploads │ └── .gitkeep ├── robots.txt └── index.html ├── .eslintignore ├── config ├── locales │ ├── ja_jp.json │ ├── de_de.json │ ├── en_us.json │ ├── es_es.json │ ├── fr_fr.json │ ├── it_it.json │ ├── tr_tr.json │ └── ru_ru.json ├── custom.json ├── functions │ ├── responses │ │ └── 404.js │ ├── cron.js │ └── bootstrap.js ├── environments │ ├── staging │ │ ├── custom.json │ │ ├── response.json │ │ ├── server.json │ │ ├── request.json │ │ ├── security.json │ │ └── database.json │ ├── production │ │ ├── custom.json │ │ ├── response.json │ │ ├── server.json │ │ ├── request.json │ │ ├── security.json │ │ └── database.json │ └── development │ │ ├── custom.json │ │ ├── server.json │ │ ├── response.json │ │ ├── database.json │ │ ├── request.json │ │ └── security.json ├── application.json ├── hook.json ├── language.json └── middleware.json ├── .github └── FUNDING.yml ├── favicon.ico ├── .editorconfig ├── CHANGELOG.md ├── .eslintrc ├── CONTRIBUTING.md ├── README.md ├── LICENSE.md ├── package.json ├── .gitignore └── CODE_OF_CONDUCT.md /api/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /extensions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .cache 2 | build 3 | **/node_modules/** 4 | -------------------------------------------------------------------------------- /config/locales/ja_jp.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "ようこそ" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/de_de.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Willkommen" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Welcome" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/es_es.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Bienvenido" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/fr_fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Bienvenue" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/it_it.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Benvenuto" 3 | } 4 | -------------------------------------------------------------------------------- /config/locales/tr_tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Hoşgeldin" 3 | } 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://liberapay.com/DevCreatives/donate 2 | -------------------------------------------------------------------------------- /config/locales/ru_ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": "Добро пожаловать" 3 | } 4 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcreatives/create-node-strapi-app/development/favicon.ico -------------------------------------------------------------------------------- /extensions/users-permissions/config/jwt.json: -------------------------------------------------------------------------------- 1 | { 2 | "jwtSecret": "e75baacf-5fed-4579-943f-e96e5950a67a" 3 | } -------------------------------------------------------------------------------- /config/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "myCustomConfiguration": "This configuration is accessible through strapi.config.myCustomConfiguration" 3 | } 4 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # To prevent search engines from seeing the site altogether, uncomment the next two lines: 2 | # User-Agent: * 3 | # Disallow: / 4 | -------------------------------------------------------------------------------- /config/functions/responses/404.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = async (/* ctx */) => { 4 | // return ctx.notFound('My custom message 404'); 5 | }; 6 | -------------------------------------------------------------------------------- /config/environments/staging/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "myCustomConfiguration": "This configuration is accessible through strapi.config.environments.staging.myCustomConfiguration" 3 | } 4 | -------------------------------------------------------------------------------- /config/environments/production/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "myCustomConfiguration": "This configuration is accessible through strapi.config.environments.production.myCustomConfiguration" 3 | } 4 | -------------------------------------------------------------------------------- /config/environments/development/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "myCustomConfiguration": "This configuration is accessible through strapi.config.environments.development.myCustomConfiguration" 3 | } 4 | -------------------------------------------------------------------------------- /config/application.json: -------------------------------------------------------------------------------- 1 | { 2 | "favicon": { 3 | "path": "favicon.ico", 4 | "maxAge": 86400000 5 | }, 6 | "public": { 7 | "path": "./public", 8 | "maxAge": 60000 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /api/users/services/Users.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/guides/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /api/growers/services/Growers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/guides/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /api/users/controllers/Users.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/guides/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /api/growers/controllers/Growers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/guides/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /config/hook.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeout": 3000, 3 | "load": { 4 | "before": [], 5 | "order": [ 6 | "Define the hooks' load order by putting their names in this array in the right order" 7 | ], 8 | "after": [] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /config/language.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "defaultLocale": "en_us", 4 | "modes": [ 5 | "query", 6 | "subdomain", 7 | "cookie", 8 | "header", 9 | "url", 10 | "tld" 11 | ], 12 | "cookieName": "locale" 13 | } 14 | -------------------------------------------------------------------------------- /config/environments/development/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": 1337, 4 | "proxy": { 5 | "enabled": false 6 | }, 7 | "cron": { 8 | "enabled": false 9 | }, 10 | "admin": { 11 | "autoOpen": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /config/environments/production/response.json: -------------------------------------------------------------------------------- 1 | { 2 | "gzip": { 3 | "enabled": true 4 | }, 5 | "responseTime": { 6 | "enabled": false 7 | }, 8 | "poweredBy": { 9 | "enabled": true, 10 | "value": "Strapi " 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /config/environments/staging/response.json: -------------------------------------------------------------------------------- 1 | { 2 | "gzip": { 3 | "enabled": true 4 | }, 5 | "responseTime": { 6 | "enabled": false 7 | }, 8 | "poweredBy": { 9 | "enabled": true, 10 | "value": "Strapi " 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /config/environments/development/response.json: -------------------------------------------------------------------------------- 1 | { 2 | "gzip": { 3 | "enabled": false 4 | }, 5 | "responseTime": { 6 | "enabled": false 7 | }, 8 | "poweredBy": { 9 | "enabled": true, 10 | "value": "Strapi " 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /config/environments/staging/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": "${process.env.PORT || 1337}", 4 | "production": true, 5 | "proxy": { 6 | "enabled": false 7 | }, 8 | "cron": { 9 | "enabled": false 10 | }, 11 | "admin": { 12 | "autoOpen": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /config/environments/production/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": "${process.env.PORT || 1337}", 4 | "production": true, 5 | "proxy": { 6 | "enabled": false 7 | }, 8 | "cron": { 9 | "enabled": false 10 | }, 11 | "admin": { 12 | "autoOpen": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [{package.json,*.yml}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /config/environments/development/database.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultConnection": "default", 3 | "connections": { 4 | "default": { 5 | "connector": "strapi-hook-bookshelf", 6 | "settings": { 7 | "client": "sqlite", 8 | "filename": ".tmp/data.db" 9 | }, 10 | "options": { 11 | "useNullAsDefault": true 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "create-node-strapi-app" will be documented in this file. 4 | 5 | ## create-node-strapi-app [1.0.0] - 2019-09-01 (Released) 6 | ### Added 7 | - Added create-node-strapi-app boilerplate files added by [@mirfahad58](https://github.com/MirFahad58). 8 | - Added license , readme and code of conduct md files added by [@viveksharmaui](https://github.com/viveksharmaui). 9 | -------------------------------------------------------------------------------- /config/middleware.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeout": 100, 3 | "load": { 4 | "before": [ 5 | "responseTime", 6 | "logger", 7 | "cors", 8 | "responses", 9 | "gzip" 10 | ], 11 | "order": [ 12 | "Define the middlewares' load order by putting their name in this array is the right order" 13 | ], 14 | "after": [ 15 | "parser", 16 | "router" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /config/functions/cron.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Cron config that gives you an opportunity 5 | * to run scheduled jobs. 6 | * 7 | * The cron format consists of: 8 | * [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK] [YEAR (optional)] 9 | */ 10 | 11 | module.exports = { 12 | /** 13 | * Simple example. 14 | * Every monday at 1am. 15 | */ 16 | // '0 1 * * 1': () => { 17 | // 18 | // } 19 | }; 20 | -------------------------------------------------------------------------------- /config/functions/bootstrap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * An asynchronous bootstrap function that runs before 5 | * your application gets started. 6 | * 7 | * This gives you an opportunity to set up your data model, 8 | * run jobs, or perform some special logic. 9 | * 10 | * See more details here: https://strapi.io/documentation/3.0.0-beta.x/configurations/configurations.html#bootstrap 11 | */ 12 | 13 | module.exports = () => {}; 14 | -------------------------------------------------------------------------------- /config/environments/production/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "session": { 3 | "enabled": true, 4 | "client": "cookie", 5 | "key": "strapi.sid", 6 | "prefix": "strapi:sess:", 7 | "secretKeys": ["mySecretKey1", "mySecretKey2"], 8 | "httpOnly": true, 9 | "maxAge": 86400000, 10 | "overwrite": true, 11 | "signed": false, 12 | "rolling": false 13 | }, 14 | "logger": { 15 | "level": "info", 16 | "exposeInContext": true, 17 | "requests": false 18 | }, 19 | "parser": { 20 | "enabled": true, 21 | "multipart": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/environments/staging/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "session": { 3 | "enabled": true, 4 | "client": "cookie", 5 | "key": "strapi.sid", 6 | "prefix": "strapi:sess:", 7 | "secretKeys": ["mySecretKey1", "mySecretKey2"], 8 | "httpOnly": true, 9 | "maxAge": 86400000, 10 | "overwrite": true, 11 | "signed": false, 12 | "rolling": false 13 | }, 14 | "logger": { 15 | "level": "info", 16 | "exposeInContext": true, 17 | "requests": false 18 | }, 19 | "parser": { 20 | "enabled": true, 21 | "multipart": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/environments/development/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "session": { 3 | "enabled": true, 4 | "client": "cookie", 5 | "key": "strapi.sid", 6 | "prefix": "strapi:sess:", 7 | "secretKeys": ["mySecretKey1", "mySecretKey2"], 8 | "httpOnly": true, 9 | "maxAge": 86400000, 10 | "overwrite": true, 11 | "signed": false, 12 | "rolling": false 13 | }, 14 | "logger": { 15 | "level": "debug", 16 | "exposeInContext": true, 17 | "requests": true 18 | }, 19 | "parser": { 20 | "enabled": true, 21 | "multipart": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "eslint:recommended", 4 | "env": { 5 | "commonjs": true, 6 | "es6": true, 7 | "node": true, 8 | "browser": false 9 | }, 10 | "parserOptions": { 11 | "ecmaFeatures": { 12 | "experimentalObjectRestSpread": true, 13 | "jsx": false 14 | }, 15 | "sourceType": "module" 16 | }, 17 | "globals": { 18 | "strapi": true 19 | }, 20 | "rules": { 21 | "indent": ["error", 2, { "SwitchCase": 1 }], 22 | "linebreak-style": ["error", "unix"], 23 | "no-console": 0, 24 | "quotes": ["error", "single"], 25 | "semi": ["error", "always"] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /config/environments/development/security.json: -------------------------------------------------------------------------------- 1 | { 2 | "csrf": { 3 | "enabled": false, 4 | "key": "_csrf", 5 | "secret": "_csrfSecret" 6 | }, 7 | "csp": { 8 | "enabled": false, 9 | "policy": { 10 | "default-src": "'self'" 11 | } 12 | }, 13 | "p3p": { 14 | "enabled": false, 15 | "value": "" 16 | }, 17 | "hsts": { 18 | "enabled": false, 19 | "maxAge": 31536000, 20 | "includeSubDomains": true 21 | }, 22 | "xframe": { 23 | "enabled": false, 24 | "value": "SAMEORIGIN" 25 | }, 26 | "xss": { 27 | "enabled": false, 28 | "mode": "block" 29 | }, 30 | "cors": { 31 | "enabled": true 32 | }, 33 | "ip": { 34 | "enabled": false, 35 | "whiteList": [], 36 | "blackList": [] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution instructions 2 | 3 | ## Shipping a new functionality 4 | 5 | 1. You can only contribute on master branch. 6 | 2. Fork this repo. 7 | 3. Pull latest master branch. 8 | 4. Contribute something great. 9 | 5. Don't forget to write unit/integration/e2e/stress test. 10 | 6. Create pull request of your branch to master branch. 11 | 7. Wait for travis CI test to be passed. 12 | 8. Wait for reviewer to review pull request file changes (This process can take upto few day's so relax). 13 | 9. Wait for admistrator to merge pull request master branch. 14 | 10. After doing all above steps now wait to see your changes in master and in production (This process can takes upto few weeks or months when we RELEASED new version). 15 | 16 | 17 | **Happy Contributing** 18 | -------------------------------------------------------------------------------- /config/environments/staging/security.json: -------------------------------------------------------------------------------- 1 | { 2 | "csrf": { 3 | "enabled": false, 4 | "key": "_csrf", 5 | "secret": "_csrfSecret" 6 | }, 7 | "csp": { 8 | "enabled": true, 9 | "policy": [ 10 | { 11 | "img-src": "'self' http:" 12 | }, 13 | "block-all-mixed-content" 14 | ] 15 | }, 16 | "p3p": { 17 | "enabled": true, 18 | "value": "" 19 | }, 20 | "hsts": { 21 | "enabled": true, 22 | "maxAge": 31536000, 23 | "includeSubDomains": true 24 | }, 25 | "xframe": { 26 | "enabled": true, 27 | "value": "SAMEORIGIN" 28 | }, 29 | "xss": { 30 | "enabled": true, 31 | "mode": "block" 32 | }, 33 | "cors": { 34 | "enabled": true 35 | }, 36 | "ip": { 37 | "enabled": false, 38 | "whiteList": [], 39 | "blackList": [] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /config/environments/production/security.json: -------------------------------------------------------------------------------- 1 | { 2 | "csrf": { 3 | "enabled": false, 4 | "key": "_csrf", 5 | "secret": "_csrfSecret" 6 | }, 7 | "csp": { 8 | "enabled": true, 9 | "policy": [ 10 | { 11 | "img-src": "'self' http:" 12 | }, 13 | "block-all-mixed-content" 14 | ] 15 | }, 16 | "p3p": { 17 | "enabled": true, 18 | "value": "" 19 | }, 20 | "hsts": { 21 | "enabled": true, 22 | "maxAge": 31536000, 23 | "includeSubDomains": true 24 | }, 25 | "xframe": { 26 | "enabled": true, 27 | "value": "SAMEORIGIN" 28 | }, 29 | "xss": { 30 | "enabled": true, 31 | "mode": "block" 32 | }, 33 | "cors": { 34 | "enabled": true 35 | }, 36 | "ip": { 37 | "enabled": false, 38 | "whiteList": [], 39 | "blackList": [] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /config/environments/staging/database.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultConnection": "default", 3 | "connections": { 4 | "default": { 5 | "connector": "strapi-hook-bookshelf", 6 | "settings": { 7 | "client": "sqlite", 8 | "host": "${process.env.DATABASE_HOST || '127.0.0.1'}", 9 | "port": "${process.env.DATABASE_PORT || 27017}", 10 | "srv": "${process.env.DATABASE_SRV || false}", 11 | "database": "${process.env.DATABASE_NAME || 'strapi'}", 12 | "username": "${process.env.DATABASE_USERNAME || ''}", 13 | "password": "${process.env.DATABASE_PASSWORD || ''}", 14 | "ssl": "${process.env.DATABASE_SSL || false}" 15 | }, 16 | "options": { 17 | "ssl": "${process.env.DATABASE_SSL || false}", 18 | "authenticationDatabase": "${process.env.DATABASE_AUTHENTICATION_DATABASE || ''}" 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /config/environments/production/database.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultConnection": "default", 3 | "connections": { 4 | "default": { 5 | "connector": "strapi-hook-bookshelf", 6 | "settings": { 7 | "client": "sqlite", 8 | "host": "${process.env.DATABASE_HOST || '127.0.0.1'}", 9 | "port": "${process.env.DATABASE_PORT || 27017}", 10 | "srv": "${process.env.DATABASE_SRV || false}", 11 | "database": "${process.env.DATABASE_NAME || 'strapi'}", 12 | "username": "${process.env.DATABASE_USERNAME || ''}", 13 | "password": "${process.env.DATABASE_PASSWORD || ''}", 14 | "ssl": "${process.env.DATABASE_SSL || false}" 15 | }, 16 | "options": { 17 | "ssl": "${process.env.DATABASE_SSL || false}", 18 | "authenticationDatabase": "${process.env.DATABASE_AUTHENTICATION_DATABASE || ''}" 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # create-node-strapi-app 2 | 3 | ## Introduction 4 | 5 | This is a boilarplate for node with strapi CMS. 6 | 7 | ## What we are achieving to do 8 | 9 | The purpose behind this is to simplify process for user to create a CMS with strapi and node js. 10 | 11 | ## What is our goal 12 | 13 | Our goal is to make this boilarplate simple for all users and developers. 14 | 15 | ## Found bug 16 | 17 | If you found any bug please add that bug in [issue](https://github.com/Techistan/create-node-strapi-app/blob/master/issues) section. so that our team will solve bug as soon as possible. 18 | 19 | ## How you can contribute 20 | 21 | This extension is open source anyone can contribute. we are always ready for new ideas and new functionalities so pull request are always welcome or see [CONTRIBUTING.md](https://github.com/Techistan/create-node-strapi-app/blob/master/CONTRIBUTING.md) file for more information. 22 | 23 | **Happy Contributing** 24 | 25 | -------------------------------------------------------------------------------- /api/users/models/Users.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection": "default", 3 | "collectionName": "users", 4 | "info": { 5 | "name": "users", 6 | "description": "these are the users of the project" 7 | }, 8 | "options": { 9 | "increments": true, 10 | "timestamps": [ 11 | "created_at", 12 | "updated_at" 13 | ], 14 | "comment": "" 15 | }, 16 | "attributes": { 17 | "Name": { 18 | "type": "text", 19 | "minLength": 3, 20 | "required": true 21 | }, 22 | "password": { 23 | "required": true, 24 | "type": "password" 25 | }, 26 | "image": { 27 | "model": "file", 28 | "via": "related", 29 | "plugin": "upload" 30 | }, 31 | "description": { 32 | "type": "text" 33 | }, 34 | "Phone": { 35 | "maxLength": 11, 36 | "required": true, 37 | "unique": true, 38 | "minLength": 11, 39 | "type": "string" 40 | }, 41 | "grower": { 42 | "model": "growers", 43 | "via": "user" 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 create-node-strapi-app 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /api/users/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [ 3 | { 4 | "method": "GET", 5 | "path": "/users", 6 | "handler": "Users.find", 7 | "config": { 8 | "policies": [] 9 | } 10 | }, 11 | { 12 | "method": "GET", 13 | "path": "/users/count", 14 | "handler": "Users.count", 15 | "config": { 16 | "policies": [] 17 | } 18 | }, 19 | { 20 | "method": "GET", 21 | "path": "/users/:id", 22 | "handler": "Users.findOne", 23 | "config": { 24 | "policies": [] 25 | } 26 | }, 27 | { 28 | "method": "POST", 29 | "path": "/users", 30 | "handler": "Users.create", 31 | "config": { 32 | "policies": [] 33 | } 34 | }, 35 | { 36 | "method": "PUT", 37 | "path": "/users/:id", 38 | "handler": "Users.update", 39 | "config": { 40 | "policies": [] 41 | } 42 | }, 43 | { 44 | "method": "DELETE", 45 | "path": "/users/:id", 46 | "handler": "Users.delete", 47 | "config": { 48 | "policies": [] 49 | } 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /api/growers/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [ 3 | { 4 | "method": "GET", 5 | "path": "/growers", 6 | "handler": "Growers.find", 7 | "config": { 8 | "policies": [] 9 | } 10 | }, 11 | { 12 | "method": "GET", 13 | "path": "/growers/count", 14 | "handler": "Growers.count", 15 | "config": { 16 | "policies": [] 17 | } 18 | }, 19 | { 20 | "method": "GET", 21 | "path": "/growers/:id", 22 | "handler": "Growers.findOne", 23 | "config": { 24 | "policies": [] 25 | } 26 | }, 27 | { 28 | "method": "POST", 29 | "path": "/growers", 30 | "handler": "Growers.create", 31 | "config": { 32 | "policies": [] 33 | } 34 | }, 35 | { 36 | "method": "PUT", 37 | "path": "/growers/:id", 38 | "handler": "Growers.update", 39 | "config": { 40 | "policies": [] 41 | } 42 | }, 43 | { 44 | "method": "DELETE", 45 | "path": "/growers/:id", 46 | "handler": "Growers.delete", 47 | "config": { 48 | "policies": [] 49 | } 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /api/growers/models/Growers.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection": "default", 3 | "collectionName": "growers", 4 | "info": { 5 | "name": "growers", 6 | "description": "growers of the users" 7 | }, 8 | "options": { 9 | "increments": true, 10 | "timestamps": [ 11 | "created_at", 12 | "updated_at" 13 | ], 14 | "comment": "" 15 | }, 16 | "attributes": { 17 | "Name": { 18 | "required": true, 19 | "type": "string" 20 | }, 21 | "address": { 22 | "required": true, 23 | "type": "string" 24 | }, 25 | "creationDate": { 26 | "default": "2020-01-17T00:00:00.000Z", 27 | "required": true, 28 | "type": "date" 29 | }, 30 | "image": { 31 | "model": "file", 32 | "via": "related", 33 | "plugin": "upload" 34 | }, 35 | "orders": { 36 | "unique": true, 37 | "type": "json" 38 | }, 39 | "Phone": { 40 | "maxLength": 11, 41 | "required": true, 42 | "unique": true, 43 | "minLength": 11, 44 | "type": "string" 45 | }, 46 | "user": { 47 | "model": "users", 48 | "via": "grower" 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-project", 3 | "private": true, 4 | "version": "0.1.0", 5 | "description": "A Strapi application", 6 | "scripts": { 7 | "develop": "strapi develop", 8 | "start": "strapi start", 9 | "build": "strapi build", 10 | "strapi": "strapi", 11 | "lint": "eslint ." 12 | }, 13 | "devDependencies": { 14 | "babel-eslint": "^10.0.0", 15 | "eslint": "^6.3.0", 16 | "eslint-config-airbnb": "^18.0.0", 17 | "eslint-plugin-import": "^2.18.0", 18 | "eslint-plugin-react": "^7.14.0" 19 | }, 20 | "dependencies": { 21 | "lodash": "^4.17.21", 22 | "strapi": "3.0.0-beta.17.8", 23 | "strapi-admin": "3.0.0-beta.16.5", 24 | "strapi-utils": "3.0.0-beta.16.5", 25 | "strapi-plugin-settings-manager": "3.0.0-beta.16.5", 26 | "strapi-plugin-content-type-builder": "3.2.5", 27 | "strapi-plugin-content-manager": "3.0.0-beta.16.5", 28 | "strapi-plugin-users-permissions": "3.0.0-beta.16.5", 29 | "strapi-plugin-email": "3.0.0-beta.16.5", 30 | "strapi-plugin-upload": "3.0.0-beta.16.5", 31 | "strapi-hook-bookshelf": "3.0.0-beta.16.5", 32 | "strapi-hook-knex": "3.0.0-beta.16.5", 33 | "knex": "latest", 34 | "sqlite3": "latest" 35 | }, 36 | "author": { 37 | "name": "A Strapi developer" 38 | }, 39 | "strapi": { 40 | "uuid": "c9c2173b-cdb6-467c-a904-ce45eed51869" 41 | }, 42 | "engines": { 43 | "node": ">=10.0.0", 44 | "npm": ">=6.0.0" 45 | }, 46 | "license": "MIT" 47 | } 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ############################ 2 | # OS X 3 | ############################ 4 | 5 | .DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | Icon 9 | .Spotlight-V100 10 | .Trashes 11 | ._* 12 | 13 | 14 | ############################ 15 | # Linux 16 | ############################ 17 | 18 | *~ 19 | 20 | 21 | ############################ 22 | # Windows 23 | ############################ 24 | 25 | Thumbs.db 26 | ehthumbs.db 27 | Desktop.ini 28 | $RECYCLE.BIN/ 29 | *.cab 30 | *.msi 31 | *.msm 32 | *.msp 33 | 34 | 35 | ############################ 36 | # Packages 37 | ############################ 38 | 39 | *.7z 40 | *.csv 41 | *.dat 42 | *.dmg 43 | *.gz 44 | *.iso 45 | *.jar 46 | *.rar 47 | *.tar 48 | *.zip 49 | *.com 50 | *.class 51 | *.dll 52 | *.exe 53 | *.o 54 | *.seed 55 | *.so 56 | *.swo 57 | *.swp 58 | *.swn 59 | *.swm 60 | *.out 61 | *.pid 62 | 63 | 64 | ############################ 65 | # Logs and databases 66 | ############################ 67 | 68 | .tmp 69 | *.log 70 | *.sql 71 | *.sqlite 72 | *.sqlite3 73 | 74 | 75 | ############################ 76 | # Misc. 77 | ############################ 78 | 79 | *# 80 | ssl 81 | .idea 82 | nbproject 83 | public/uploads/* 84 | !public/uploads/.gitkeep 85 | 86 | ############################ 87 | # Node.js 88 | ############################ 89 | 90 | lib-cov 91 | lcov.info 92 | pids 93 | logs 94 | results 95 | node_modules 96 | .node_history 97 | 98 | 99 | ############################ 100 | # Tests 101 | ############################ 102 | 103 | testApp 104 | coverage 105 | 106 | ############################ 107 | # Strapi 108 | ############################ 109 | 110 | exports 111 | .cache 112 | build 113 | -------------------------------------------------------------------------------- /api/users/models/Users.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Lifecycle callbacks for the `Users` model. 5 | */ 6 | 7 | module.exports = { 8 | // Before saving a value. 9 | // Fired before an `insert` or `update` query. 10 | // beforeSave: async (model, attrs, options) => {}, 11 | 12 | // After saving a value. 13 | // Fired after an `insert` or `update` query. 14 | // afterSave: async (model, response, options) => {}, 15 | 16 | // Before fetching a value. 17 | // Fired before a `fetch` operation. 18 | // beforeFetch: async (model, columns, options) => {}, 19 | 20 | // After fetching a value. 21 | // Fired after a `fetch` operation. 22 | // afterFetch: async (model, response, options) => {}, 23 | 24 | // Before fetching all values. 25 | // Fired before a `fetchAll` operation. 26 | // beforeFetchAll: async (model, columns, options) => {}, 27 | 28 | // After fetching all values. 29 | // Fired after a `fetchAll` operation. 30 | // afterFetchAll: async (model, response, options) => {}, 31 | 32 | // Before creating a value. 33 | // Fired before an `insert` query. 34 | // beforeCreate: async (model, attrs, options) => {}, 35 | 36 | // After creating a value. 37 | // Fired after an `insert` query. 38 | // afterCreate: async (model, attrs, options) => {}, 39 | 40 | // Before updating a value. 41 | // Fired before an `update` query. 42 | // beforeUpdate: async (model, attrs, options) => {}, 43 | 44 | // After updating a value. 45 | // Fired after an `update` query. 46 | // afterUpdate: async (model, attrs, options) => {}, 47 | 48 | // Before destroying a value. 49 | // Fired before a `delete` query. 50 | // beforeDestroy: async (model, attrs, options) => {}, 51 | 52 | // After destroying a value. 53 | // Fired after a `delete` query. 54 | // afterDestroy: async (model, attrs, options) => {} 55 | }; 56 | -------------------------------------------------------------------------------- /api/growers/models/Growers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Lifecycle callbacks for the `Growers` model. 5 | */ 6 | 7 | module.exports = { 8 | // Before saving a value. 9 | // Fired before an `insert` or `update` query. 10 | // beforeSave: async (model, attrs, options) => {}, 11 | 12 | // After saving a value. 13 | // Fired after an `insert` or `update` query. 14 | // afterSave: async (model, response, options) => {}, 15 | 16 | // Before fetching a value. 17 | // Fired before a `fetch` operation. 18 | // beforeFetch: async (model, columns, options) => {}, 19 | 20 | // After fetching a value. 21 | // Fired after a `fetch` operation. 22 | // afterFetch: async (model, response, options) => {}, 23 | 24 | // Before fetching all values. 25 | // Fired before a `fetchAll` operation. 26 | // beforeFetchAll: async (model, columns, options) => {}, 27 | 28 | // After fetching all values. 29 | // Fired after a `fetchAll` operation. 30 | // afterFetchAll: async (model, response, options) => {}, 31 | 32 | // Before creating a value. 33 | // Fired before an `insert` query. 34 | // beforeCreate: async (model, attrs, options) => {}, 35 | 36 | // After creating a value. 37 | // Fired after an `insert` query. 38 | // afterCreate: async (model, attrs, options) => {}, 39 | 40 | // Before updating a value. 41 | // Fired before an `update` query. 42 | // beforeUpdate: async (model, attrs, options) => {}, 43 | 44 | // After updating a value. 45 | // Fired after an `update` query. 46 | // afterUpdate: async (model, attrs, options) => {}, 47 | 48 | // Before destroying a value. 49 | // Fired before a `delete` query. 50 | // beforeDestroy: async (model, attrs, options) => {}, 51 | 52 | // After destroying a value. 53 | // Fired after a `delete` query. 54 | // afterDestroy: async (model, attrs, options) => {} 55 | }; 56 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at sharma_vivek62@yahoo.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Welcome to your Strapi app 8 | 9 | 141 | 142 | 143 |
144 |
145 |

Welcome.

146 |

You successfully created your Strapi application.

147 |

You are looking at: ./public/index.html.

148 |

Your built-in admin panel is available at /admin. 149 |

Create your first API

150 |

Easily generate a complete API with controllers, models and routes using:

151 |
$ strapi generate:api <apiName>
152 |

Resources

153 |

You'll probably also want to learn how to customize your application, set up security and configure your data sources.

154 |

For more help getting started, check out: 155 |

161 |

162 |
163 |
164 | 165 | 166 | --------------------------------------------------------------------------------