Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
632ec28
Added in lobby stuff:
vck3000 Mar 1, 2020
8713129
Lots of additions
vck3000 Mar 2, 2020
d39228b
Added announcements
esme Mar 2, 2020
43bf292
Added redux for window width
esme Mar 3, 2020
8673873
Prevented useeffect from infinite loop
esme Mar 3, 2020
a2847cb
Renamed dispatch methods
esme Mar 3, 2020
32c3113
Lots of changes
esme Mar 3, 2020
ad46aa8
Removed console logs
esme Mar 3, 2020
3dc4fb7
Slight rename to fit style
vck3000 Mar 4, 2020
d22860e
Gave keys to components. Made MobileView 600px
vck3000 Mar 4, 2020
b0844bd
Added mobile view for lobby
esme Mar 5, 2020
437d7a8
Added sliding animation
esme Mar 5, 2020
5eb0864
Added window dimensions to Redux store
esme Mar 6, 2020
ea2e3af
Added scrollig for mobile
esme Mar 6, 2020
204a8a6
Some changes
esme Mar 6, 2020
b179483
More changes
esme Mar 6, 2020
fcfefbb
Removed lodash. Added throttle to window update.
vck3000 Mar 7, 2020
6d740e1
Mobile navbar done... finally
vck3000 Mar 7, 2020
e04f3c5
Added Redis, MongoDB, Mongo-express
vck3000 Mar 7, 2020
17d28af
Fixed some mobile views:
vck3000 Mar 8, 2020
aa2188c
Added Redis, MongoDB, Mongo-express
vck3000 Mar 7, 2020
1ab7010
Added Redis, MongoDB, Mongo-express
vck3000 Mar 7, 2020
7c873e9
Set up basic mongoose operations
vck3000 Mar 8, 2020
da8fb4d
Merge branch 'newPA_backend' of github.com:vck3000/ProAvalon into new…
vck3000 Mar 8, 2020
d32b574
Deleted Express backend
vck3000 Mar 21, 2020
f1e6d6c
Added NestJS and set up eslint
vck3000 Mar 21, 2020
c5550c2
Merge branch 'newPA' into newPA_backend
vck3000 Mar 25, 2020
2d227b9
Merge pull request #275 from vck3000/newPA_backend
vck3000 Mar 25, 2020
aa4c4f6
Fixed sidemenu for safari
vck3000 Mar 25, 2020
c2966a8
Fixed safari slider
vck3000 Mar 25, 2020
5785af6
Fixed safari side bar random width
vck3000 Mar 25, 2020
abc5845
Fixed desktop view
vck3000 Mar 25, 2020
06fdf6b
add websockets for chat
esme Mar 28, 2020
08909e7
Added redux for chat
esme Mar 29, 2020
a0b021e
Fixed messages
esme Mar 29, 2020
48d7c48
Fixed messages and socket connection
esme Mar 29, 2020
96939ff
Aligned chat to bottom
esme Mar 29, 2020
66315fc
Fixed timestamp key
esme Mar 29, 2020
435b1f3
Many changes
esme Mar 30, 2020
f5955af
Fixes
esme Apr 3, 2020
0e038d6
Updated Nextjs to 9.3
vck3000 Apr 4, 2020
59fede7
Fixed up Server side vs Client side urls for backend
vck3000 Apr 4, 2020
b210f1a
Split out types for chat. Stop auto getAllChat.
vck3000 Apr 4, 2020
9d2bfbf
Organised Sagas and made lobby request all chat.
vck3000 Apr 4, 2020
af59a9f
Capped recorded messages to 50
vck3000 Apr 4, 2020
b4595dd
add websockets for chat
esme Mar 28, 2020
14f23fc
Added redux for chat
esme Mar 29, 2020
a68d84e
Fixed messages
esme Mar 29, 2020
ad97921
Fixed messages and socket connection
esme Mar 29, 2020
d167154
Aligned chat to bottom
esme Mar 29, 2020
e8c689d
Fixed timestamp key
esme Mar 29, 2020
2193cb7
Many changes
esme Mar 30, 2020
05d1e7d
Fixes
esme Apr 3, 2020
1c3493e
Updated Nextjs to 9.3
vck3000 Apr 4, 2020
cf91977
Fixed up Server side vs Client side urls for backend
vck3000 Apr 4, 2020
d12eeba
Split out types for chat. Stop auto getAllChat.
vck3000 Apr 4, 2020
5741d27
Organised Sagas and made lobby request all chat.
vck3000 Apr 4, 2020
68e086f
Capped recorded messages to 50
vck3000 Apr 4, 2020
cc9c9bd
Moved types to dependencies instead of dev
vck3000 Apr 5, 2020
2d572f3
Merge branch 'newPA' of github.com:vck3000/ProAvalon into newPA
vck3000 Apr 5, 2020
9b6fd44
Rearranged lobby folder structure and renamed lobby to home for left …
esme Apr 5, 2020
59e95cd
Added protobuf js
vck3000 Apr 5, 2020
83414c9
Merge branch 'newPA_lobby' of https://github.com/esme/ProAvalon into …
vck3000 Apr 5, 2020
17d7dc1
Fixed merge conflicts
vck3000 Apr 5, 2020
e78fc42
Added step in circleCI install dependencies
vck3000 Apr 5, 2020
fadd30d
Hard copy in proto files to packages.
vck3000 Apr 5, 2020
611d35a
Added prod BACKEND_URL env var
vck3000 Apr 5, 2020
7b4d24a
Updated package-lock.json
vck3000 Apr 5, 2020
61578eb
Added backend url to dockerfile
vck3000 Apr 5, 2020
6f76e4c
Fixed up wrong build arg
vck3000 Apr 5, 2020
5f55480
Think I fixed up frontend env vars
vck3000 Apr 5, 2020
d930a78
changed socket io reconnection config
esme Apr 6, 2020
de4fb7f
added localdev npm script
esme Apr 6, 2020
b013ae1
fixed chat message classname
esme Apr 6, 2020
cfdbf6c
cleaned up code to decode chat request
esme Apr 6, 2020
0d73381
changed messages slice to splice
esme Apr 6, 2020
45c1deb
Implemented basic auth functionality on server
esme Apr 6, 2020
b0750e5
Some small changes:
vck3000 Apr 6, 2020
6452404
Improved protobuf handling
vck3000 Apr 7, 2020
32a7a09
Added test cases.
vck3000 Apr 7, 2020
722c1d4
Added a test case for bad password on login
vck3000 Apr 7, 2020
8fa8886
Updated config to run test before commits
vck3000 Apr 7, 2020
b96516c
Added Mongo with Typegoose
esme Apr 8, 2020
f988b58
Fixed test by mocking functions
esme Apr 8, 2020
6695dae
Lots of updates:
vck3000 Apr 8, 2020
f511664
Fixed mongo_url env variable
esme Apr 10, 2020
46c5484
Moved @types dependencies to devDependencies
esme Apr 10, 2020
5d4dc67
Added check to verify if username or email exists
esme Apr 10, 2020
804c625
Changed emailAddress to email
esme Apr 10, 2020
5276803
Implemented server side input validation for username, password, and …
esme Apr 10, 2020
e350618
Added express rate limiter and helmet for additional security
esme Apr 10, 2020
e37668a
Fixed tests to include 400 bad request header
esme Apr 10, 2020
2871a36
Some small changes:
vck3000 Apr 11, 2020
0e085ab
Added check to verify if username or email exists
esme Apr 10, 2020
3d6fb69
Changed emailAddress to email
esme Apr 10, 2020
4f5676e
Implemented server side input validation for username, password, and …
esme Apr 10, 2020
11de927
Added express rate limiter and helmet for additional security
esme Apr 10, 2020
1f6fdb5
Fixed tests to include 400 bad request header
esme Apr 10, 2020
4843715
Added socketio-jwt to handle socket connections with JWT
esme Apr 12, 2020
fe5e9c9
WIP, halfway commit:
vck3000 Apr 13, 2020
c96ae4a
Finished up socket side auth:
vck3000 Apr 13, 2020
6ca5a90
Cleansup:
vck3000 Apr 14, 2020
2e81806
Moved @types back into dependencies for prod
vck3000 Apr 14, 2020
d45bf44
Fixed up CircleCI builds for bcrypt and other misc.
vck3000 Apr 14, 2020
7c4cb91
CircleCI multiple jobs - hopefully faster builds
vck3000 Apr 14, 2020
7186027
Fixed mis-spaced config file
vck3000 Apr 14, 2020
337e2db
Another mismatch fix...
vck3000 Apr 14, 2020
0f1008d
Added checkout to circle ci config
vck3000 Apr 14, 2020
e2d101b
Fixed up some routing api urls
vck3000 Apr 14, 2020
8010f56
Fixed up silent exit. Bcrypt to Bcryptjs
vck3000 Apr 14, 2020
97445c4
Added redis and cross server socket communication!
vck3000 Apr 14, 2020
29259ca
Added redis helpers and one socket per user checks.
vck3000 Apr 14, 2020
b43e6f5
Added localhost:3001 to getEnvVars file and removed localdev scripts
esme Apr 15, 2020
0dbc5c1
Small changes to frontend
esme Apr 15, 2020
8f2551e
Allow usernames with hypen or period in names but not consecutively
esme Apr 15, 2020
5e01fb6
Changed chat response username to displayUsername for frontend
esme Apr 15, 2020
66a50cd
Set up online players list
esme Apr 15, 2020
fb2d89f
Fixed scrollbar css
esme Apr 15, 2020
8b772cf
Renamed players to onlinePlayers.
vck3000 Apr 15, 2020
a6c0329
Refactored online players and online sockets
vck3000 Apr 15, 2020
5ba27eb
Replaced protobuf with typescript definitions
vck3000 Apr 15, 2020
d81d8e7
Changed window onload event listener to useState for safari browsers
esme Apr 15, 2020
950fd39
Fixed up navbars for the final time hopefully
vck3000 Apr 16, 2020
16eacac
Changed mobile view for home tab
esme Apr 16, 2020
ee6afea
Cleaned up docker compose env and took out docke rpush from circle ci
vck3000 Apr 16, 2020
9276f47
Fixed up socket reconnections
vck3000 Apr 17, 2020
6c19e29
Validated onlinePlayers using class validator and class transformer
esme Apr 17, 2020
4328c8f
Added chatResponse and onlinePlayers validation using class-transform…
esme Apr 17, 2020
b3cb738
Added chatResponse and onlinePlayers validation using class-transform…
esme Apr 17, 2020
3054ef0
Made frontend redux saga hot reload!
vck3000 Apr 18, 2020
bf8ed8f
Added @type class decorate to convert time to date for chatResponse
esme Apr 19, 2020
482cd3e
Added user commands on the backend
esme Apr 20, 2020
4b802dd
Moved recipient does not exist check to chat.gateway
esme Apr 20, 2020
eb6313d
Modularized chat commands to have a user commands subfolder
esme Apr 20, 2020
fae5440
Removed redis adapter from providers and renamed getCommand to sendCo…
esme Apr 20, 2020
59389b7
Commands just working. Needs cleanup.
vck3000 Apr 21, 2020
2888404
Fixed up commands a bit and renamed stuff.
vck3000 Apr 21, 2020
51cc0f3
Cleaned up input validation tests
esme Apr 21, 2020
a4071a8
Update README.md
vck3000 Apr 29, 2020
0fb7518
Tweak username input validation
sleepyfoxen Apr 22, 2020
c6014b6
Stored displayUsername instead of username in onlinePlayers in Redis
esme Apr 23, 2020
381265d
Change userActions to userCommands and remove .toObject()
esme Apr 23, 2020
32129f5
Removed unnecessary return type
esme Apr 23, 2020
bbfb670
Make jwt return user
esme Apr 23, 2020
0975af9
Removed dump
esme Apr 23, 2020
952c426
Tidied up code and simplified things. Removed npm test redis timing out.
vck3000 Apr 25, 2020
b4e33a9
Fixed test cases not terminating.
vck3000 Apr 25, 2020
f154354
Tweak username input validation
sleepyfoxen Apr 22, 2020
a9ffef4
Stored displayUsername instead of username in onlinePlayers in Redis
esme Apr 23, 2020
a2f77b6
Change userActions to userCommands and remove .toObject()
esme Apr 23, 2020
49f55a2
Removed unnecessary return type
esme Apr 23, 2020
d2198f9
Make jwt return user
esme Apr 23, 2020
3434e42
Removed dump
esme Apr 23, 2020
dff19ef
Tidied up code and simplified things. Removed npm test redis timing out.
vck3000 Apr 25, 2020
e1bd1bf
Fixed test cases not terminating.
vck3000 Apr 25, 2020
ae96f8e
Fix setup errors
sekig4n Apr 29, 2020
9331f9b
update docker-compose to use named volumes
skipkayhil Apr 30, 2020
7e1f828
Moved user validation tests from e2e to unit tests
vck3000 Apr 30, 2020
da06e24
Added socket e2e tests
vck3000 Apr 30, 2020
ddeb674
Merge branch 'newPA' into newPA_staging
vck3000 Apr 30, 2020
5097b59
add style to make all timestamps the same width
skipkayhil Apr 30, 2020
a324d39
add skeleton game page
skipkayhil Apr 30, 2020
214d147
fix lobby nav overlap, implement Layout
skipkayhil May 1, 2020
07cc08f
Fixed up the mobile height of lobby.
vck3000 May 1, 2020
415da77
replace theme objects with css variables
skipkayhil May 1, 2020
c8d92a3
add profile/logout to nav, logout actions
skipkayhil May 3, 2020
afda4fb
Renamed some minor things
vck3000 May 5, 2020
c20a611
add TabPane component, update Game with layout
skipkayhil May 5, 2020
38d5550
Small naming changes
vck3000 May 6, 2020
1c2fc26
move socket open/close to saga
skipkayhil May 6, 2020
63c733b
first forums commit
aanguyen May 5, 2020
988b947
Add dto, add test for forums service
aanguyen May 5, 2020
e1068c6
address comments
aanguyen May 6, 2020
56d697d
remove unused
aanguyen May 6, 2020
865f0ec
fix lint
aanguyen May 6, 2020
865a5de
update forum e2e test
aanguyen May 6, 2020
7bfda1c
update e2e test
aanguyen May 6, 2020
73094b1
oops
aanguyen May 6, 2020
1353e90
objectcontaining for e2e tests
aanguyen May 6, 2020
202f300
Add users back to redis store on reconnection
vck3000 May 7, 2020
af37649
Added GamesModule, Game Chat and more.
vck3000 May 7, 2020
fa2a7b7
refactor chat to be reusable in multipe places
skipkayhil May 6, 2020
056f987
add hover style to ends up nav banner
skipkayhil May 8, 2020
17604f5
Added closing room functionality.
vck3000 May 8, 2020
1d551d4
make night theme default for SSR
skipkayhil May 8, 2020
493142d
refactor auth, userOptions into user reducer
skipkayhil May 9, 2020
ba2121d
Halfway commit
vck3000 May 10, 2020
0b641ff
Added integration tests
vck3000 May 10, 2020
edfd9fe
Circle CI Integration tests
vck3000 May 10, 2020
a23431b
create lobby reducer, move onlinePlayers into it
skipkayhil May 10, 2020
28fde3b
fix font family, replace semantic tab
skipkayhil May 11, 2020
7eae2bc
Fixed up two fonts from previous commit
vck3000 May 11, 2020
42c504d
Removed use of anonymous docker volumes.
vck3000 May 11, 2020
622efc8
Fixed up int tests making anon docker volumes.
vck3000 May 11, 2020
d336dc9
Log out user if they give a bad auth key
vck3000 May 11, 2020
192d58a
Added separate keys for tabs.
vck3000 May 11, 2020
a2dc58d
remove semantic-ui table from online-players
skipkayhil May 11, 2020
5d00100
remove semantic-ui Grid usage
skipkayhil May 12, 2020
2c95f51
Fixed up font for button carousel.
vck3000 May 12, 2020
e34f3a2
[Forums] posting and getting comments (#336)
aanguyen May 13, 2020
232b68c
Refactor chat actions, add game chat socket
skipkayhil May 13, 2020
9fa41b0
Naming changes
vck3000 May 14, 2020
291538b
Replace semantic-ui form with Formik
skipkayhil May 13, 2020
bb19a92
update npm packages
skipkayhil May 15, 2020
565a879
Remove semantic-ui, add user actions to mobile nav
skipkayhil May 15, 2020
8379727
Added Redis synchronisation and game service.
vck3000 May 17, 2020
02c4b19
Updated commands to all be services and modules.
vck3000 May 17, 2020
0296357
Added some docs for redis keys and socket.io rooms.
vck3000 May 17, 2020
c8937ae
Added create game msg to all chat and renamed senderSocket to socket.
vck3000 May 17, 2020
e0b0e53
Fixed up sending create game message to clients.
vck3000 May 17, 2020
152c0f3
Added Swal alert on no game found.
vck3000 May 17, 2020
4483504
Change source of game card avatars to props
skipkayhil May 18, 2020
7c5315f
Added game state on creation
vck3000 May 18, 2020
fc58cae
Add game state reducer and vote history component
skipkayhil May 16, 2020
d09d651
Halfway with local proto package.
vck3000 May 18, 2020
37bfcdd
WIP: proto package
skipkayhil May 19, 2020
6362f25
Migrated code to use @proavalon/proto.
vck3000 May 19, 2020
70d3b99
Fixed rest of @proavalon/proto implementation.
vck3000 May 19, 2020
f7ff68f
Fixed prod building and pushing using @proavalon/proto.
vck3000 May 19, 2020
86880de
Added Online Lobby Games messages
vck3000 May 19, 2020
3e63e6c
Add namespaces to @proavalon/proto
skipkayhil May 20, 2020
54bace3
Added clean script to proto package.
vck3000 May 20, 2020
d64f9c0
Add game state for lobby, attach to game menu
skipkayhil May 20, 2020
8b8bf4a
Changed gameMode to mode.
vck3000 May 21, 2020
c8c7223
Add gameContent component, refactor game component
skipkayhil May 21, 2020
8f9a05d
Refactor layout component, fix banner alignment
skipkayhil May 21, 2020
5e822d8
Fixed up integration tests.
vck3000 May 21, 2020
8955627
Refactor desktop nav components
skipkayhil May 21, 2020
c4479c2
Replace NavIndex with NavMobile and NavDesktop
skipkayhil May 21, 2020
4a2e6fb
Fixed up integration tests hanging.
vck3000 Jun 5, 2020
1691735
Add term glossary that adds abbr
richardscollin Jun 2, 2020
ea07072
Update glossary definitions
richardscollin Jun 5, 2020
c25eefa
Update definition aliases
richardscollin Jun 6, 2020
df71a5a
Games now sent out on client join and capped to 5 active games.
vck3000 Jun 22, 2020
f8a114f
Halfway commit
vck3000 Jun 17, 2020
b2cdff6
Undid the generic component types
vck3000 Jun 18, 2020
891ae4f
Renamed components to be shorter.
vck3000 Jun 18, 2020
ae7bb1b
Added tests and added GameEvent protocols.
vck3000 Jun 18, 2020
e09d156
Started the room state machine
vck3000 Jun 22, 2020
886dbaa
Added pick vote state and tests
vck3000 Jul 16, 2020
14a4ea4
Added preliminary player actors
vck3000 Jul 17, 2020
f95d9c9
Fixed up compile warnings to git commit tests can run.
vck3000 Jul 17, 2020
7c7ed5d
Added skeleton for special state
vck3000 Jul 17, 2020
ceb5f49
Added special events to players and states
vck3000 Jul 18, 2020
3dd62d2
Merged half of ECS into State machine
vck3000 Jul 18, 2020
c8f4e24
Replaced player machine with ECS.
vck3000 Jul 19, 2020
8deb553
Game now accepts team voting.
vck3000 Jul 19, 2020
f7563bf
Merged in ECS with NestJS! Frontend also hooked up!
vck3000 Jul 20, 2020
08e5cfc
Frontend join rooms now receive data!
vck3000 Jul 20, 2020
b0a4a1f
Added integration tests for room update.
vck3000 Jul 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
409 changes: 409 additions & 0 deletions '

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# JavaScript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build_and_unit_test:
docker:
# specify the version you desire here
- image: circleci/node:13
working_directory: ~/repo

steps:
- checkout

- run: echo "lerna installing"
# - run: sudo npm install -g lerna
- run: sudo npm i
- run: sudo npx lerna bootstrap
- run: sudo npm run build:proto

# build, lint, test!
- run: npm run build
- run: npm run lint
- run: npm run test

integration_test:
docker:
# specify the version you desire here
- image: circleci/node:13
working_directory: ~/repo

steps:
- checkout
- setup-remote-docker

# - run: echo "lerna installing"
# - run: sudo npm install -g lerna
# - run: sudo npm i
# - run: sudo npx lerna bootstrap

- run: npm run test:int:circleci

# docker_deploy_backend:
# docker:
# - image: circleci/node:13
# working_directory: ~/repo
# steps:
# - checkout
# - setup-remote-docker
# # Build and push Docker image - Only create and push newPA branch.
# - run: |
# if [ $CIRCLE_BRANCH != newPA ]; then exit 0; fi
# TAG=0.1.$CIRCLE_BUILD_NUM
# docker build -t $DOCKER_USER/proavalon_backend:$TAG -f Dockerfile.prod --build-arg SERVICE=backend .
# echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
# docker push $DOCKER_USER/proavalon_backend:$TAG
# docker_deploy_frontend:
# docker:
# - image: circleci/node:13
# working_directory: ~/repo
# steps:
# - checkout
# - setup-remote-docker
# # Build and push Docker image - Only create and push newPA branch.
# - run: |
# if [ $CIRCLE_BRANCH != newPA ]; then exit 0; fi
# TAG=0.1.$CIRCLE_BUILD_NUM
# docker build -t $DOCKER_USER/proavalon_frontend:$TAG -f Dockerfile.prod --build-arg SERVICE=frontend .
# echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
# docker push $DOCKER_USER/proavalon_frontend:$TAG

workflows:
version: 2
build_deploy:
jobs:
- build_and_unit_test
- integration_test
# - docker_deploy_backend:
# requires:
# - build
# - docker_deploy_frontend:
# requires:
# - build
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules
**/.next
**/build

15 changes: 0 additions & 15 deletions .env.example

This file was deleted.

4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
assets/libraries/
node_modules/
packages/backend/proto/*
packages/frontend/proto/*
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

125 changes: 29 additions & 96 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,96 +1,29 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env*
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Project files

!node_modules/passport-local-mongoose/
package-lock.json
assets/gameRecordsData/
!assets/gameRecordsData/gameRecordsDataAnon.json
.vscode/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

/packages/**/node_modules
/packages/**/.next

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
.env

# debug
/database_data
npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}
22 changes: 22 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:13

