Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invitation crud 2 #55

Open
wants to merge 362 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
362 commits
Select commit Hold shift + click to select a range
bf29262
triggering a build, no changes
RY3IEZN Nov 30, 2022
8557942
triggering a build
RY3IEZN Nov 30, 2022
7984a9c
Merge pull request #64 from workshopapps/bec-26-get-list-of-events-us…
technicaldee Dec 1, 2022
d77b06c
signin progress
Preshy-Jones Dec 1, 2022
87eba50
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 1, 2022
f709c09
change
Preshy-Jones Dec 1, 2022
6da466a
Merge pull request #62 from workshopapps/BEC-31-generate-invite-link
technicaldee Dec 1, 2022
09b5278
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 1, 2022
d446d82
google signin and sign up done
Preshy-Jones Dec 1, 2022
c982971
fix
Preshy-Jones Dec 1, 2022
f77908e
unprotect get event by token.
kayceeDev Dec 1, 2022
414c7fc
Merge pull request #65 from workshopapps/BEC-28-google-signin-signup
kayceeDev Dec 1, 2022
bee93d0
changes
Preshy-Jones Dec 2, 2022
7154243
fixed googleapis error
Preshy-Jones Dec 2, 2022
62e4cab
Merge pull request #6 from technicaldee/dev
technicaldee Dec 2, 2022
7e7c746
change
Preshy-Jones Dec 2, 2022
cfe84be
added new cors site
Preshy-Jones Dec 2, 2022
8dffaff
cors
Preshy-Jones Dec 2, 2022
0e227f6
Merge branch 'staging' into dev
technicaldee Dec 2, 2022
c500c95
Merge pull request #7 from technicaldee/dev
technicaldee Dec 2, 2022
0c696cd
Update allowedOrigins.js
technicaldee Dec 2, 2022
2417251
Update allowedOrigins.js
technicaldee Dec 2, 2022
1cf2706
Update allowedOrigins.js
technicaldee Dec 2, 2022
9922548
Merge pull request #66 from workshopapps/technicaldee-patch-1
technicaldee Dec 2, 2022
457d452
feat: Added a Jenkinsfile
iamgreatoni Dec 2, 2022
bea4455
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
iamgreatoni Dec 2, 2022
d29d00a
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
83c5633
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
f11a7d0
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
7dd0fd9
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
124b69f
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
3f67b05
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
2125c01
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
b89b4f5
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
b62b983
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
18b4745
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
3b97f70
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
9df0eae
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
67ce3b3
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
1cc9d5a
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
9e9f46c
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
58598ba
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
e5ad023
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
86917c7
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
cd3aa98
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
37ada58
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
3e327ad
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
2cf5391
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
98b8544
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
172b679
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
6b5a22c
feat: Updated Jenkinsfile
iamgreatoni Dec 2, 2022
7501c63
Update calendar.js
technicaldee Dec 2, 2022
c556d44
Update calendar.js
technicaldee Dec 2, 2022
3902a9a
Merge pull request #67 from workshopapps/technicaldee-patch-2
technicaldee Dec 2, 2022
14ec228
updating invite crud
Preshy-Jones Dec 3, 2022
bdd6f0c
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 3, 2022
1c55b7b
updated Jenkinsfile
RY3IEZN Dec 3, 2022
4e809d0
updated Jenkinsfile
RY3IEZN Dec 3, 2022
be9cde4
updated Jenkinsfile
RY3IEZN Dec 3, 2022
f4cc095
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
fc0267f
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
6f52b7f
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
d299755
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
f95cd5b
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
e4f2db0
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
5a8002b
feat: Updated Jenkinsfile
iamgreatoni Dec 3, 2022
99967e4
testing auto deploy plus performance test
RY3IEZN Dec 3, 2022
d21cc7b
testing auto deploy plus performance test
RY3IEZN Dec 3, 2022
7bc6a52
testing auto deploy plus performance test
RY3IEZN Dec 3, 2022
b203983
updates
Preshy-Jones Dec 3, 2022
c596df6
set up rate limitter on login route
Preshy-Jones Dec 3, 2022
94a5ec3
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 3, 2022
01f897c
fixed yarn.lock merge conflict
Preshy-Jones Dec 3, 2022
8cb38b5
Merge pull request #68 from workshopapps/BEC-21-invitation-implementa…
kayceeDev Dec 3, 2022
7a6956e
Update allowedOrigins.js
technicaldee Dec 3, 2022
17e792b
google auth complete
Preshy-Jones Dec 3, 2022
2c12531
Merge pull request #69 from workshopapps/BEC-28-google-signin-signup
kayceeDev Dec 3, 2022
41ed752
Add api response
kayceeDev Dec 3, 2022
92fc4f0
Add get event participants endpoint
kayceeDev Dec 3, 2022
2352aa1
fix merge conflict
kayceeDev Dec 3, 2022
a2fade7
Merge pull request #70 from workshopapps/bec-32-get-participants-for-…
kayceeDev Dec 3, 2022
bc7a9cb
Fix merge conflict
kayceeDev Dec 3, 2022
ffbcee9
feat(BEC-30) Users can get the host_info when grabbing events (https:…
technicaldee Dec 3, 2022
adb52aa
feat(BEC-30) Users can get the host_info when grabbing events (https:…
technicaldee Dec 3, 2022
b07d0a3
Merge branch 'dev' into bec-30-get-user-information-to-route-sign-up-to
technicaldee Dec 4, 2022
42290e6
Merge pull request #71 from workshopapps/bec-30-get-user-information-…
technicaldee Dec 4, 2022
e712da4
integrated nodemailer to forgot password and updated cookie config
Preshy-Jones Dec 4, 2022
5e875e1
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 4, 2022
2347fc3
removed unused routes and controllers
Preshy-Jones Dec 4, 2022
1b01b7e
removed unnused controller
Preshy-Jones Dec 4, 2022
d36677d
refactored invite by email
Preshy-Jones Dec 4, 2022
734a905
Remove host info
kayceeDev Dec 5, 2022
35272e5
Merge branch 'dev' of github.com:workshopapps/dinnerwithfriends.api i…
kayceeDev Dec 5, 2022
8d41d1c
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 5, 2022
6a039de
added correct participant url
Preshy-Jones Dec 5, 2022
b118288
updated get decode token function
Preshy-Jones Dec 5, 2022
0894031
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 5, 2022
6653ebc
Update README.md
Angelo-Ufelle Dec 5, 2022
7f5006c
Update README.md
Angelo-Ufelle Dec 5, 2022
a43f3d2
updated get event invites
Preshy-Jones Dec 5, 2022
effb954
updated get event details
Preshy-Jones Dec 5, 2022
ebdeb4b
Update README.md
Angelo-Ufelle Dec 5, 2022
e3cb7d2
Merge pull request #72 from workshopapps/BEC-29-get-eventInfo-from-em…
Preshy-Jones Dec 5, 2022
394f55e
Merge branch 'BEC-21-invitation-implementation' of https://github.com…
Preshy-Jones Dec 5, 2022
f84bab3
calendar email
technicaldee Dec 5, 2022
e043b5e
Merge branch 'dev' of github.com:workshopapps/dinnerwithfriends.api i…
kayceeDev Dec 6, 2022
9c9e726
hotfix to sync calendar
technicaldee Dec 6, 2022
14b2cc5
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
technicaldee Dec 6, 2022
68c5412
prepping for merge
technicaldee Dec 6, 2022
10fd3a2
Merge pull request #73 from workshopapps/hotfi
technicaldee Dec 6, 2022
2552a61
Add cancel event route
kayceeDev Dec 6, 2022
be65e50
Modify add participant
kayceeDev Dec 6, 2022
bd4af46
Modify event model to have more publish statust
kayceeDev Dec 6, 2022
1439476
Modify participant count model to have unique event id
kayceeDev Dec 6, 2022
5ac9cbf
Modify the generate final event date algorithm
kayceeDev Dec 6, 2022
b261f7c
modify gitignore
kayceeDev Dec 6, 2022
54f4d71
created workflow
Preshy-Jones Nov 19, 2022
e77ef89
deleted workflow
Preshy-Jones Nov 19, 2022
2cc1b5d
added workflow
Preshy-Jones Nov 19, 2022
833ffe9
Add new origin
kayceeDev Nov 30, 2022
33e0670
unprotect get event by token.
kayceeDev Dec 1, 2022
74d6917
Update allowedOrigins.js
technicaldee Dec 2, 2022
9671156
Update allowedOrigins.js
technicaldee Dec 3, 2022
9d74df0
Add cancel event route
kayceeDev Dec 6, 2022
4b4cfc3
Modify event model to have more publish statust
kayceeDev Dec 6, 2022
42d15e9
Modify participant count model to have unique event id
kayceeDev Dec 6, 2022
8ac8911
Modify the generate final event date algorithm
kayceeDev Dec 6, 2022
c9ceca4
Fix merge conflict
kayceeDev Dec 6, 2022
d354fb2
Fix participant errors
kayceeDev Dec 6, 2022
efa6c4c
remove unused comments
kayceeDev Dec 6, 2022
44f0a85
Merge pull request #74 from workshopapps/bec-33-endpoint-cancel-event
kayceeDev Dec 6, 2022
4570199
Merge pull request #75 from workshopapps/bec-34-modify-and-update-eve…
kayceeDev Dec 6, 2022
058ca80
calendar email
technicaldee Dec 5, 2022
5e9c23d
hotfix to sync calendar
technicaldee Dec 6, 2022
9f27f49
created workflow
Preshy-Jones Nov 19, 2022
3ce2aee
deleted workflow
Preshy-Jones Nov 19, 2022
e1158be
Add new origin
kayceeDev Nov 30, 2022
3ff30b6
Update allowedOrigins.js
technicaldee Dec 2, 2022
2ece9ce
Add cancel event route
kayceeDev Dec 6, 2022
bf09a7d
Modify event model to have more publish statust
kayceeDev Dec 6, 2022
2626b98
Modify participant count model to have unique event id
kayceeDev Dec 6, 2022
2795d57
Modify the generate final event date algorithm
kayceeDev Dec 6, 2022
aaf4b70
Fix participant errors
kayceeDev Dec 6, 2022
daa4c8c
remove unused comments
kayceeDev Dec 6, 2022
95b72ba
Fix conflict
kayceeDev Dec 6, 2022
247dfeb
Merge branch 'dev' of github.com:workshopapps/dinnerwithfriends.api i…
kayceeDev Dec 6, 2022
066fd2e
fix string conversion
kayceeDev Dec 6, 2022
9ac1baa
Merge pull request #14 from technicaldee/bec-33-endpoint-cancel-event
kayceeDev Dec 6, 2022
049429b
allowed emails on invites to work
Preshy-Jones Dec 7, 2022
a57b6de
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 7, 2022
d860692
Modify event and participant models
kayceeDev Dec 7, 2022
2b08df6
Add joi-objectid package
kayceeDev Dec 7, 2022
6d0d343
Modify add participant controller
kayceeDev Dec 7, 2022
9eafd19
Modify generatefinaleventdate function
kayceeDev Dec 7, 2022
dab1bcb
Modify participant model
kayceeDev Dec 7, 2022
2d499d5
Add userdata to return on signup
kayceeDev Dec 7, 2022
403d7f7
Secure cookie on production
kayceeDev Dec 7, 2022
b4b86f5
Fix merge conflicts
kayceeDev Dec 7, 2022
c1f1649
Fix more undefined error
kayceeDev Dec 7, 2022
d8fc53b
Cast int to string
kayceeDev Dec 7, 2022
ff70c78
Merge pull request #17 from technicaldee/bug/modifications
kayceeDev Dec 7, 2022
4e5f748
add hot_info
technicaldee Dec 7, 2022
5505b3c
Merge branch 'dev' into hotfi
technicaldee Dec 7, 2022
20eb515
Merge pull request #76 from workshopapps/hotfi
technicaldee Dec 7, 2022
b75fa0f
added APM configuration
iamgreatoni Dec 7, 2022
0e05a71
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
iamgreatoni Dec 7, 2022
5f8840d
added APM configuration
iamgreatoni Dec 7, 2022
40767e0
Fix cors error
kayceeDev Dec 7, 2022
c000f5b
Merge branch 'staging' of github.com:technicaldee/dinnerwithfriends.a…
kayceeDev Dec 7, 2022
277d8d7
Merge pull request #19 from technicaldee/bug/modifications
kayceeDev Dec 7, 2022
b80b997
Remove console
kayceeDev Dec 7, 2022
7d22420
Fix undefined
kayceeDev Dec 7, 2022
6f6c4b1
Fix getEventParticipants endpoint
kayceeDev Dec 7, 2022
fd40c20
Fix sendmail import
kayceeDev Dec 7, 2022
8755f54
fixed forgot password
Preshy-Jones Dec 7, 2022
ddc2450
Merge pull request #77 from workshopapps/BEC-12-forgot-password
Preshy-Jones Dec 7, 2022
82e3ae8
adding profile get and update functionality feat(BEC-36) linear - (ht…
technicaldee Dec 8, 2022
12472be
Merge branch 'dev' into bec-36-create-endpoint-for-user-profile-update
technicaldee Dec 8, 2022
8f0ce2e
Merge pull request #78 from workshopapps/bec-36-create-endpoint-for-u…
technicaldee Dec 8, 2022
6cf1e9b
Merge pull request #20 from technicaldee/bec-36-create-endpoint-for-u…
technicaldee Dec 8, 2022
8b411bf
Merge branch 'dev' of github.com:workshopapps/dinnerwithfriends.api i…
kayceeDev Dec 8, 2022
01629d7
Merge pull request #79 from workshopapps/bug/modifications
kayceeDev Dec 8, 2022
1494a22
Fix undefined refreshtoken error
kayceeDev Dec 8, 2022
320bf80
fixed login issues
Preshy-Jones Dec 9, 2022
de6053c
invite email bug fix
Preshy-Jones Dec 9, 2022
a98424f
login fix
Preshy-Jones Dec 10, 2022
beb2a44
Add increment participant
kayceeDev Dec 10, 2022
bf141b4
httponly to false
Preshy-Jones Dec 10, 2022
a92c6ca
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
Preshy-Jones Dec 10, 2022
59994d0
Fix unique participants
kayceeDev Dec 10, 2022
cfa6a42
Fix Add participant
kayceeDev Dec 10, 2022
5c25596
Change event return format
kayceeDev Dec 10, 2022
285c6a0
Fix get event by token
kayceeDev Dec 10, 2022
c532c85
Fix get all events
kayceeDev Dec 10, 2022
9c200ae
to true
Preshy-Jones Dec 10, 2022
308000c
to false
Preshy-Jones Dec 11, 2022
42c9e2c
updated apm
iamgreatoni Dec 11, 2022
a6e45a4
updated apm
iamgreatoni Dec 11, 2022
8242ae5
Improve user model
kayceeDev Dec 11, 2022
2071e6c
Fix invite model
kayceeDev Dec 11, 2022
731448f
Add populate to get decoded event
kayceeDev Dec 11, 2022
1a37fa8
adjusting cookies
Preshy-Jones Dec 11, 2022
65ddb92
adjusting
Preshy-Jones Dec 11, 2022
66be13f
adjusting again
Preshy-Jones Dec 11, 2022
b7868fd
samesite to none
Preshy-Jones Dec 11, 2022
a657cd6
adj
Preshy-Jones Dec 12, 2022
92d87b5
adj back
Preshy-Jones Dec 12, 2022
1eed71e
adj
Preshy-Jones Dec 12, 2022
f960689
adj 1
Preshy-Jones Dec 12, 2022
5b35d62
adj 2
Preshy-Jones Dec 12, 2022
1bba2c5
Add email notification for decided events
kayceeDev Dec 12, 2022
6a53384
Improve add participant
kayceeDev Dec 12, 2022
dd29a06
Merge pull request #80 from workshopapps/bec-38-send-email-notificati…
kayceeDev Dec 12, 2022
3e4c419
test
Angelo-Ufelle Dec 13, 2022
a5b4051
all done
Angelo-Ufelle Dec 13, 2022
ef4be74
changed
Angelo-Ufelle Dec 13, 2022
f40a78c
reverted changes made to the main index file
Angelo-Ufelle Dec 13, 2022
2416224
made get event by token and get single event routes public
Preshy-Jones Dec 13, 2022
accb779
Merge pull request #81 from workshopapps/bec-37-create-api-endpoint-f…
technicaldee Dec 14, 2022
d078856
added new frontend domain to cors
Preshy-Jones Jan 10, 2023
dec199e
minor
Preshy-Jones Jan 10, 2023
d43cb9a
updated cookie domain name
Preshy-Jones Jan 11, 2023
8e44ea0
moving code
technicaldee Jan 13, 2023
110242a
modify event schedule email
kayceeDev Jan 14, 2023
65d4244
Merge pull request #82 from workshopapps/event_schedule_modify
kayceeDev Jan 14, 2023
5a32ceb
testing
precious-punch Jan 15, 2023
b9cd46b
Merge branch 'dev' of https://github.com/workshopapps/dinnerwithfrien…
precious-punch Jan 15, 2023
5abafd5
updates
precious-punch Jan 16, 2023
388134d
change
precious-punch Jan 16, 2023
e0de18f
change2
precious-punch Jan 17, 2023
6b45ae5
change
precious-punch Jan 17, 2023
5e64eb9
update
precious-punch Jan 17, 2023
8997fa1
claendar complete
technicaldee Jan 22, 2023
f9f4f6a
attempt1
Preshy-Jones Jan 29, 2023
37b12f9
added the new gmail for contact us
Angelo-Ufelle Feb 9, 2023
190ec84
attempt2
Preshy-Jones Feb 12, 2023
c8741c9
Merge pull request #84 from workshopapps/newemail
kayceeDev Feb 14, 2023
ff33bcf
conflict resolution
technicaldee Feb 20, 2023
e70b01f
Merge pull request #83 from workshopapps/final_calendar_fixes
kayceeDev Feb 21, 2023
8185a09
Fix google authentication
kayceeDev Feb 24, 2023
8472cd2
Fix conflicts
kayceeDev Feb 24, 2023
560b2af
Remove unused import for google auth
kayceeDev Feb 24, 2023
c75f82c
Merge pull request #85 from workshopapps/fix-google-auth
kayceeDev Feb 24, 2023
3a3a6de
Remove unnecessary imports and consoles
kayceeDev Feb 24, 2023
bf5b11f
Merge branch 'fix-google-auth' of github.com:workshopapps/dinnerwithf…
kayceeDev Feb 24, 2023
93128f8
Merge pull request #86 from workshopapps/fix-google-auth
kayceeDev Feb 24, 2023
795ac59
Fix jwt authentication
kayceeDev Feb 24, 2023
f57a39e
Merge pull request #87 from workshopapps/Fix-Jwt-auth
kayceeDev Feb 24, 2023
5efb3df
Add domain to cookie
kayceeDev Feb 24, 2023
0011ae5
Make cookie domain universal
kayceeDev Feb 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Empty file added .circleci/config.yml
Empty file.
10 changes: 0 additions & 10 deletions .env.example

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# @format
#trigger a build
name: build

on:
push:
branches:
- dev

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REPOSITORY_NAME: ${{ secrets.REPOSITORY_NAME}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: '16.0'
- name: Install yarn
run: |
yarn install
env:
CI: true
# - name: Log in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Get Current Date
# id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%d--%M-%S')"
# - name: Build Docker Image
# run: docker build . --file Dockerfile --tag $DOCKERHUB_USERNAME/$REPOSITORY_NAME
# - name: Push Docker Image to Docker Hub
# run: docker push $DOCKERHUB_USERNAME/$REPOSITORY_NAME
- name: Deploy package to your instance
uses: appleboy/ssh-action@master
env:
GITHUB_USERNAME: secrets.USERNAME_NAME
GITHUB_TOKEN: ${{ secrets.TOKEN_TOKEN }}
with:
host: ${{ secrets.HOST_IP }}
username: ${{ secrets.HOST_USER }}
password: ${{ secrets.HOST_USER_PWD }}
port: ${{ secrets.HOST_PORT }}
envs: GITHUB_USERNAME, GITHUB_TOKEN
script: |
cd calendarApp/
docker stop $(docker ps -qf expose=8000)
rm -r dinnerwithfriends.api/
git clone https://github.com/workshopapps/dinnerwithfriends.api
cp .env /root/calendarApp/dinnerwithfriends.api
cd dinnerwithfriends.api/
sudo docker build -t thebackend:$(date +'%Y-%m-%d') .
sudo docker run -d -p 8000:8000 thebackend:$(date +'%Y-%m-%d')
echo "refresh the page and check"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
.yarn*

.env
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN yarn install
COPY . .

EXPOSE 8000
CMD [ "node", "src/index.js" ]
CMD [ "yarn", "run", "dev" ]
48 changes: 48 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline {

agent any

stages {

stage("Get repo"){

steps {
sh "rm -rf ${WORKSPACE}/dinnerwithfriends.api"
sh "git clone https://github.com/workshopapps/dinnerwithfriends.api.git"
}
}

stage("build backend"){

steps {
sh "sudo npm i --force"
sh "ls -la"
}
}

stage("deploy") {

steps {
sh "sudo cp -rf ${WORKSPACE}/dinnerwithfriends.api/ /home/johnoni/"
sh "sudo cp -r /home/johnoni/dinnerwithfriends_env/app.env /home/johnoni/dinnerwithfriends.api/.env"
sh "sudo systemctl restart nickstersz-backend.service"
}
}

stage("Performance test"){

steps{
echo 'Installing k6'
sh 'sudo chmod +x setup_k6.sh'
sh 'sudo ./setup_k6.sh'
echo 'Running K6 performance tests...'
sh 'ls -a'
sh "pwd"
sh 'k6 run Performance_Test_Catchupb.js'
}
}

}
}


14 changes: 14 additions & 0 deletions Performance_Test_Catchupb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @format */

import { sleep } from "k6";
import http from "k6/http";

export const options = {
duration: "1m",
vus: 100,
};

export default function () {
http.get("http://api.catchup.hng.tech");
sleep(3);
}
74 changes: 60 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,80 +20,126 @@ To install this application, the following steps are to be followed;
## Endpoint Documentation

1. ### SIGN-UP:
[`https://catchup.hng.tech/api/v1/auth/signup`](https://catchup.hng.tech/api/v1/auth/signup)

This endpoint is responsible for accepting data from users that are new to the application and creating an account for them

2. ### SIGN-IN:
[`https://catchup.hng.tech/api/v1/auth/signin`](https://catchup.hng.tech/api/v1/auth/signin)

This endpoint is responsible for accepting data from the users and sign into the application after they must have created an account on the application

3. ### REFRESH:
[`https://catchup.hng.tech/api/v1/auth/refresh`](https://catchup.hng.tech/api/v1/auth/refresh)

This endpoint is responsible for refreshing the JWT needed to access the protected resources on the application

4. ### GENERATE RECOVER TOKEN:
4. ### GENERATE RECOVER ACCOUNT TOKEN:
[`https://catchup.hng.tech/api/v1/auth/recover/generate`](https://catchup.hng.tech/api/v1/auth/recover/generate)

This endpoint is responsible for generating the newly generated JWT needed to access protected resources on the application
This endpoint is responsible for generating the token required for user to recover their account (Password Recovery)

5. ### GENERATE RECOVER ACCOUNT TOKEN:
5. ### GENERATE RECOVER TOKEN:
[`https://catchup.hng.tech/api/v1/auth/recover/confirm`](https://catchup.hng.tech/api/v1/auth/recover/confirm)

This endpoint is responsible for having the account recovery token generated sent to the user's email

This endpoint is responsible for generating JWT for an account after password recovery

6. ### GOOGLE AUTH URL:
[`https://catchup.hng.tech/api/v1/auth/google/url`](https://catchup.hng.tech/api/v1/auth/google/url)

This endpoint is responsible for login in to Google to interface with Google API for sign-up/Sign-in up with Google

7. ### GOOGLE AUTH X:
[`https://catchup.hng.tech/api/v1/auth/google`](https://catchup.hng.tech/api/v1/auth/google)

This link is responsible for getting user from Google

8. ### ADD EVENT:
[`https://api.catchup.hng.tech/api/v1/event`](https://catchup.hng.tech/api/v1/event)

This endpoint is responsible for creating an event by an event

9. ### GET ALL EVENT:
[`https://catchup.hng.tech/api/v1/event`](https://catchup.hng.tech/api/v1/event)

This endpoint is responsible for querying the event database and getting list of all events

10. ### GET AN EVENT:
[`https://catchup.hng.tech/api/v1/event/:id`](https://catchup.hng.tech/api/v1/event/:id)

This endpoint is responsible for retrieving information for a particular event

11. ### DELETE EVENT:
[`https://catchup.hng.tech/api/v1/event/:id`](https://catchup.hng.tech/api/v1/event/:id)

This endpoint is responsible for removing an event from the database by the host

12. ### UPDATE EVENT:
[`https://catchup.hng.tech/api/v1/event/:id`](https://catchup.hng.tech/api/v1/event/:id)

This endpoint is responsible for keeping record of an event in the event database up-to-date

13. ### GET SINGLE EVENT BY TOKEN:
[`https://api.catchup.hng.tech/api/v1/event/token/:id`](https://catchup.hng.tech/api/v1/event/token/:id)


14. ### ADD PARTICIPANT
[`https://catchup.hng.tech/api/v1/participant/addpart`](https://catchup.hng.tech/api/v1/participant/addpart)

This endpoint is responsible for creating a participant on the database

15. ### DELETE PARTICIPANT
[`https://catchup.hng.tech/api/v1/participant/delete/:id`](https://catchup.hng.tech/api/v1/participant/delete/:id)

This endpoint is responsible for removing a participants from an event

16. ### UPDATE PARTICIPANT
[`https://catchup.hng.tech/api/v1/participant/update/:id`](https://catchup.hng.tech/api/v1/participant/update/:id)

This endpoint is responsible for keeping a partcipant data up-to-date

17. ### Event RSVP:
[`https://catchup.hng.tech/api/v1/event/user/event`](https://catchup.hng.tech/api/v1/event/user/event)

This endpoint is responsible for getting all Decided events

18. ### Calendar:
[`https://catchup.hng.tech/api/v1/calendar/`](https://catchup.hng.tech/api/v1/calendar/)

This endpoint is responsible for syncing with google calendar



This endpoint is responsible for getting an event by using the token

### SWAGGER API DOCUMENTATION

Follow the guidelines below to make use of the swagger documentation on https://prybar.onrender.com/api-docs
The following steps should be taken for effective use of the Catchup API Swagger documentation

Follow the guidelines below to make use of the swagger documentation on `https://catchup.hng.tech/api-docs`

1. First, you have to go to `https://catchup.hng.tech/api-docs` to gain access to the Catchup swagger API documentation

1. First, you have to go to https://prybar.onrender.com/api-docs to gain access to the Catchup swagger API documentation

2. Once on the above route, there are 3 collections: auth, events and paricipants - housing the related endpoints

3. Select the production server

4. To test an endpoint, select a collection e.g auth
4. To test an endpoint, select a collection e.g auth. To access protected enpoint you will need to signup and then sign in and copy the access token from the response

5. After a successful sign in, click on the authorize button at the top right corner and input the access token in the provided field

5. Click on any of the displayed endpoints to learn more about it's use case
6. Click on any of the displayed endpoints to learn more about it's use case

6. To run/test the endpoint click on the 'Try it out' button. This displays a preview page where you can modify/input parameters or the request body
7. To run/test the endpoint click on the 'Try it out' button. This displays a preview page where you can modify/input parameters or the request body

7. For clarity, an example of the expected response is displayed iin the endpoint page
8. For clarity, an example of the expected response is displayed iin the endpoint page

8. In the case of routes requiring parameters such as 'api/v1/:id' you can input the id in the provided id field
9. In the case of routes requiring parameters such as 'api/v1/:id' you can input the id in the provided id field

9. Once this is all set, click on the execute button to send a request to the enpoint
10. Once this is all set, click on the execute button to send a request to the enpoint

10. The server then sends response which is displayed in the response section right below the execute button.
11. The server then sends response which is displayed in the response section right below the execute button.



Expand Down
37 changes: 37 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script src="https://apis.google.com/js/api.js"></script>
<script>
/**
* Sample JavaScript code for calendar.calendarList.list
* See instructions for running APIs Explorer code samples locally:
* https://developers.google.com/explorer-help/code-samples#javascript
*/

function authenticate() {
return gapi.auth2.getAuthInstance()
.signIn({scope: "https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.readonly", plugin_name: 'dinnerwithfriends'})
.then(function() { console.log("Sign-in successful"); },
function(err) { console.error("Error signing in", err); });
}
function loadClient() {
gapi.client.setApiKey("AIzaSyA7G2ANAJI6rm_DpTW84lsKUJT-c8bmirI");
return gapi.client.load("https://content.googleapis.com/discovery/v1/apis/calendar/v3/rest")
.then(function() { console.log("GAPI client loaded for API");
execute()
},
function(err) { console.error("Error loading GAPI client for API", err); });
}
// Make sure the client is loaded and sign-in is complete before calling this method.
function execute() {
return gapi.client.calendar.calendarList.list({})
.then(function(response) {
// Handle the results here (response.result has the parsed body).
console.log("Response", response);
},
function(err) { console.error("Execute error", err); });
}
gapi.load("client:auth2", function() {
gapi.auth2.init({client_id: "102076896830-4il8ncmrd6qfoippk2ut4uujb8cci54v.apps.googleusercontent.com"});
});
</script>
<button onclick="authenticate().then(loadClient)">authorize and load</button>
<button onclick="execute()">execute</button>
14 changes: 14 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PORT=8000
MONGODB_URI=mongodb+srv://PreshyJones:confidence@myfirstcluster-2ekpt.mongodb.net/dinner?retryWrites=true&w=majority
JWT_EXPIRES_IN="90d"
JWT_SECRET= "ejgesgfyjehfvsyukaffrg"
REFRESH_TOKEN_SECRET="ejgesgfyjehfvsyukaffrg"
NODE_ENV=development
SENDGRID_API_KEY=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
GOOGLE_CLIENT_ID="942349562307-ldd3b7317ih6nskr99gn81r73jitm927.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="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"
SERVER_ROOT_URI='http://localhost:8000/api/v1/auth/google/token'
UI_ROOT_URI='http://localhost:3000'
COOKIE_NAME='auth_token'
INVITATION_TOKEN_SECRET="boomshakalaka"
CREDENTIALS='{"type": "service_account","project_id": "confident-facet-364012","private_key_id": "1f817510d3efade14b09de482b156c00bccf6e21","private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCr2/kpAYU2YUuR\nexWuEI+z83T+DbNfeRJxo4MS/7ko17Xav16REGYd3SoHqnWy6lUQ02Enml4wp4eC\nmnaHicsLoqwYE6NCVbBMwFvXsv6JK3vwiuL94N1FGGalRG47WW4kp7XqM4KxjhN6\ntfGnMs+bA5j2LOJDBCcErmA7iiPNerqQVeaPPRR6JLqlBPxzhh0r4qr6sdmuk86E\nDY9UrrOGQ+Ux3qtr/zhrtUdGpkZS5l4TmjWPjD4vsJQz+uHgMMl31bsGukZxDnfG\nQEYuT9QYb49/1pWtB5DWHWn3jh1mXMLCBqkNHccEeqQzVRWQKroygxbXlztuNtvn\nbxw2y+yFAgMBAAECggEADMSiBUbko76kw6E2YiE+2+q5hWp1KiGvmhvA0DeJhRxJ\nmX/gQbzLKWrWBY3HgsxgF4jszeltGAZKTgy1w6ocGLg0OvGyjmoZWApuiF73BC/j\n3GIlLSF4rvp6HcswuV4Sjcyb+lNrYU+h6Nr9oiNnQygIRDnfcYUsdO+TnLjNoiVd\n7Q2iNoJ2Dut7qVoA0WTmbJ8rbMDaR5lcnrFykm/moMlm9B7Y54xEeNizGCenWjhP\nqRomnJmCr7ViZTAusLs0kOb+3Y9irdmuive9GxoyhbUgBSB52YwilC70yJqrBeHY\n27kJa+HT+mf4HhbRo736DrbnhF+gcQiQSbX7c+0IwQKBgQDVXBTxr7M2+poOTNi1\nCY/JqYHUzij3jXIZiK7j5W0RP2LKTMBoWYeK+EfSVmkNZWBQyyRPFjNaRwI9ELOC\nVQUitq3F0ghtHu3tzEGtdMlar3T9JTJm4WoEXFWktk0Q038sKRRiKonLAlg3k67X\nlvbVDUUY8ji9XcVibPbB79qtFQKBgQDONKUaTQWny+iLzsC/vjTMQKAISM6L+9IK\nXWxg4r6N/5Uk6OoNG1gT0DfHOtwjOE571PUnKFGemac8qUTAL4iKTe3fMv/BmI/g\npIqN2Xn7BMjZAUk5kpHROvmCtwEHf1BGBMnWUiJsnfofVOMxlpZiI3Te3FF2gsyT\nEbiy7Xt9sQKBgEjzWxXoBVbfCJ2rGM2Nn2RMWN/yPX+nFUQ1v9acM1aaXaTd6UvE\nkNurWKNKeFDkQLJfQuLnrFdJwDIw66+8ci0UWQYycj8dPCz6kdpE/DPNmiqT9U/H\n8v/ask3HJ0KBjhIDWbzW3pZTDuax0C5Wp77g8qc86rmUvlCRAS3+XL6hAoGAM8yX\nuO6mQAuCBDTQyJnwS2rkiJA5ioKctcvYINJ0ydjtT1NPEDHRQ1Dn4h1QFWzcklDh\nsI95SV0R3LQsuBZ4tz1yRsJZ6vj3E5hh0dZSxRLjnVesXFEMXkHxUbvE/2wk7yHe\nzf7d9OkOXvaFB/zrFAYSIrW3pQygdUVbX182yVECgYAlhtBwb2T/cXezCQqONB/a\nyX6a5X3PwG1JEoBXXlrXb2FsX64vDdcQIuHQGhCSQ8wYr4HloIxwbqtdOt2nn3x7\nVBADOS+33hjwq5hIH7238UqGTl12nSYHxS2Q2m3GLlEX9ys5Zf8dvOLS4t933OJz\nC0rjmj/8zR8368XA2X8QpQ==\n-----END PRIVATE KEY-----\n","client_email": "i123456@confident-facet-364012.iam.gserviceaccount.com","client_id": "102254133935705883736","auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://oauth2.googleapis.com/token","auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/i123456%40confident-facet-364012.iam.gserviceaccount.com"}'
Loading