Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
5935c7a
Delete unused files
YuvalAnteby Jun 3, 2025
bb42cbc
Created the React app
YuvalAnteby Jun 3, 2025
23a9216
Updated gitignore
YuvalAnteby Jun 3, 2025
7533702
Created dockerignores for each service of the project
YuvalAnteby Jun 3, 2025
767ec29
Updated the ports and dockerfiles to include the new react frontend
YuvalAnteby Jun 3, 2025
a38c80d
Updated new docker commands to run only related containers as needed
YuvalAnteby Jun 3, 2025
4756029
Merge pull request #68 from YuvalAnteby/GA-98-Create-the-React-projec…
dor-darmon Jun 3, 2025
8dd31ec
GA-103 made React support the inbox route
YuvalAnteby Jun 4, 2025
62b905c
GA-103 created a row component with some minimal styling
YuvalAnteby Jun 4, 2025
eb2c681
GA-103 created a minimal toolbar for refreshing inbox, deleting, mark…
YuvalAnteby Jun 4, 2025
59a7f74
GA-103 created a minimal inbox (main) page
YuvalAnteby Jun 4, 2025
d8e4e2d
GA-103 added onClick and onChange placeholders
YuvalAnteby Jun 4, 2025
13392b5
GA-103 style change for mail row
YuvalAnteby Jun 4, 2025
ca9cf2b
GA-103 made placeholders more visible
YuvalAnteby Jun 4, 2025
d5433be
GA-103 made placeholders more visible
YuvalAnteby Jun 4, 2025
0e04c71
GA-103 fixed placement of check box
YuvalAnteby Jun 4, 2025
af6359d
GA-103 Made the refresh, delete, mark read, mark spam as icon buttons…
YuvalAnteby Jun 4, 2025
4ba7d30
GA-103 improved hover animation on mail rows
YuvalAnteby Jun 4, 2025
3979f8a
GA-103 added TODO for the relevant jira ticket
YuvalAnteby Jun 4, 2025
25ccfad
GA-103 added animation for when selecting at least one mail in the to…
YuvalAnteby Jun 4, 2025
7da68ca
GA-103 prevent the checkbox clicks being registered as open mail clicks
YuvalAnteby Jun 4, 2025
b3c99b2
GA-103 added an in between state for the select all checkbox
YuvalAnteby Jun 4, 2025
33081b9
GA-103 seperated the toolbar hooks to a different file
YuvalAnteby Jun 4, 2025
29305a9
GA-103 seperated the toolbar hooks to a different file
YuvalAnteby Jun 4, 2025
1380cd4
GA-103 bugfix - missed export
YuvalAnteby Jun 4, 2025
2741504
GA-103 added a read/unread style for mail rows
YuvalAnteby Jun 4, 2025
8b06725
GA-103 Implemented dark theme a new light theme, moved colors palette…
YuvalAnteby Jun 5, 2025
268457c
GA-109 Merge pull request #69 from YuvalAnteby/GA-109-Dark-theme
YuvalAnteby Jun 5, 2025
0c44cfe
GA-106 seperated logic of picking what kind of mails fetch for a user…
YuvalAnteby Jun 6, 2025
a891522
GA-106 seperated logic of picking what kind of mails fetch for a user…
YuvalAnteby Jun 6, 2025
d438861
GA-106 enabled the Node.js server and react frontend containers to in…
YuvalAnteby Jun 6, 2025
4a6726d
GA-106 added API calling to populate the mail rows with all mails of …
YuvalAnteby Jun 6, 2025
147e034
GA-106 comments
YuvalAnteby Jun 6, 2025
3dda7fa
GA-106 implemented the refresh and mail loading using different types…
YuvalAnteby Jun 6, 2025
9c8c682
GA-106 implemented the deletion and trash functionality
YuvalAnteby Jun 6, 2025
599be20
GA-106 implemented adding multiple URLs to the bloom filter's blacklist
YuvalAnteby Jun 6, 2025
652baec
GA-106 implemented marking a mail as spam will extract URLs in it and…
YuvalAnteby Jun 7, 2025
e03c9a4
GA-106 matched inbox mails change when marking a spam like in real gmail
YuvalAnteby Jun 7, 2025
8e4d143
GA-106 implemented marking as read for mails
YuvalAnteby Jun 7, 2025
7ddd814
GA-106 ensured editing mails is like in real gmail, including all kin…
YuvalAnteby Jun 7, 2025
2ddb3cc
GA-106 implemented returning with the mail to the frontend the full e…
YuvalAnteby Jun 7, 2025
7e9eaf3
GA-106 updated use of vars
YuvalAnteby Jun 7, 2025
8f6d80a
GA-106 fixed the search by query for mails and fixed bugs
YuvalAnteby Jun 8, 2025
bc4c519
GA-106 fixed bugs related to the labels and sentTo shown on mails as …
YuvalAnteby Jun 8, 2025
d98db18
Merge branch 'GA-106-Update-server-API' into GA-103-Main-page
YuvalAnteby Jun 8, 2025
0db1dc0
GA-103 Merge pull request #70 from YuvalAnteby/GA-103-Main-page
YuvalAnteby Jun 11, 2025
3b3b50d
GA-104 created basic UI for the top menu
YuvalAnteby Jun 11, 2025
28e4804
GA-104 added new icon
YuvalAnteby Jun 11, 2025
1ecff34
GA-104 created a menu when user clicks their profile picture
YuvalAnteby Jun 11, 2025
4b0b52e
GA-104 Added toggle button for light/dark themes and some animations
YuvalAnteby Jun 11, 2025
38f3f66
GA-104 Implemented a search bar for mails
YuvalAnteby Jun 11, 2025
2f91df3
GA-104 Implemented profile picture and sub menu from it, enables logg…
YuvalAnteby Jun 11, 2025
74f4a2a
GA-104 Updated the UI with what we got so far
YuvalAnteby Jun 11, 2025
dd1417b
GA-104 implemented updating the user's profile image in the models lo…
YuvalAnteby Jun 11, 2025
247edbc
new login and signup page
dor-darmon Jun 12, 2025
852f920
update login and signup page
dor-darmon Jun 12, 2025
c55f53f
GA-103 UI change in mails rows
YuvalAnteby Jun 13, 2025
7873785
GA-103 made the mails list look like outlook's style
YuvalAnteby Jun 14, 2025
8ec56b8
GA-103 added a star button to un/star mails
YuvalAnteby Jun 14, 2025
32f032b
GA-103 added option to unspam a mail
YuvalAnteby Jun 14, 2025
69f6d58
GA-103 implemented trash and restore for mails
YuvalAnteby Jun 14, 2025
5ce0d0f
GA-103 added clock icon to the time in mails rows
YuvalAnteby Jun 14, 2025
d5f0f60
GA-103 implemented paging of mails list
YuvalAnteby Jun 15, 2025
53edc59
GA-103 logs cleanup
YuvalAnteby Jun 15, 2025
395888d
update login and signup page and token manger and token routs
dor-darmon Jun 15, 2025
ba98638
Merge pull request #71 from YuvalAnteby/GA-103-Main-page
dor-darmon Jun 15, 2025
a5c30bb
update login and signup page and token manger and token routs
dor-darmon Jun 15, 2025
cb21a74
update login and signup page and token manger and token routs
dor-darmon Jun 15, 2025
abba997
Fix: return token and user object on signup
dor-darmon Jun 15, 2025
a8fb2d4
Merge branch 'GA-104-Main-page-top-menu' into main-Ex4
YuvalAnteby Jun 15, 2025
e6a6e91
optimizations when merging with conflicts
YuvalAnteby Jun 15, 2025
b509de2
GA-102 fixed Dor's bugs when trying to log in
YuvalAnteby Jun 15, 2025
4ea10cf
EmailSideMenu.css fix
RoeeHaim Jun 15, 2025
8269298
added the side menu for the main and the functions
RoeeHaim Jun 15, 2025
c6fdeb0
side menu setup
RoeeHaim Jun 15, 2025
bc11df0
added compose mail
RoeeHaim Jun 15, 2025
06cd874
Compose.css
RoeeHaim Jun 15, 2025
ada7705
Compose.jsx
RoeeHaim Jun 15, 2025
5f1a321
GA-102 code cleanup
YuvalAnteby Jun 15, 2025
bf35bb3
Merge pull request #75 from YuvalAnteby/GA-112-Main-page-side-menu2
dor-darmon Jun 16, 2025
c71701f
GA-102 Started basic auto log in using the JWT token
YuvalAnteby Jun 16, 2025
6c3cc61
GA-102 replaced sending userId in headers with JWT token in headers
YuvalAnteby Jun 16, 2025
570ef62
GA-102 added check for expiration of the token
YuvalAnteby Jun 16, 2025
e80d6a2
GA-102 added auth check using JWT in the backend for all relevant routes
YuvalAnteby Jun 16, 2025
920c630
Merge branch 'GA-102-Signup-page' into main-Ex4
YuvalAnteby Jun 16, 2025
e29b1c7
Fixed merging errors
YuvalAnteby Jun 16, 2025
75b97ed
Fixed merging errors
YuvalAnteby Jun 16, 2025
426bbe6
Fixed spaghetti className in the side menu
YuvalAnteby Jun 17, 2025
6dec54c
Fixed search bar placement
YuvalAnteby Jun 17, 2025
23f0ed1
Bug fixes
YuvalAnteby Jun 17, 2025
251f65e
Theme bug in search bar
YuvalAnteby Jun 17, 2025
4402e06
Image using base64 instead of blob
YuvalAnteby Jun 17, 2025
bc4d14e
integrated logout
YuvalAnteby Jun 17, 2025
0a355e4
GA-111 bug fixes and file creation
YuvalAnteby Jun 17, 2025
6a30501
GA-111 header in mail reading page
YuvalAnteby Jun 18, 2025
70ad0d0
GA-111 header in mail reading page
YuvalAnteby Jun 18, 2025
28aa038
GA-111 main text area and replying buttons UI
YuvalAnteby Jun 18, 2025
b5b635f
GA-111 replying buttons placeholders click functions
YuvalAnteby Jun 18, 2025
7850795
GA-111 loading animations
YuvalAnteby Jun 18, 2025
6789fb3
GA-111 functionality of star buttons
YuvalAnteby Jun 18, 2025
2ef2300
GA-111 after action click in mail's page return to last inbox type page
YuvalAnteby Jun 18, 2025
2b7ed35
GA-111 auto marking mail as read when opening it
YuvalAnteby Jun 18, 2025
1e79ae7
GA-111 removed TODO comments
YuvalAnteby Jun 18, 2025
333d783
GA-111 bug fix
YuvalAnteby Jun 18, 2025
58afbdb
GA-111 file attachments list
YuvalAnteby Jun 18, 2025
0c80fef
GA-111 adjustments for smaller screens
YuvalAnteby Jun 18, 2025
1dd47ee
GA-111 hamburger button for side menu on smaller screens
YuvalAnteby Jun 18, 2025
bd4fef2
GA-111 side menu changes for smaller screens (backdrop, animation etc.)
YuvalAnteby Jun 19, 2025
583da35
GA-111 mail row changes for smaller screens
YuvalAnteby Jun 19, 2025
3166077
GA-111 bug fixes and optimizations
YuvalAnteby Jun 19, 2025
87a39bc
GA-111 adjustments to reading page in small screens
YuvalAnteby Jun 19, 2025
20b1ced
GA-111 adjustments to search results
YuvalAnteby Jun 19, 2025
9de0d54
Merge pull request #77 from YuvalAnteby/GA-111-Mail-reading-page
RoeeHaim Jun 20, 2025
c42fafb
search user fucntion
RoeeHaim Jun 25, 2025
7122d36
search user fucntion
RoeeHaim Jun 25, 2025
a074d55
route for the fu nc
RoeeHaim Jun 25, 2025
3ea59f4
.
RoeeHaim Jun 25, 2025
a98fbcb
send mail async func
RoeeHaim Jun 25, 2025
ee1fed9
send mail
RoeeHaim Jun 25, 2025
590ff20
option for 2 compose mail like in the real gmail (they have option fo…
RoeeHaim Jun 28, 2025
d31c3d2
when i click on the draft i can continue writing the mail
RoeeHaim Jun 28, 2025
479e503
when i click on the draft i can continue writing the mail
RoeeHaim Jun 28, 2025
d36a203
added function to convert to file
RoeeHaim Jun 28, 2025
f0a58bd
css fix
RoeeHaim Jun 28, 2025
266f026
added a lot of fucntions to the comose mail
RoeeHaim Jun 28, 2025
a79eb25
.
RoeeHaim Jun 28, 2025
133df8c
fix imports
RoeeHaim Jun 28, 2025
1d6d71a
labels
RoeeHaim Jun 29, 2025
5d2e122
labels
RoeeHaim Jun 29, 2025
c25802f
labels
RoeeHaim Jun 29, 2025
53e6b39
labels
RoeeHaim Jun 29, 2025
5c3bf68
labels
RoeeHaim Jun 29, 2025
4e17bb7
labels
RoeeHaim Jun 29, 2025
abe0c76
labels
RoeeHaim Jun 29, 2025
62f7b93
labels
RoeeHaim Jun 29, 2025
eb3ce42
fixed that the mail will be seen in the "sent" and it will not be twi…
RoeeHaim Jun 29, 2025
d4704d1
fix sending link in the mail
RoeeHaim Jun 29, 2025
f27268b
fix sending link in the mail
RoeeHaim Jun 29, 2025
1502fc8
fix sending link in the mail
RoeeHaim Jun 29, 2025
0ad7ba9
fix sending link in the mail
RoeeHaim Jun 29, 2025
c2a0721
refreshMails when i sent mail
RoeeHaim Jun 29, 2025
14fe9d6
GA-111 fixed attachment when sending mail
YuvalAnteby Jun 30, 2025
aa4bf43
Merge remote-tracking branch 'origin/GA-110-Mail-sending-page-fix' in…
YuvalAnteby Jun 30, 2025
eaefa13
GA-110 fixed displaying mail with HTML
YuvalAnteby Jun 30, 2025
e08e533
GA-110 fixed bloom filter checks
YuvalAnteby Jun 30, 2025
82ccac2
GA-110 fixed fetching mail by label
YuvalAnteby Jun 30, 2025
fe7fe3c
GA-110 small UI fix
YuvalAnteby Jun 30, 2025
716e7b7
GA-110 decided to use compose button in side menu mobile UI instead o…
YuvalAnteby Jun 30, 2025
bbef30c
Removed debug prints in mail API file
YuvalAnteby Jun 30, 2025
a85304f
Changed to use one base API URL
YuvalAnteby Jun 30, 2025
d8f34d1
comments got removed for some reason
YuvalAnteby Jun 30, 2025
28daeed
forward and reply fucnt
RoeeHaim Jul 4, 2025
b9d7710
dont need picture
RoeeHaim Jul 4, 2025
f4aa0e1
.
RoeeHaim Jul 4, 2025
0ec4027
fix
RoeeHaim Jul 4, 2025
b88d09e
fix the fix that yuval fixed
RoeeHaim Jul 4, 2025
1331c7a
i hope this is the final fix
RoeeHaim Jul 4, 2025
71cb063
auto refreshMails on drafts as well
RoeeHaim Jul 5, 2025
d155c35
.
RoeeHaim Jul 5, 2025
ccaa450
comments
RoeeHaim Jul 5, 2025
616bbf5
Merge pull request #79 from RoeeHaim/GA-110-Mail-sending-page-fix
RoeeHaim Jul 5, 2025
d64cdfc
GA-134 bugfix sidebar label's menu not showing in mobile UI
YuvalAnteby Jul 6, 2025
3464a9b
GA-134 basic marking of mails with labels
YuvalAnteby Jul 6, 2025
9df527f
GA-134 added reactive UI for picking labels
YuvalAnteby Jul 6, 2025
0cf42ce
GA-134 change labels when reading mail
YuvalAnteby Jul 6, 2025
0f3fc7a
GA-134 labels UI indicators
YuvalAnteby Jul 6, 2025
03f59bc
- Enhanced ToolBar with applyLabelsToMail logic inside handleLabelToggle
dor-darmon Jul 9, 2025
c318e08
- Enhanced ToolBar with applyLabelsToMail logic inside handleLabelToggle
dor-darmon Jul 12, 2025
c240903
- Enhanced ToolBar with applyLabelsToMail logic inside handleLabelToggle
dor-darmon Jul 13, 2025
c03a51f
- Enhanced ToolBar with applyLabelsToMail logic inside handleLabelToggle
dor-darmon Jul 13, 2025
613026e
- Enhanced ToolBar with applyLabelsToMail logic inside handleLabelToggle
dor-darmon Jul 13, 2025
519c62c
Update MailRow.jsx
dor-darmon Jul 13, 2025
510c5c2
- Fixed createNewLabel to correctly store both name and parent values
dor-darmon Jul 13, 2025
e07be55
Merge remote-tracking branch 'origin/GA-137-label-sync-fix-bug' into …
dor-darmon Jul 13, 2025
356363c
.
dor-darmon Jul 13, 2025
3d501b3
.
dor-darmon Jul 13, 2025
9521600
.
dor-darmon Jul 13, 2025
f7cd5e0
.
dor-darmon Jul 13, 2025
43221b4
Update mails.js
dor-darmon Jul 13, 2025
94c61da
.
dor-darmon Jul 13, 2025
742f884
Merge remote-tracking branch 'origin/GA-137-label-sync-fix-bug' into …
dor-darmon Jul 13, 2025
f3762a7
Removed debug prints in mails controller
YuvalAnteby Jul 17, 2025
a85cb18
Changed === checks to ==
YuvalAnteby Jul 17, 2025
6e576bc
Update labels.js
dor-darmon Jul 18, 2025
d5df171
.
dor-darmon Jul 18, 2025
f47947e
Merge remote-tracking branch 'origin/GA-137-label-sync-fix-bug' into …
dor-darmon Jul 18, 2025
b1dc410
Merge pull request #83 from YuvalAnteby/GA-137-label-sync-fix-bug
RoeeHaim Jul 19, 2025
02273bd
fixed when i sent a mail from the drafts it is sent with the files
RoeeHaim Jul 19, 2025
14aa9f9
fixed theme change and size of the compose when you shrink the screen
RoeeHaim Jul 19, 2025
3e8f580
final small stuff
RoeeHaim Jul 19, 2025
2cb4116
Merge pull request #85 from YuvalAnteby/GA-138-fix-the-draft-to-keep-…
RoeeHaim Jul 19, 2025
0cddc54
GA-134 Merge pull request #80 from YuvalAnteby/GA-134-Missing-stuff-m…
YuvalAnteby Jul 19, 2025
5f69848
GA-136 env file for the nodejs backend with default values for grading
YuvalAnteby Jul 24, 2025
cc35769
GA-136 env file for the react frontend with default values for grading
YuvalAnteby Jul 24, 2025
af7214d
GA-136 removed console logs and todos
YuvalAnteby Jul 24, 2025
e199db4
GA-136 screenshots
YuvalAnteby Jul 24, 2025
1c101bb
GA-136 root README
YuvalAnteby Jul 24, 2025
dc2f378
GA-136 root README
YuvalAnteby Jul 24, 2025
8876f72
GA-136 Node.js and react READMEs
YuvalAnteby Jul 24, 2025
4caa3c3
GA-136 Merge pull request #86 from YuvalAnteby/GA-136-finalize-sprint
YuvalAnteby Jul 25, 2025
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
32 changes: 0 additions & 32 deletions .dockerignore

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- main-Ex3
- main-Ex4
- main-Ex5
# TODO: Add more main-ExN branches as we need for assignments

jobs:
# ----- Build & tests the CPP server -----
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# CLion config
.idea/
# build, cmake folders
server_cpp/build/
**/build/
server_cpp/cmake-build-debug/
cmake-build-debug/
/web_server/node_modules/
**/node_modules/
66 changes: 31 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Gmail-AdvancedSystemProgramming
Daily meeting summaries are uploaded to `Issues` tab
## Dear TA please check main-Ex1 for the final version of Ex1
## Dear TA please check main-Ex2 for the final version of Ex2
## Dear TA please check main-Ex3 for the final version of Ex3
Roee's miluim service documents are uploaded to `Issues` tab if needed, Tzvika was informed about it.

## Dear TA please check main-Ex4 for the final version of Ex4

---

## Table of Contents
- [Running server and client](#testing-and-running)
- [Getting started](#getting-started)
- [Testing bloom filter server and python client](#to-test-the-python-client-and-bloom-filter-server)
- [Running the web server](#running-the-servers)

- [Screenshots & routes examples](#screenshots)
- [Ex3](#ex3-screenshots)
- [Running as web application project](#running-the-entire-web-app)
- [env variables](#env-variables)
- [Screenshots](#screenshots)
- [Useful links](#useful-links)
- [CPP server README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/tree/main-Exe/server_cpp)
- [Python client README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex3/python_client/README.md)
Expand All @@ -28,32 +27,30 @@ First clone the project
git clone https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming.git
cd Gmail-AdvancedSystemProgramming/python_client
```
And build it
```bash
docker-compose build
```
**If you want to change the configuration (ports, names, bloom filter integers etc.) you can do it in dockerfiles
and docker compose.**

### To test the python client and bloom filter server
**Make sure you already cloned the project and built it using docker compose**
This will build and run only the test related containers (CPP server, gtest, python test)
```bash
docker-compose run --build --rm gtest
docker-compose run --build --rm test_client
docker-compose --profile tests up --build
```

#### Running the servers
**Make sure you already cloned the project and built it using docker compose** </br>
In case you want to change any configuration value (port, bloom filter integers etc.) change the relevant dockerfile or docker compose file. </br>
Changing the port and the name of the cpp server also requires changing models/blacklist.js global vars (since we shouldn't include .env files)

- To run the web server and bloom filter server
### Running the entire web app
This will build and run only the web application related containers (React, Node.js, CPP server)
```bash
docker-compose up web_server
docker-compose --profile web_app up --build
```
- To run the python client

### env variables
In Node.js and React root folders you can find .env files with default values to help you check the project.</br>
In a real world application these wouldn't be uploaded, we did it for easier set up for the checkers :)

### Running the python client
**NOTE: The instructions didn't ask to run the python client and express server together using the same command**
```bash
docker-compose run python_client
docker-compose run client --build
```
**NOTE: The Ex3 instructions didn't ask to run the python client and express server together using the same command**

- Remainder, to exit the container gracefully use
```bash
Expand All @@ -63,26 +60,25 @@ control+c
---

### Screenshots
#### Ex3 screenshots
<details>
<summary>Click to expand Ex3 screenshots</summary>
<summary>Click to expand Ex4 screenshots</summary>

<img src="screenshots/ex3/curl runexample1.png" height="50%" alt="">
<img src="screenshots/ex3/curl runexample2.png" height="50%" alt="">
<img src="screenshots/ex3/curl runexample3.png" height="50%" alt="">
<img src="screenshots/ex3/curl runexample4.png" height="50%" alt="">
<img src="screenshots/ex3/curl runexample5.png" height="50%" alt="">
<img src="screenshots/ex4/light_login.png" width="50%" alt="light_login">
<img src="screenshots/ex4/dark_inbox.png" width="50%" alt="dark_inbox">
<img src="screenshots/ex4/light_compose.png" width="50%" alt="light_compose">
<img src="screenshots/ex4/dark_reading.png" width="50%" alt="dark_reading">
<img src="screenshots/ex4/dark_signup.png" width="50%" alt="dark_signup">

</details>

For more screenshots [click here](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/main-Ex3/screenshots/ex3)
For more screenshots [click here](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/main-Ex4/screenshots/ex4)

---

## Useful links
- [CPP server README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/tree/main-Exe/server_cpp)
- [Python client README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex3/python_client/README.md)
- [JavaScript server README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex3/web_server/README.md)
- [CPP server README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex4/server_cpp)
- [JavaScript server README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex4/web_server/README.md)
- [React frontend README](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/blob/main-Ex4/frontend/README.md)

---

Binary file not shown.
Binary file not shown.
Binary file not shown.
41 changes: 34 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
services:
# React frontend
web_front:
profiles: ["web_app"]
build:
context: frontend
dockerfile: Dockerfile
container_name: react_frontend
depends_on:
- web_server
env_file:
- ./frontend/.env
ports:
- "${REACT_APP_PORT:-3000}:3000"
networks:
- gmail-net

# Web server using JS express
web_server:
profiles: ["web_app"]
build:
context: ./web_server
dockerfile: Dockerfile
container_name: web_server
ports:
- "3000:3000"
env_file:
- ./web_server/.env
depends_on:
- run_server
ports:
- "${NODE_PORT:-3001}:3001"
networks:
- gmail-net

# Server itself (CPP)
run_server:
profiles: ["web_app", "tests"]
build:
context: ./server_cpp
dockerfile: Dockerfile
Expand All @@ -25,19 +46,23 @@ services:
- "12347:12347"
networks:
- gmail-net

# Server gtest
gtest:
profiles: [ "tests" ]
build:
context: ./server_cpp
dockerfile: Dockerfile_test
container_name: gmail_tests
# Prevent the use of terminal input during test runs
stdin_open: false
tty: false

# Client (Python)
python_client:
profiles: [ "client" ]
build:
context: python_client
context: ./python_client
dockerfile: Dockerfile
# container_name: python_client
depends_on:
Expand All @@ -51,19 +76,21 @@ services:
command: [ "python", "main.py", "run_server", "12347" ]
networks:
- gmail-net

# Client test runner (Python).
test_client:
profiles: [ "tests" ]
build:
context: .
dockerfile: python_client/Dockerfile.tests
context: ./python_client
dockerfile: Dockerfile.tests
container_name: client_tests
depends_on:
- run_server
command: ["python","python_client/tests/test_client_unittest.py"]
command: ["python","tests/test_client_unittest.py"]


volumes:
app_data: # <-- define the named volume
app_data:

networks:
gmail-net:
21 changes: 21 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Node modules and build output should be created inside the container
node_modules/
build/
dist/

# Log files
npm-debug.log*
yarn-error.log*
yarn-debug.log*
*.log

# Environment files
.env

# macOS/IDE files
.DS_Store
.vscode/
.idea/

# READMEs
*.md
5 changes: 5 additions & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REACT_APP_API_URL=http://localhost:3001/api
REACT_APP_PORT=3000
REACT_APP_MAILS_PER_PAGE=10
REACT_APP_NAME='Mail ASP'
REACT_APP_DEFAULT_AVATAR=/profile_default.png
23 changes: 23 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
10 changes: 10 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:18-alpine

# Copy and install dependencies
WORKDIR /app
COPY package*.json ./
# and the app
RUN npm install
COPY . .
# for developement time
CMD ["npm", "start"]
41 changes: 41 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# React frontend

## Setup & Running

### Getting started
First clone the project
```bash
git clone https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming.git
cd Gmail-AdvancedSystemProgramming/python_client
```
And build it
```bash
docker-compose build
```

### Running
Note that the Node.js and Bloom filter servers are needed for using the React frontend
```bash
docker-compose --profile web_app up
```

### env variables
In Node.js and React root folders you can find .env files with default values to help you check the project.</br>
In a real world application these wouldn't be uploaded, we did it for easier set up for the checkers :)


## Screenshots
<details>
<summary>Click to expand Ex4 screenshots</summary>

<img src="screenshots/ex4/light_login.png" width="50%" alt="light_login">
<img src="screenshots/ex4/dark_inbox.png" width="50%" alt="dark_inbox">
<img src="screenshots/ex4/light_compose.png" width="50%" alt="light_compose">
<img src="screenshots/ex4/dark_reading.png" width="50%" alt="dark_reading">
<img src="screenshots/ex4/dark_signup.png" width="50%" alt="dark_signup">

</details>

For more screenshots [click here](https://github.com/YuvalAnteby/Gmail-AdvancedSystemProgramming/main-Ex4/screenshots/ex4)

---
Loading