ARG SERVICE
ENV SERVICE="$SERVICE"

RUN echo "Building DEV env for ${SERVICE}."

# Setting working directory. All the path will be relative to WORKDIR
WORKDIR /usr/src/app

# Copy over required files
COPY package*.json ./
COPY lerna.json .
COPY packages/${SERVICE} ./packages/${SERVICE}
COPY packages/proto ./packages/proto

# Install packages
RUN npm i
RUN npm run bootstrap

# Dev mode
CMD [ "npm" , "--prefix", "packages/${SERVICE}", "run", "dev" ]
42 changes: 42 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Build stage
FROM node:13 AS build

ENV NODE_ENV="development"

ARG SERVICE
ENV SERVICE "$SERVICE"

RUN echo "Building PROD env for ${SERVICE}."

WORKDIR /usr/src/app

# Copy over the files
COPY package*.json ./
COPY lerna.json ./
COPY packages/${SERVICE} ./packages/${SERVICE}
COPY packages/proto ./packages/proto

# Install dependencies
RUN npm i
RUN npm run bootstrap
# RUN npm ci --ignore-scripts --no-optional
# RUN npm install -g lerna
# RUN lerna bootstrap --ignore-scripts -- --no-optional
# RUN cd packages/${SERVICE} && npm install

# Build and prune away the devDependencies
# --no-package-lock so that npm doesn't delete @proavalon/proto
RUN cd packages/${SERVICE} && npm run build && npm prune --production --no-package-lock

# Production stage
FROM node:13-alpine
WORKDIR /usr/src/app
ENV NODE_ENV="production"
ARG SERVICE

COPY --from=build /usr/src/app/packages/${SERVICE} ./packages/${SERVICE}
# Copy the whole package over. Use --no-package-lock above to prevent this from being
# deleted in previous stage
COPY --from=build /usr/src/app/packages/proto ./packages/proto

CMD [ "npm" , "--prefix", "packages/${SERVICE}", "run", "start:prod" ]
16 changes: 16 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:13

# Setting working directory. All the path will be relative to WORKDIR
WORKDIR /usr/src/app

# Copy over required files
# For now copy everything. Can optimise this by not copying frontend since
# there are no integration tests for it.
COPY ./ ./

# Install packages
RUN npm i
RUN npm run bootstrap

# Dev mode
CMD [ "npm", "run", "test:int:run" ]
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion Procfile

This file was deleted.

Loading