Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 8a72753

Browse files
committed
migration complete
1 parent d9fd3a9 commit 8a72753

File tree

169 files changed

+39097
-0
lines changed

Some content is hidden

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

169 files changed

+39097
-0
lines changed

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
node_modules
2+
.tmp
3+
build
4+
.env
5+
.next
6+
.DS_Store
7+
.turbo
8+
fixtures/example.json
9+
downloads
10+
screenshots
11+
videos
12+
.cache
13+
14+
# dependencies
15+
/node_modules
16+
/.pnp
17+
.pnp.js
18+
/.yarn
19+
20+
# testing
21+
/coverage
22+
23+
# production
24+
/build
25+
26+
# misc
27+
.DS_Store
28+
.env.local
29+
.env.development
30+
.env.test.local
31+
.env.production
32+
.yarnrc
33+
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
38+
.next
39+
40+
# editors
41+
.idea

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "developer-dao-website",
3+
"version": "1.0.0",
4+
"private": true,
5+
"license": "MIT",
6+
"workspaces": [
7+
"packages/*"
8+
],
9+
"dependencies": {
10+
"concurrently": "^7.3.0"
11+
},
12+
"scripts": {
13+
"build": "turbo run build",
14+
"test": "turbo run test",
15+
"lint": "turbo run lint",
16+
"dev": "turbo run dev",
17+
"run-frontend": "yarn --cwd packages/frontend start",
18+
"run-cms": "yarn --cwd packages/cms start"
19+
},
20+
"devDependencies": {
21+
"turbo": "^1.4.2"
22+
}
23+
}

packages/cms/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

packages/cms/.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
HOST=0.0.0.0
2+
PORT=1337
3+
APP_KEYS=value_1,value_2,value_3
4+
API_TOKEN_SALT=API_TOKEN_SALT_VALUE
5+
ADMIN_JWT_SECRET=ADMIN_JWT_SECRET_VALUE
6+
JWT_SECRET=__SKIP_FOR_LOCAL_ENVIRONMENT--GENERATED__
7+
8+
DATABASE_HOST=
9+
DATABASE_PORT=
10+
DATABASE_NAME=
11+
DATABASE_USERNAME=
12+
DATABASE_PASSWORD=
13+
14+
15+
DEV_SEED_DATA_PROJECTS=8
16+
DEV_SEED_DATA_CONTRIBUTORS=15
17+
DEV_SEED_DATA_PARTNERS=5

packages/cms/.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.cache
2+
build
3+
**/node_modules/**

packages/cms/.eslintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
}

packages/cms/.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
# Tests
100+
############################
101+
102+
testApp
103+
coverage
104+
105+
############################
106+
# Strapi
107+
############################
108+
109+
.env
110+
license.txt
111+
exports
112+
*.cache
113+
build
114+
.strapi-updater.json

packages/cms/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.15.1

packages/cms/README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# DeveloperDAO.com CMS
2+
3+
## Development
4+
5+
### Prerequisites
6+
7+
create `.env` from `.env.example` and remove `JWT_SECRET` such as it would be generated and added to `.env` file by Strapi
8+
9+
### `develop`
10+
11+
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop)
12+
13+
```
14+
yarn develop
15+
```
16+
17+
### `seed`
18+
19+
By default, on the first application _DEVELOPMENT_ start(with `yarn develop`), **seed data** would be generated. In case you need to re-create it, run
20+
21+
```
22+
yarn seed
23+
```
24+
25+
> ⚠️ This will **clear all data** from all available collections
26+
27+
> ⚠️ If something happens during seeding and data starts to grow rapidly - **clear User collection** manually
28+
29+
#### How it works?
30+
31+
Strapi runs **bootstrap** function from `/src/index.js` [every time on server start](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/functions.html#bootstrap).
32+
33+
On the initial run, we check if the current mode is _development_ to run `generateSeedData` function. Only if we previously haven't run seeding - we run it.
34+
35+
When manual seeding happens with `FORCE_APP_BOOTSTRAP_ONLY` in _development_ mode, we run `strapi start` and exit right after **bootstrap** is finished.
36+
In this case, we could have our main app running and not worry about the "port is used" error.
37+
38+
There are default values of how much data we want to generate - feel free to increase or make them 0.
39+
```
40+
DEV_SEED_DATA_PROJECTS=8
41+
DEV_SEED_DATA_CONTRIBUTORS=15
42+
DEV_SEED_DATA_PARTNERS=5
43+
```
44+
45+
### `start`
46+
47+
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start)
48+
49+
```
50+
yarn start
51+
```
52+
53+
### `build`
54+
55+
Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build)
56+
57+
```
58+
yarn build
59+
```
60+
61+
---
62+
63+
# Strapi
64+
65+
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds.
66+
67+
## ⚙️ Deployment
68+
69+
Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html).
70+
71+
## 📚 Learn more
72+
73+
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
74+
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
75+
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
76+
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community.
77+
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
78+
79+
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
80+
81+
## ✨ Community
82+
83+
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
84+
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
85+
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.

packages/cms/config/admin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = ({ env }) => ({
2+
auth: {
3+
secret: env('ADMIN_JWT_SECRET'),
4+
},
5+
apiToken: {
6+
salt: env('API_TOKEN_SALT'),
7+
},
8+
});

0 commit comments

Comments
 (0)