Skip to content

Commit f43f3e8

Browse files
authored
Chore/#153928513 - Add project architecture guide (#125)
* chore(docs): Add architecture guide (unfinished) * chore(docs): Add code of conduct - just to finish off the docs * chore(docs): update architecture guide * chore(docs): add pr template, update contributing - add link for pr section to put in pr template - add 'Branch Updating and Conflicts' section to CONTRIBUTING * chore(docs): Add front-end/back-end guides links (#122) * chore(docs): update PR template * chore(docs): update architecture guide - project structure change - add client architecture section - add server architecture section * chore(docs): update contributing doc & pr template * chore(docs): remove comma * chore(docs): update PR template * chore(docs): update project structure section * chore(docs): update client architecture section * chore(docs): add server architecture section * chore(docs): update architecture guide * chore(docs): update PR template wording * chore(scripts): update start/stop/restart scripts * chore(docs): update README * chore(docs): update CONTRIBUTING * chore(docs): add `yarn lint` to scripts cheatsheet * chore(docs): update a few more things [#153928513]
1 parent cd997f0 commit f43f3e8

10 files changed

+1009
-25
lines changed

Diff for: .setup/db/run.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ start () {
1313
# Make sure a container isn't already running
1414
if [[ -z "$ID_FROM_DB" && -z "$ID_FROM_NAME" ]] ; then
1515
echo "--- Starting new docker container with MongoDB.."
16-
docker run --name $NAME -d -p 27017:27017 -p 28017:28017 $DB:$IMAGE_VERSION | xargs echo "--- Started container"
16+
docker run --name $NAME -d -p 27017:27017 -p 28017:28017 $DB:$IMAGE_VERSION \
17+
| xargs echo "--- Started container"
1718

1819
echo "--- Copying seed data to docker container.."
1920
docker cp ./.setup/db/seedData/users.json $NAME:users.json
2021
docker cp ./.setup/db/seedData/projects.json $NAME:projects.json
2122

2223
echo "--- Adding seed data to MongoDB.."
23-
docker exec $NAME mongoimport --db admin --collection users --file users.json --type json --jsonArray
24-
docker exec $NAME mongoimport --db admin --collection projects --file projects.json --type json --jsonArray
24+
docker exec $NAME mongoimport --quiet --db admin --collection users \
25+
--file users.json --type json --jsonArray
26+
docker exec $NAME mongoimport --quiet --db admin --collection projects \
27+
--file projects.json --type json --jsonArray
2528
else
2629
echo "--- Skipping start, container already running"
2730
exit 0

Diff for: .setup/email/run.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ set +x -e -o pipefail
55
NAME=mailhog
66
ID_FROM_NAME=$(docker ps -aq -f name=$NAME)
77
IMAGE=diyan/mailhog
8-
8+
99
start () {
1010
set -u
1111
# Make sure a container isn't already running
1212
if [[ -z "$ID_FROM_NAME" ]] ; then
1313
echo "--- Starting new docker container with MailHog.."
14-
docker run --name=$NAME -d -p 1025:1025 -p 8025:8025 $IMAGE | xargs echo "-- Started container"
14+
docker run --name=$NAME -d -p 1025:1025 -p 8025:8025 $IMAGE \
15+
| xargs echo "--- Started container"
1516
else
1617
echo "--- Skipping start, container already running"
1718
exit 0
@@ -20,7 +21,7 @@ start () {
2021

2122
stop () {
2223
set -u
23-
# Make sure there's a container to stop
24+
# Make sure there's a container to stop
2425
if [[ ! -z "$ID_FROM_NAME" ]] ; then
2526
ID=$ID_FROM_NAME
2627
else
@@ -38,12 +39,12 @@ cat <<EOF
3839
Usage: ./email/run.sh <target>
3940
Targets:
4041
start - start a docker container with MailHog mail server
41-
stop - stop and remove the docker container
42+
stop - stop and remove the docker container
4243
EOF
4344
}
4445

4546
case $1 in
4647
start) start ;;
47-
stop) stop ;;
48+
stop) stop ;;
4849
*) info ;;
4950
esac

Diff for: README.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,31 @@
1111
1212
## Getting Started
1313

14-
👋 Want to contribute to this project? Follow these steps to get started:
14+
:wave: Want to contribute to this project? Follow these steps to get started:
1515

16-
- **💻 Environment Setup**: First, you're going to want to make sure your development environment is properly set up. Read through our [development environment setup](docs/DEVELOPER.md) guide.
16+
- **:computer: Environment Setup**: First, you're going to want to make sure your development environment is properly set up. Go ahead and read through our [development environment setup](docs/DEVELOPER.md) guide.
1717

18-
- **✏️ Contribute**: Once you're set up, you're ready to become a contributor. Make sure you read our [contributing guidelines](docs/CONTRIBUTING.md) before you start working!
18+
- **:pencil2: Contribute**: Once you're set up, you're ready to become a contributor. Make sure you read our [contributing guidelines](docs/CONTRIBUTING.md) before you start working on a story so that you can learn our workflows.
1919

20-
- **🙋 Ask Questions**: If you're stuck on something, don't be afraid to ask around in [Slack](http://join-our-slack.code4socialgood.org/)! You can also check out our list of [common problems](docs/PROBLEMS.md) to see if your issue is addressed there.
20+
- **:european_castle: Project Architecture**: We've put together an [architecture guide](docs/ARCHITECTURE.md) to serve as a reference and help reduce the time it takes to familiarize yourself with this project's architecture and codebase.
21+
22+
- **:raising_hand: Questions & Problems**: If you're stuck on something, don't be afraid to ask around in [Slack](http://join-our-slack.code4socialgood.org/)! You can also check out the [docs](docs/), where there is a lot of helpful information including a list of [common problems](docs/PROBLEMS.md).
2123

2224
## Additional Information
2325

2426
Below is a cheatsheet for the scripts that can be found in `package.json`:
2527

2628
```bash
27-
$ yarn # Install dependencies (npm install)
28-
$ yarn db start # Restart docker container with mongodb and add seed data (npm run db -- start)
29-
$ yarn db stop # Stop docker container with mongodb (npm run db -- stop)
30-
$ yarn email start # Start docker container with MailHog, if it's not already running (npm run email -- start)
31-
$ yarn email stop # Stop docker container with MailHog (npm run email -- stop)
32-
$ yarn start # Run app locally on port 3000 and in watch mode on port 3001 via https (npm start)
33-
$ yarn test # Run tests (npm test)
34-
$ yarn build # Generate distribution (npm run build)
29+
$ yarn # Install dependencies (npm install)
30+
$ yarn start # Start all docker containers and app on port 3000 and on port 3001 via https w/ watch mode (npm start)
31+
$ yarn stop # Stop all docker containers (npm stop)
32+
$ yarn restart # Restart all docker containers and app (npm restart)
33+
$ yarn test # Run linter, test build, and tests (npm test)
34+
$ yarn e2e # Run end-to-end tests (npm run e2e)
35+
$ yarn lint # Run linter (npm run lint)
36+
$ yarn db <start/stop> # Start/stop docker container with seeded MongoDB (npm run db -- <start/stop>)
37+
$ yarn email <start/stop> # Start/stop docker container with MailHog (npm run email -- <start/stop>)
38+
$ yarn build # Generate distribution (npm run build)
3539
```
3640

3741
*Although yarn is recommended, you may also use npm natively. The corresponding npm commands are in parenthesis above.*

0 commit comments

Comments
 (0)