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

Feedback #1

Open
wants to merge 264 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
00021b4
Update README.md
ChiehAnChang May 28, 2024
f7aea10
Update README.md
ChiehAnChang May 28, 2024
c1a2397
Update README.md
ChiehAnChang May 28, 2024
9cd8d68
Update README.md
ChiehAnChang May 28, 2024
864c573
Updated and corrected README.md
ethan-rosenbloom May 31, 2024
202b6cd
Created product_backlog.md
ethan-rosenbloom May 31, 2024
c0c2050
Updateed product_backlog.md
ethan-rosenbloom May 31, 2024
58215e2
Created product.md with some changes
ethan-rosenbloom May 31, 2024
e6b6fd5
Add files via upload
ethan-rosenbloom May 31, 2024
3352c8b
Create Setup.md
ethan-rosenbloom May 31, 2024
a593502
first draft of prototype
RichieHsieh May 31, 2024
62beb82
Update product.md
ethan-rosenbloom May 31, 2024
4a36b52
Update product.md
Debaoss May 31, 2024
83a38ed
Update product.md
ethan-rosenbloom May 31, 2024
c579a59
Update product.md
ethan-rosenbloom May 31, 2024
37f4648
Update product.md
ethan-rosenbloom May 31, 2024
df4c3a0
Update team.md
ChiehAnChang May 31, 2024
a8b2fca
Add files via upload
ethan-rosenbloom May 31, 2024
d842754
Update team.md
ChiehAnChang May 31, 2024
7a6218a
Delete doc/sprint0/team_contract.pdf
ethan-rosenbloom May 31, 2024
991f55b
Add files via upload
ethan-rosenbloom May 31, 2024
8ceb8fb
first version of prototype
RichieHsieh May 31, 2024
147e414
Update product_backlog.md
Ali4509247 Jun 1, 2024
50fbdbf
Update product_backlog.md
Ali4509247 Jun 1, 2024
0d565df
Update product_backlog.md
Ali4509247 Jun 1, 2024
926f81e
background environment setting
RichieHsieh Jun 7, 2024
cc65861
set up backend server environment
RichieHsieh Jun 7, 2024
13ce64c
frontend environment setting
RichieHsieh Jun 7, 2024
b2d69fc
app environtment setting
RichieHsieh Jun 7, 2024
03baa8d
fix wrong setting with mistake import of App.js
RichieHsieh Jun 7, 2024
0587891
move index.css to /Asset/Css
RichieHsieh Jun 7, 2024
c9af51b
move index.css to Css directory
RichieHsieh Jun 7, 2024
306e54d
create neo4j file, restructured backend base code, where I create hel…
RichieHsieh Jun 9, 2024
8322a94
added basic functionalites to frontend, such as login, and the simple…
RichieHsieh Jun 9, 2024
4931aad
fix the import of top_bar components in Main.js
RichieHsieh Jun 9, 2024
d5576a2
add login.css
RichieHsieh Jun 10, 2024
b2ce4a9
fix frontend basic code keep receiving html while the backend correct…
RichieHsieh Jun 10, 2024
abbba0a
Update README.md
Debaoss Jun 12, 2024
9798f4e
added a bit of framework regarding connecting search bar to neo4j (WIP)
Debaoss Jun 12, 2024
d68c856
Merge branch 'main' of https://github.com/UofT-UTSC-CS-sandbox/final-…
Debaoss Jun 12, 2024
759433a
added filters for Majors and Newest/Trending
ethan-rosenbloom Jun 12, 2024
f033f48
neo4j search now takes into account search bar
Debaoss Jun 12, 2024
49b5a1e
Finish Form part but not css
ChiehAnChang Jun 13, 2024
b71b641
Fix the structure of profile
ChiehAnChang Jun 13, 2024
8c80011
Revise the code to let search feature can query results from the data…
RichieHsieh Jun 13, 2024
98927fc
Added neo4j filter functionality for majors (subject to change once c…
Debaoss Jun 14, 2024
8be500c
search_api.js now filters per major (needs test once frontend is ready)
Debaoss Jun 14, 2024
e92848d
Backend profile implementation
Ali4509247 Jun 14, 2024
53a35bf
test retrieve data from backEnd
ChiehAnChang Jun 14, 2024
3187f2d
Add selection options for major of User and categories of Post and Pr…
RichieHsieh Jun 14, 2024
16791fa
Adding some comment for some hard coding, these hard coding is going …
RichieHsieh Jun 14, 2024
d6ddbe7
add the css and change the structure
ChiehAnChang Jun 14, 2024
7f86654
update Personal Information structure
ChiehAnChang Jun 15, 2024
65d0017
enable main page to switch to profile page, and profile page can load…
RichieHsieh Jun 15, 2024
85387b1
Merge remote-tracking branch 'origin/Release' into DEV-1-FilterSearch
ethan-rosenbloom Jun 15, 2024
d07c830
Merge remote-tracking branch 'origin/DEV-1-ProfileSetup' into Release
ethan-rosenbloom Jun 15, 2024
9be77a2
added way back home from profile page
ethan-rosenbloom Jun 15, 2024
f3d05ae
docs: create feedback.md
sfmqrb Jun 15, 2024
46377a0
Created sprint-01.review.md
ethan-rosenbloom Jun 16, 2024
866a326
Create iteration-01.plan.md
ethan-rosenbloom Jun 16, 2024
1fae272
Update iteration-01.plan.md
ethan-rosenbloom Jun 16, 2024
79a2380
Create RPM.md
ethan-rosenbloom Jun 16, 2024
88ee6a8
Add files via upload
Debaoss Jun 16, 2024
62cc62f
Fix the bug: 1. The display of major selections is wrong, 2. The styl…
RichieHsieh Jun 18, 2024
6210ae5
modify the query used to update major and minor, so that can avoid ca…
RichieHsieh Jun 18, 2024
dc6f6d3
Merge branch 'Release'
Ali4509247 Jun 26, 2024
d5e8af9
Basic Calendar
ChiehAnChang Jun 27, 2024
68a7f0b
calendar is able to connect to backend to retrieve and add event
ChiehAnChang Jun 27, 2024
f59784d
CRUD implementation without D
ChiehAnChang Jun 27, 2024
d2d1399
dependence
ChiehAnChang Jun 27, 2024
14378f5
CRUD finish
ChiehAnChang Jun 28, 2024
e8cc824
Close form button
ChiehAnChang Jun 28, 2024
f22f15c
Colour of close button
ChiehAnChang Jun 28, 2024
d08e049
submit text update
ChiehAnChang Jun 28, 2024
11f424f
Added the posts page. Need backend demo posts to test displaying them…
ethan-rosenbloom Jun 28, 2024
ddc4ff6
Added the home page and testing with cards on homepage
ethan-rosenbloom Jun 28, 2024
7fc64ef
make some comment
ChiehAnChang Jun 28, 2024
6597d47
make the hook meaniful
ChiehAnChang Jun 28, 2024
035b926
update the comment of CalendarForm
ChiehAnChang Jun 28, 2024
94b18b3
make a better format
ChiehAnChang Jun 28, 2024
de646eb
add some comment
ChiehAnChang Jun 28, 2024
f003d16
allow user to switch to the calendar page by clicking the calendar bu…
RichieHsieh Jun 28, 2024
b9bf7f7
daily calendar
ChiehAnChang Jun 28, 2024
29c1107
fix conflict
ChiehAnChang Jun 28, 2024
74389e6
add notification icon
ChiehAnChang Jun 29, 2024
8e51494
backend update
ChiehAnChang Jun 29, 2024
4001650
automatically update notification
ChiehAnChang Jun 29, 2024
5892cc9
Fix the automaticaaly update bug and seperate the CalendarFrom into t…
ChiehAnChang Jun 29, 2024
69cd972
delete calendar form
ChiehAnChang Jun 29, 2024
590414a
update notification bug on the backend
ChiehAnChang Jun 29, 2024
4d209df
update event notification
ChiehAnChang Jun 29, 2024
2c1bbfc
Event notification text update
ChiehAnChang Jun 29, 2024
7e45a0e
Resolving merge conflits
ethan-rosenbloom Jun 29, 2024
b8b8699
Moved things into Sprint2 folder and corrected
ethan-rosenbloom Jun 29, 2024
03e6e8e
fixed homepage missing lol
ethan-rosenbloom Jun 29, 2024
21e73a6
make the notification as todo list
ChiehAnChang Jun 29, 2024
6612de6
todo bug -- no update on event notification button
ChiehAnChang Jun 29, 2024
3c38a76
Updating home
ethan-rosenbloom Jun 29, 2024
e5b4b79
make the notification area looks better
ChiehAnChang Jun 29, 2024
b4fe792
Merge branch 'DEV-2-Calendar' into DEV-2-HomePage
ethan-rosenbloom Jun 29, 2024
6700308
properly added everything
ethan-rosenbloom Jun 29, 2024
95916d4
Added Calendar and now can add new posts and display all posts in fix…
ethan-rosenbloom Jun 30, 2024
c44ccd3
first version of frontend of Friend List
RichieHsieh Jun 30, 2024
3114aaa
Can now see the NEWEST post on the front page
ethan-rosenbloom Jun 30, 2024
88daed8
add frontend of User Information page
RichieHsieh Jun 30, 2024
9722494
Added backend for creating posts
Debaoss Jun 30, 2024
17b1340
Edited the home page
ethan-rosenbloom Jun 30, 2024
3ed047d
post create backend
Debaoss Jun 30, 2024
627a2e9
Merge branch 'DEV-2-HomePage' of https://github.com/UofT-UTSC-CS-sand…
Debaoss Jun 30, 2024
0f10b94
Second version of frontend of Friendlist, add a request page. Now all…
RichieHsieh Jul 1, 2024
668cf87
updated some of the UI
ethan-rosenbloom Jul 1, 2024
474a4eb
Completed back-end of calendar
Ali4509247 Jul 2, 2024
58d4772
Sign up form and navigation hook
ChiehAnChang Jul 2, 2024
0e043a0
typo on Login page
ChiehAnChang Jul 2, 2024
2a1efe5
Setup Logout button
ChiehAnChang Jul 2, 2024
7212883
prevent xss attack
ChiehAnChang Jul 2, 2024
b46f012
add an example for using user id
ChiehAnChang Jul 2, 2024
ab3167e
fix the expiring bug
ChiehAnChang Jul 2, 2024
66a6886
Add some comment on automaticallyLoginCheck and sign_in api
ChiehAnChang Jul 2, 2024
3a1d1e7
Add a guildline to both frontend and backend developer
ChiehAnChang Jul 2, 2024
c37ce09
modify the structure of guidline
ChiehAnChang Jul 2, 2024
44b284d
Remove unneccessary input
ChiehAnChang Jul 2, 2024
fe08e27
Name the cookie property more meaningful
ChiehAnChang Jul 2, 2024
07c668e
Create feedback.md
sfmqrb Jul 2, 2024
cea1b26
Now can add comments to posts
ethan-rosenbloom Jul 2, 2024
93e7aab
Fixed some bugs
ethan-rosenbloom Jul 2, 2024
2b29781
small bug
ChiehAnChang Jul 2, 2024
e0db93e
removed z
ethan-rosenbloom Jul 2, 2024
ebb8ad4
updated the UI for the comments
ethan-rosenbloom Jul 4, 2024
e94d79d
Added posts to the search bar
ethan-rosenbloom Jul 4, 2024
1c3ef5d
Fixed like button bug
ethan-rosenbloom Jul 4, 2024
24be27c
Attempted try at bug fix for expand
ethan-rosenbloom Jul 4, 2024
b6f4f33
add some citation
ChiehAnChang Jul 5, 2024
21196f9
add citation
ChiehAnChang Jul 5, 2024
319e4b6
Merge branch 'DEV-2-Calendar' of https://github.com/UofT-UTSC-CS-sand…
ChiehAnChang Jul 5, 2024
231a39d
Create sprint2
Ali4509247 Jul 6, 2024
b69718d
Delete doc/sprint2
Ali4509247 Jul 6, 2024
91d80d6
Create burndown.pdf
Ali4509247 Jul 6, 2024
590f2ae
Update and rename burndown.pdf to burndown.txt
Ali4509247 Jul 6, 2024
6b21174
Update and rename burndown.txt to burndown.pdf
Ali4509247 Jul 6, 2024
b3fbda3
Create iteration-02.md
ethan-rosenbloom Jul 6, 2024
3758013
Create sprint-02.review.md
ethan-rosenbloom Jul 6, 2024
23e4ec3
Corrected spelling and some wording iteration-02.md
ethan-rosenbloom Jul 6, 2024
9a11ef6
Update system design document
RichieHsieh Jul 6, 2024
d078d63
Added database functionality for posts (create, fetch, like, comment)
Debaoss Jul 7, 2024
37e83a7
enable the search and requests, fix all the bugs
RichieHsieh Jul 7, 2024
7ddf14f
add sprint2
RichieHsieh Jul 7, 2024
f76a2ba
Everything in posts_api works for real this time
Debaoss Jul 7, 2024
0f7ea30
merge conflict
ChiehAnChang Jul 7, 2024
682e9c4
backend conflict
ChiehAnChang Jul 7, 2024
ad55740
backend conflict
ChiehAnChang Jul 7, 2024
881c9c3
conflict fixed
ChiehAnChang Jul 7, 2024
7f06da3
Revert to "Everything in posts_api works for real this time"
ChiehAnChang Jul 7, 2024
8a61eff
merge Calendar and Friendship
ChiehAnChang Jul 7, 2024
468e43e
merge friend list and calendar
ChiehAnChang Jul 7, 2024
6b077f5
merge repost
ChiehAnChang Jul 7, 2024
5110f49
merge change
ChiehAnChang Jul 7, 2024
94fa4c4
merge change
ChiehAnChang Jul 7, 2024
b8d9eba
merge homepage
ChiehAnChang Jul 7, 2024
6a1b125
Fixing comments stuff
ethan-rosenbloom Jul 7, 2024
57353b8
Fixed comments
ethan-rosenbloom Jul 7, 2024
0e1cda5
Fixed the notification Icon
ethan-rosenbloom Jul 7, 2024
8198bd1
Calendar bug
ChiehAnChang Jul 7, 2024
35ccd6d
package
ChiehAnChang Jul 7, 2024
34bb306
fixing bugs
ethan-rosenbloom Jul 7, 2024
f1a3e37
fixed friendslist bug
ethan-rosenbloom Jul 7, 2024
bc1f8c8
push to sprint 2
ChiehAnChang Jul 11, 2024
e03d26a
merge authentication
ChiehAnChang Jul 12, 2024
e33a979
sprint 3
ChiehAnChang Jul 13, 2024
f5bddd1
Mistake on creating new branch
ChiehAnChang Jul 13, 2024
3cd3667
sprint 3 developerment branch
ChiehAnChang Jul 13, 2024
576b407
Fix to use navigate
ChiehAnChang Jul 13, 2024
db4b066
also fix the bug for calendar
ChiehAnChang Jul 13, 2024
14c3242
change name
ChiehAnChang Jul 13, 2024
3d7b7ef
merge dev-3
ChiehAnChang Jul 13, 2024
dfdb149
add logout button inside userTool
ChiehAnChang Jul 13, 2024
915e801
modify trigger
ChiehAnChang Jul 13, 2024
897ffee
add margin to the left of user tool
ChiehAnChang Jul 13, 2024
8f01661
create FriendlistAPI.jsx and move all friendlist api to this file, ap…
RichieHsieh Jul 15, 2024
507e451
fix userpage
RichieHsieh Jul 16, 2024
539d36d
create socket connection, create first version of chat system, but th…
RichieHsieh Jul 17, 2024
4f87854
Merge branch 'DEV-3-KAN63-ImprovePostsPage' of https://github.com/Uof…
ethan-rosenbloom Jul 17, 2024
d2d8e8a
KAN63: Notes <Added in the uid to the fetch posts api's. KEY CHANGES:…
ethan-rosenbloom Jul 17, 2024
803ec38
KAN63 <Added the uid to the backend route>
ethan-rosenbloom Jul 17, 2024
bd03d10
KAN63 <NOTES: Moved PostCard.js and PostPage.js to Posts to clean up …
ethan-rosenbloom Jul 18, 2024
21c46a0
KAN63 <NOTES: Added Updated the imports. Added the projects API file …
ethan-rosenbloom Jul 18, 2024
3b4e015
Added backend for making likes show up when fetching posts
Debaoss Jul 19, 2024
b311d62
Merge branch 'DEV-3-KAN63-ImprovePostsPage' of https://github.com/Uof…
Debaoss Jul 19, 2024
c7c7963
KAN63 AND KAN64 <IMPORTANT: Added the project page with better UI, Ad…
ethan-rosenbloom Jul 19, 2024
c3dc922
Merge branch 'DEV-3-KAN63-ImprovePostsPage' of https://github.com/Uof…
ethan-rosenbloom Jul 19, 2024
ca90db1
KAN63 and KAN64 <NOTES: Fixed bug for joining projects>
ethan-rosenbloom Jul 19, 2024
d6f5998
<KAN65 NOTES: Fixed the join feature. Error was when fetch call took …
ethan-rosenbloom Jul 19, 2024
ad688e1
Create iteration_03.md
ethan-rosenbloom Jul 19, 2024
d62eb18
Create sprint-03.review.md
ethan-rosenbloom Jul 20, 2024
8f2557f
Add files via upload
Ali4509247 Jul 20, 2024
5d4eb2e
Delete iteration_03.md
Ali4509247 Jul 20, 2024
ddd6bdc
Delete sprint-03.review.md
Ali4509247 Jul 20, 2024
70c43a0
Add files via upload
Ali4509247 Jul 20, 2024
195f107
Add files via upload
Debaoss Jul 20, 2024
9d99356
Modified /api/posts/create return value to corrospond with new post f…
Debaoss Jul 21, 2024
9862390
Updated projects_api.js backend to work with database
Debaoss Jul 22, 2024
72d56e3
KAN64 <NOTES: Sending uid to the backend to allow for updating join f…
ethan-rosenbloom Jul 22, 2024
76f024b
fixed bugs on projects_api, everything works now
Debaoss Jul 22, 2024
e58cfdb
KAN63 <Bug for frontend like button updating based on isLikedByMe>
ethan-rosenbloom Jul 22, 2024
1a91573
KAN63 <Fixed backend sending isLikedByMe value>
ethan-rosenbloom Jul 22, 2024
5320900
KAN63 <Fixed the homepage fetch newest like feature>
ethan-rosenbloom Jul 22, 2024
1f06d3e
Merge pull request #3 from UofT-UTSC-CS-sandbox/DEV-3-KAN63-ImprovePo…
ethan-rosenbloom Jul 22, 2024
267a8af
Merge quick fix <changed filepath name in ProjectCard.js and projectP…
ethan-rosenbloom Jul 22, 2024
f874e83
KAN68 <Updated the profile color scheme and changed the following use…
ethan-rosenbloom Jul 22, 2024
0b88206
First version of frontend of group system
RichieHsieh Jul 22, 2024
69395cd
KAN-62 <Added ability to create group, properly sent group data to ba…
ethan-rosenbloom Jul 22, 2024
3c5aaa6
Added Mentorship Page
Jul 22, 2024
c5716bb
implemented backend for fetching and creating new groups
RichieHsieh Jul 22, 2024
be751ee
fix the updation bug of sending new message, and the attribute lastMe…
RichieHsieh Jul 22, 2024
ca907b2
Create feedback.md
sfmqrb Jul 22, 2024
40d4e0d
video note
ChiehAnChang Jul 29, 2024
31b4726
create sprint 4
ChiehAnChang Jul 29, 2024
1e5b9f2
Video note
ChiehAnChang Jul 29, 2024
c3d71db
merge DEV-3 group system code
RichieHsieh Jul 29, 2024
2c1d03b
Update feedback.md
sfmqrb Jul 31, 2024
ef85c1a
KAN69-ImproveHomePage. Added new Post UI (New field for images in pos…
ethan-rosenbloom Aug 2, 2024
83e4a20
Create iteration_04.md
ethan-rosenbloom Aug 3, 2024
95fef2c
KAN69 Adding new UI for posts
ethan-rosenbloom Aug 3, 2024
ab723f5
Created Iteration_04.md and Sprint_04.review.md
ethan-rosenbloom Aug 3, 2024
dcc2ffa
Add files via upload
Ali4509247 Aug 3, 2024
9c9d89b
Rename burndown (1).pdf to burndown.pdf
Ali4509247 Aug 3, 2024
0935b62
Add files via upload
Ali4509247 Aug 3, 2024
2b7f2bf
Rename System Design (2).pdf to System Design.pdf
Ali4509247 Aug 3, 2024
38cb2f7
Added burndown chart
ethan-rosenbloom Aug 3, 2024
e7a418a
partial work
ChiehAnChang Aug 3, 2024
b20f786
KAN69: Notes <Added fetch_random router post, to be used for fetching…
Debaoss Aug 3, 2024
5d10999
video note
ChiehAnChang Aug 4, 2024
031f495
<KAN69: Added new UI for the posts page along with updated frontend t…
ethan-rosenbloom Aug 4, 2024
7aaf8e9
Add .gitlab-ci.yml for CI/CD pipeline
RichieHsieh Aug 5, 2024
6d5b645
Delete .gitlab-ci.yml
RichieHsieh Aug 5, 2024
a63c136
,erge
ChiehAnChang Aug 5, 2024
8ed8e68
Merge branch 'DEV-4' of https://github.com/UofT-UTSC-CS-sandbox/final…
ChiehAnChang Aug 5, 2024
805347e
merge
ChiehAnChang Aug 5, 2024
c7de8a3
main
ChiehAnChang Aug 5, 2024
d533b9c
delete not neccessary dependency
ChiehAnChang Aug 5, 2024
8887a49
Adding A2
ethan-rosenbloom Aug 7, 2024
7f3d801
Update README.md
ethan-rosenbloom Aug 7, 2024
2185884
forgot to add the updated readme from gitlabs
ethan-rosenbloom Aug 7, 2024
34e74cf
forgot to add the updated readme from gitlabs
ethan-rosenbloom Aug 7, 2024
b9d842d
Update README.md
ethan-rosenbloom Aug 7, 2024
81e6f93
Delete doc/Assignment 2/CI_CD/.dockerignore
ChiehAnChang Aug 8, 2024
2a3b306
Delete doc/Assignment 2/CI_CD/Dockerfile
ChiehAnChang Aug 8, 2024
877892a
Update feedback.md
sfmqrb Aug 13, 2024
1687cfa
Create feedback.md
sfmqrb Aug 16, 2024
99ca9df
Update feedback.md
sfmqrb Aug 16, 2024
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
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Briefly Description of this Project
What is the purpose of our project?

Our project is designed for a university student who is willing to :
1. find a mentor for academic purposes
2. find a mentor or see someone's experience in a career (i.e. include internship)
3. find a teammate or colleague to attend an event
4. find a teammate to build a project together.

Why does this project come out?

We intend to create a website to create a better social networking platform for students in any university worldwide. Due to COVID-19, we observe that people have less chance to connect with others.

How will this project work?

We will build a website that includes four main categories: academic, career, project, and event. Each category will provide specific information and resources tailored to the needs of university students.
Students can find some information based on their interest in these four categories.

# Motivation
Recently, the job market has not been good. Students may need a referral to get a job. However, due to COVID-19 and online courses, many students did not have the chance to make friends or connect with colleagues. Therefore, this project comes to mind as we would like to provide a platform for students to broaden their social network as well as offer guidance with career choices, academics, and allowing students to work on projects together.

# Installation
Currently, our product is held on the internet.

There is no download required.

Therefore, there is no installation required.

# Contribution:
## Workflow & Branch Naming
This project will use the "Git flow" workflow.
This means that we will have the following branches:

1. Main branch: A branch that deploys websites.

2. Hotfix branch: A branch to fix an emergency bug from the Main branch.

3. Release branch: A branch pre-processes and tests the deployment code before merging into the Main branch.

4. Development branch: A branch that stores collections of change or adds new features.

5. Feature branch: A branch that creates a new feature or modifies an existing branch.

Format of each branch:

Main branch:
- version[number]
- For example, version1.0

Release branch:
- release/[future version number]
- For example, release/1.0
- We will add the subsequence number if a bug is found during code integration or automated testing.
- For example, release/1.1

Development branch:
- DEV-[number of sprint]
- For example, if this is the first sprint, then the number will be DEV-1.0
- If there is a bug found in the release branch and merged back to the Development branch, then we will add the number to the Development version.
- For example, DEV-1.1

Feature branch:
- DEV-1-[feature name].
- For example, if we implement the login feature, the possible feature branch will be DEV-1-LoginPage.
## Issues
We will use the git issue to mention a potential question.

## Before Merge to Development Branch
We will use the git pull request before merging to the Development branch. So that, everyone can use the pull request from development branch to their local branch after new change.


Binary file added doc/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions doc/Assignment 2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore the some stuff that does not need to write into the docker image.
../README.md
../frontend/node_modules
../frontend/README.md
../backend/node_modules
../backend/README.md
185 changes: 185 additions & 0 deletions doc/Assignment 2/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
#################################################################################################################
# Citation: #
# We learn some knowledge and partial code from the following link: #
# 1. https://docs.gitlab.com/ee/ci/ #
# 2. https://www.youtube.com/watch?v=-4XT8-znkuc&list=PLBd8JGCAcUAEwyH2kT1wW2BUmcSPQzGcu #
# 3. https://www.youtube.com/watch?v=qP8kir2GUgo #
# 4. Material fron CSCC01 tutorial and lecture slides. #
# 5. https://docs.gitlab.com/ee/ci/examples/end_to_end_testing_webdriverio/ #
# 6. https://stackoverflow.com/questions/72263278/running-ui-tests-with-chrome-driver-in-gitlab-ci-cd-pipeline #
#################################################################################################################



# In the following code, we make our CI/CD pipeline into 4 stages: PreTest, Build, Deploy, and DeploymentTest.
# Pretest stage will run the basic tests for the frontend and backend before building a new image. So, we will not need to spend time on building buggy images.
# Build stage will build the new images and push to the docker hub
# Deploy stage will pull the latest images, where are frontend and backend, from docker hub in AWS EC2 and run them using docker-compose.
# DeploymentTest stage will make sure that the deoployment is successful by running selenium tests.
stages:
- PreTest
- Build
- Deploy
- DeploymentTest

variables:
# Image names for each stage
PRESTESTIMAGE: node:20.16.0-alpine3.20 # An image for pretest stage to both frontend and backend.
BUILDIMAGE: docker:24.0.5 # An image for build stage to build the new images.
DEPLOYIMAGE: docker:24.0.5 # An image for deploy stage to deploy the images to AWS EC2.
DEPOYTESTIMAGE: python:3.9 # An image for deployment test stage to run selenium tests.

# A variable inside build stage:

# Docker name for frontend
DOCKERFRONTEND: cscc01_assignment_2-frontend
# Docker name for backend
DOCKERBACKEND: cscc01_assignment_2-backend



frontend_test:
image: $PRESTESTIMAGE
stage: PreTest
before_script:
- echo "Running frontend pre test"
- cd frontend
- npm install
script:
- echo "Running frontend tests"
- npm test > frontend_test_results.txt

after_script:
- echo "Frontend pre tests completed"
- rm -rf node_modules

artifacts:
when: always
paths:
- frontend/frontend_test_results.txt
expire_in: 1 week


backend_test:
image: $PRESTESTIMAGE
stage: PreTest
before_script:
- echo "Running backend pre test"
- cd backend
- npm install

script:
- npm test > backend_test_results.txt
after_script:
- echo "Backend pre test completed"
- rm -rf node_modules
artifacts:
when: always
paths:
- backend/backend_test_results.txt
expire_in: 1 week

build_image:
# We should only run to build the new image if the coming commit is from the master branch (i.e release new version of the website through master branch)
only:
- master
- main
needs: [frontend_test, backend_test]
image: $BUILDIMAGE
# We need to use docker:24.0.5-dind to run docker inside the image(i.e. docker)
services:
- docker:24.0.5-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"

stage: Build
before_script:
# Use the update date as the version of the image
- export VERSION=$(date +%Y%m%d%H%M%S)
# login to the docker hub
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD

script:
- docker-compose build
- docker tag $DOCKERFRONTEND:latest $CI_REGISTRY_USER/$DOCKERFRONTEND:$VERSION # tag the frontend image with the version date (i.e to let user know the version number on docker hub)
- docker tag $DOCKERFRONTEND:latest $CI_REGISTRY_USER/$DOCKERFRONTEND:latest # tag the frontend image with the latest (i.e to let user know the latest version on docker hub)
- docker tag $DOCKERBACKEND:latest $CI_REGISTRY_USER/$DOCKERBACKEND:$VERSION # tag the backend image with the version date (i.e to let user know the version number on docker hub)
- docker tag $DOCKERBACKEND:latest $CI_REGISTRY_USER/$DOCKERBACKEND:latest # tag the backend image with the latest (i.e to let user know the latest version on docker hub)
- docker push $CI_REGISTRY_USER/$DOCKERFRONTEND:$VERSION # push the frontend image with the version date to the docker hub
- docker push $CI_REGISTRY_USER/$DOCKERFRONTEND:latest # push the frontend image with the latest to the docker hub
- docker push $CI_REGISTRY_USER/$DOCKERBACKEND:$VERSION # push the backend image with the version date to the docker hub
- docker push $CI_REGISTRY_USER/$DOCKERBACKEND:latest # push the backend image with the latest to the docker hub

after_script:
- echo "Build docker image completed"


# We are going to deploy the images to AWS EC2
deploy_image:
needs: [build_image]
image: $DEPLOYIMAGE
services:
- docker:24.0.5-dind
stage: Deploy
variables:
# The private key file for the AWS EC2
AWS_EC2_URL: [email protected]
AWS_HOME: /home/ec2-user

before_script:
- echo "Deploying the images to AWS EC2"
# Make the ssh private key files from gitlab variables
- cat $AWS_SSH_KEY > private_key.pem
# Change the permission of the private key file
- chmod 400 private_key.pem

script:
# copy the config file(i.e. confg_aws) to the AWS EC2
- scp -o StrictHostKeyChecking=no -i private_key.pem ./confg_aws $AWS_EC2_URL:$AWS_HOME
# let the docker ssh to the AWS EC2 and run the following commands
# 1. copy the content inside confg_aws to docker-compose.yml
# 2. login to the docker hub
# 3. stop all running docker containers
# 4. pull the latest frontend and backend images from the docker hub
# 5. run the frontend and backend images using docker-compose
- ssh -o StrictHostKeyChecking=no -i private_key.pem $AWS_EC2_URL "
cat /home/ec2-user/confg_aws > docker-compose.yml &&
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD &&
docker-compose down &&
docker pull $CI_REGISTRY_USER/$DOCKERFRONTEND:latest &&
docker pull $CI_REGISTRY_USER/$DOCKERBACKEND:latest &&
docker-compose up -d
"
after_script:
- echo "Deploy docker completed"

# We are going to use selenium to test the website has been deployed on AWS EC2
deploy_test:
needs: [deploy_image]
image: $DEPOYTESTIMAGE
stage: DeploymentTest
# We need to use selenium/standalone-chrome:latest to run the selenium tests because we neeed to use the chrome browser
services:
- name: selenium/standalone-chrome:latest
alias: selenium
before_script:

- echo "Running Deployment tests through selenium"

# install the selenium and unittest-xml-reporting to generate the xml report
- pip install selenium unittest-xml-reporting

script:
# start the selenium tests
- python -m xmlrunner DeploymentTest > automated-test-results

after_script:
- echo "Deployment Test completed"

# Generate the test results
artifacts:
when: always
paths:
- automated-test-results
expire_in: 1 week

36 changes: 36 additions & 0 deletions doc/Assignment 2/DeploymentTest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By

class DeploymentTest(unittest.TestCase):

@classmethod
def setUp(self):
self.driver = webdriver.Remote(command_executor='http://selenium:4444/wd/hub', options=webdriver.ChromeOptions())
self.driver.implicitly_wait(15)


def test_login(self):
driver = self.driver
driver.get("http://54.167.41.40")
email_field = driver.find_element(By.CSS_SELECTOR, "input[type='email']")
print(email_field.text)
password_field = driver.find_element(By.CSS_SELECTOR, "input[type='password']")
print(password_field.text)
login_button = driver.find_element(By.XPATH,"//button[text()='Login']")
email_field.send_keys("email")
password_field.send_keys("password")
email_field = driver.find_element(By.CSS_SELECTOR, "input[type='email']")
self.assertEqual(email_field.get_attribute("value"), "email")
password_field = driver.find_element(By.CSS_SELECTOR, "input[type='password']")
self.assertEqual(password_field.get_attribute("value"), "password")

login_button.click()
main_div = driver.find_element(By.CLASS_NAME, "Main")
self.assertIsNotNone(main_div, "The div with class name 'main' does not exist.")

@classmethod
def tearDown(self):
self.driver.quit()


Loading