-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
014e111
commit db31787
Showing
124 changed files
with
78,358 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CMS_URL="<<[ .learnstrapi.packages.client.url.dev ]>>" | ||
CMS_URL_PRODUCTION="<<[ .learnstrapi.packages.client.url.prod ]>>" | ||
CLIENT_URL="<<[ .learnstrapi.packages.client.url.dev ]>>" | ||
CLIENT_URL_PRODUCTION="<<[ .learnstrapi.packages.client.url.prod ]>>" | ||
GTM_ID="<<[ .learnstrapi.packages.client.gtmId ]>>" | ||
PROVIDER_API_KEY="<<[ .learnstrapi.packages.cms.providers.upload.cloudinary.apiKey ]>>" | ||
PROVIDER_API_SECRET="<<[ .learnstrapi.packages.cms.providers.upload.cloudinary.apiSecret ]>>" | ||
PROVIDER_CLOUD_NAME="<<[ .learnstrapi.packages.cms.providers.upload.cloudinary.cloudName ]>>" | ||
WITH_CMS="false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
############################ | ||
# OS X | ||
############################ | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
.Spotlight-V100 | ||
.Trashes | ||
._* | ||
|
||
|
||
############################ | ||
# Linux | ||
############################ | ||
|
||
*~ | ||
|
||
|
||
############################ | ||
# Windows | ||
############################ | ||
|
||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
|
||
*.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 | ||
############################ | ||
|
||
|
||
*.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 | ||
|
||
############################ | ||
# Next.js | ||
############################ | ||
|
||
out | ||
.next | ||
.cache | ||
|
||
############################ | ||
# Template files | ||
############################ | ||
|
||
**/**/customize.json | ||
*customize.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.next | ||
*.cache | ||
*.next | ||
*.now | ||
*/cache | ||
api | ||
build | ||
cms | ||
out | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": false, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "avoid", | ||
"proseWrap": "preserve", | ||
"htmlWhitespaceSensitivity": "css", | ||
"endOfLine": "lf", | ||
"embeddedLanguageFormatting": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"grammarly.overrides": [ | ||
{ | ||
"files": [ | ||
"**/packages/client/customize.json" | ||
], | ||
"config": { | ||
"audience": "general", | ||
"dialect": "british", | ||
"domain": "general", | ||
"emotions": [ | ||
"neutral" | ||
], | ||
"goals": [ | ||
"inform" | ||
] | ||
} | ||
} | ||
], | ||
"extensions.ignoreRecommendations": true, | ||
"files.autoSave": "off", | ||
"typescript.tsc.autoDetect": "off", | ||
"npm.autoDetect": "off", | ||
"debug.allowBreakpointsEverywhere": true, | ||
"html.autoClosingTags": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 🚀 LearnStrapi Boilerplate | ||
|
||
Full stack boilerplate for Strapi + Next.js + Chakra UI projects | ||
|
||
Features: | ||
|
||
- A monorepo to run Strapi and your Next.js client from a single command `yarn dev` (uses `lerna` under the hood) | ||
- Options to run just the frontend - once you've deployed your project and setup the `CMS_URL_PRODUCTION` in the `client` package | ||
- A basic Next.js app with Chakra UI ready to customise with your own branding (also includes some basic components and Strapi authentication) | ||
|
||
## Getting Started | ||
|
||
### Initial setup | ||
|
||
Setup `gomplate` and copy env and customization files. | ||
|
||
```bash | ||
sh $PWD/scripts/init | ||
``` | ||
|
||
### Customize your project | ||
|
||
1. Setup your repos (or you can add the links later) | ||
2. Add your project settings to `customize.json`. | ||
|
||
--- | ||
|
||
NOTE: If you need to generate an admin JWT secret token for Strapi | ||
|
||
```bash | ||
node -e "console.log(require('crypto').randomBytes(64).toString('base64'))" | pbcopy | ||
``` | ||
|
||
--- | ||
|
||
### Generate your project | ||
|
||
```bash | ||
sh $PWD/scripts/customize | ||
``` | ||
|
||
### Running your project locally | ||
|
||
##### `lerna bootstrap` Install dependencies | ||
|
||
##### `lerna run build` Build Admin UI & Frontend | ||
|
||
##### `lerna run start` Start frontend and backend with `lerna` | ||
|
||
|
||
### Recommendations | ||
|
||
We recommend using a submodule for the `packages/cms` package so you can freely deploy this on Heroku, Digital Ocean, AWS or anywhere you can host a node server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# <<[ .learnstrapi.branding.name ]>> | ||
|
||
## Getting Started | ||
|
||
### Local dev | ||
|
||
#### `lerna bootstrap` Install dependencies | ||
|
||
#### `yarn dev` Start frontend using production CMS (for frontend dev only) | ||
|
||
#### `yarn dev:cms` Start frontend with local backend CMS backend with `lerna` | ||
|
||
Local CMS (Admin): <<<[ .learnstrapi.packages.cms.config.url.dev ]>>/admin> | ||
Local CMS (GraphQl playground): <<<[ .learnstrapi.packages.cms.config.url.dev ]>>/graphql> | ||
Local client: <<<[ .learnstrapi.packages.client.url.dev ]>>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
overwrite: true | ||
schema: '<<[ .learnstrapi.packages.client.url.dev ]>>/graphql' | ||
documents: 'lib/gql/**/**.ts' | ||
generates: | ||
packages/client/lib/gql/types.ts: | ||
plugins: | ||
- 'typescript' | ||
- 'typescript-operations' | ||
- 'typescript-react-apollo' | ||
- 'fragment-matcher' | ||
packages/client/lib/gql/graphql.schema.json: | ||
plugins: | ||
- 'introspection' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"branding": { | ||
"name": "", | ||
"strapLine": "", | ||
"socials": { | ||
"instagram": "https://instagram.com/", | ||
"linkedin": "https://www.linkedin.com/company/", | ||
"twitter": "https://twitter.com/" | ||
} | ||
}, | ||
"author": { | ||
"name": "", | ||
"email": "", | ||
"url": "" | ||
}, | ||
"workspace": { | ||
"description": "", | ||
"license": "MIT", | ||
"name": "", | ||
"repository": "", | ||
"private": true | ||
}, | ||
"packages": { | ||
"client": { | ||
"description": "", | ||
"license": "MIT", | ||
"name": "", | ||
"repository": "", | ||
"private": true, | ||
"gtmId": "", | ||
"url": { | ||
"dev": "http://localhost:3000", | ||
"prod": "" | ||
} | ||
}, | ||
"cms": { | ||
"description": "", | ||
"license": "MIT", | ||
"name": "", | ||
"repository": "", | ||
"private": true, | ||
"config": { | ||
"adminJwtSecret": "", | ||
"strapiVersion": "^3.4.6", | ||
"url": { | ||
"dev": "http://localhost:1337", | ||
"prod": "" | ||
} | ||
}, | ||
"database": { | ||
"client": "postgres", | ||
"host": "localhost", | ||
"name": "", | ||
"password": "postgres", | ||
"port": 5432, | ||
"username": "postgres" | ||
}, | ||
"providers": { | ||
"email": { | ||
"aws": { | ||
"sesFrom": "", | ||
"sesKey": "", | ||
"sesRegionUrl": "", | ||
"sesReply": "", | ||
"sesSecret": " | ||
} | ||
}, | ||
"upload": { | ||
"cloudinary": { | ||
"apiKey": "", | ||
"apiSecret": "", | ||
"cloudName": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"npmClient": "yarn", | ||
"packages": ["packages/*"], | ||
"useWorkspaces": true, | ||
"version": "0.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version": 2, | ||
"public": true, | ||
"build": { | ||
"env": {} | ||
} | ||
} |
Oops, something went wrong.