Browse Source

questions: followers, posts, groups, notifications, profile

content-update
OGordoo 4 years ago
parent
commit
fedcd3b7df
  1. 40
      subjects/social-network/README.md
  2. 145
      subjects/social-network/audit/README.md

40
subjects/social-network/README.md

@ -35,7 +35,7 @@ Some of the most known JS frameworks around are:
Caution: Note that JS frameworks are different from JS libraries. JS libraries contain code snippets that are used to perform common JavaScript functions, while frameworks will help you by laying out the groundwork/building the bases for your JS project.
----
---
### Backend
@ -44,7 +44,7 @@ This is typically divided into three major parts:
- **Server**, this is the computer that receives request. Though there are machines made and optimized for this particular purpose, you will use your own computer.
- **App**, this is the application running on the server that listens for requests, retrieves information from the database and sends a response, usually the response is done in JSON, using REST-based API. The server runs an app that contains all the logic about how to respond to various requests based on the HTTP or other types of protocols. Some of these handlers functions will be middleware. Middleware is any code that executes between the server receiving a request and sending a response.
- **App**, this is the application running on the server that listens for requests, retrieves information from the database and sends a response. The server runs an app that contains all the logic about how to respond to various requests based on the HTTP or other types of protocols. Some of these handlers functions will be middleware. Middleware is any code that executes between the server receiving a request and sending a response.
- **Database**, are used as you already know, to organize and persist data. Many requests sent to the server might require a database query. A client might request information that is stored in the database, or a client might submit data with their request to be added to the database.
@ -53,8 +53,8 @@ This is typically divided into three major parts:
The backend will consist, like said above, of an **app** containing all the backend logic. This logic will there for have several middleware, for example:
- Authentication, since HTTP is a stateless protocol, we can use several ways to overcome and authenticate a client/user. You can use [sessions](https://allaboutcookies.org/cookies/session-cookies-used-for.html) or [tokens(JWT)](https://jwt.io/)
- Images handling, supporting various types of extensions. In this project you have to handle at least JPEG, PNG and GIF types. You will have to store the images, it can be done by storing the file/path in the database and saving the image in a specific file system. Or saving the image in the database, you can see more about images and database [here](https://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay).
- Websocket, handling the connections in real time, between clients. This will help with the private and group chats.
- Images handling, supporting various types of extensions. In this project you have to handle at least JPEG, PNG types. You will have to store the images, it can be done by storing the file/path in the database and saving the image in a specific file system.
- Websocket, handling the connections in real time, between clients. This will help with the private chats.
#### Sqlite
@ -90,13 +90,13 @@ backend
The folder structure is organized in a way that helps you to **understand** and **use** migrations, where you can apply it using a simple path, for example: `file://backend/pkg/db/migrations/sqlite`. It can be organized as you wish but **do not forget that the application of migrations and the file organization will be tested**.
For migrations you can use [golang-migrate](https://github.com/golang-migrate/migrate) package or other package that better suits your project
For migrations you can use [golang-migrate](https://github.com/golang-migrate/migrate) package or other package that better suits your project.
All migrations should be stored on a specific folder, as above. The `sqlite.go` should present the connection to the database, the applying of the migrations and other useful functionalities that you may need to implement.
This migration system can help you manage your time and testing, by filling you database.
This migration system can help you manage your time and testing, by filling your database.
----
---
### docker
@ -107,7 +107,7 @@ This network must have both back and front end where they will communicate betwe
Only one will be published to a port on the host machine, being the client, so that you can be able to access the port that is exposed.
----
---
### Authentication
@ -124,11 +124,11 @@ To be able for the users to use the social network they will have to make an acc
Note that the **Avatar/Image**, **Nickname** and **About Me** should be present in the form but the user can skip the filling of those fields.
When you login you should stay logged in until you choose a logout option that should be available at all times. For this you will have to implement [sessions](https://allaboutcookies.org/cookies/session-cookies-used-for.html) and [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) or [tokens(JWT)](https://jwt.io/).
When you login you should stay logged in until you choose a logout option that should be available at all times. For this you will have to implement [sessions](https://allaboutcookies.org/cookies/session-cookies-used-for.html) and [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).
You can implement your own package for the authentication or you can take a look at some packages to help you.
You can implement your own package for sessions and cookies or you can take a look at some packages to help you.
----
---
### Followers
@ -136,7 +136,7 @@ When navigating the social network you should be able to follow and unfollow oth
In order to follow someone the user first needs to send a request to the user he/she wants to follow. Then the other user should be able to accept the request or decline it. If the second user has a public profile (explained in the next topic) this step is skipped and the sending of the request is ignored.
----
---
### Profile
@ -151,7 +151,7 @@ There are two types of profiles: a public profile and a private profile. A publi
When the user is in their own profile it should be available an option that allows the user to turn its profile public or private.
----
---
### Posts
@ -163,11 +163,11 @@ The user must be able to specify the privacy of the post:
- private (only followers of the creator of the post will be able to see the post)
- almost private (only the followers chosen by the creator of the post will be able to see it)
----
---
### Groups
A user must be able to create a group. The group should have a title and a description given by the creator and he/she can invite other followers to join the group.
A user must be able to create a group. The group should have a title and a description given by the creator and he/she can invite other users to join the group.
The invited users need to accept the invitation to be part of the group. They can also invite other people once they are already part of the group. Another way to enter the group is to request to be in it and only the creator of the group would be allowed to accept or refuse the request.
@ -186,21 +186,21 @@ A user belonging to the group can also create an event, making it available for
After creating the event every user can choose one of the options for the event.
----
---
### Chat
The user should be able to send private messages to users that he/she is following. It should be able for the users to send emojis to each other too.
The user should be able to send private messages to users that he/she is following. It should be able for the users to send emojis to each other.
The user that the message was sent to, will receive the message instantly, by the usage of Websockets. If he/she is following the user that sent the message
The user that the message was sent to, will receive the message instantly, by the usage of Websockets. If he/she is following the user that sent the message or if the user has a public profile.
Groups should have a common chat room, so if a user is a member of the group he/she should be able to send and receive messages to this group chat.
----
---
### Notifications
A user must be able to see the notifications in every page of the project.
A user must be able to see the notifications in every page of the project. New notifications are different from new private messages and should be displayed in a different way!
A user should be notified if he/she:

145
subjects/social-network/audit/README.md

@ -10,7 +10,7 @@
#### Database
###### Is Sqlite being used in the project as the DataBase?
###### Is Sqlite being used in the project as the database?
###### Does the app implement a migration system?
@ -30,29 +30,127 @@
###### Did the app saved the registered user without error?
##### Try to login with the user you just registered.
##### Try to log in with the user you just registered.
###### Did the login worked without problem?
###### Did the log in worked without problem?
##### Try to login with the user you created, but with a wrong password or email.
##### Try to log in with the user you created, but with a wrong password or email.
###### Did the app detect if the email or password is wrong?
###### Did the app detect if the email or password was wrong?
##### Try to register the same user you already registered.
###### Did the app detect if the email/user is already present in the database?
##### Open two browsers (ex: Chrome and Firefox), login into one and refresh the other browsers.
##### Open two browsers (ex: Chrome and Firefox), log in into one and refresh the other browsers.
###### Can you confirm that the browser non logged remains unregistered?
##### Using the two browsers, login with different users in each one. Then refresh both the browsers.
##### Using the two browsers, log in with different users in each one. Then refresh both the browsers.
###### Can you confirm that both browsers continue with the right users?
#### Followers
##### Try to follow a private user.
###### Are you able to send a following request to the private user?
##### Try to follow a public user.
###### Are you able to follow the public user without the need of sending a following request?
##### Open two browsers(ex: Chrome and Firefox), log in as two different private users and with one of them try to follow the other.
###### Is the user who received the request able to accept or decline the following request?
##### After following another user successfully try to unfollow him.
###### Were you able to do so?
##### Profile
##### Try opening your own profile.
###### Does the profile displays every information requested in the register form, apart from the password?
##### Try opening your own profile.
###### Does the profile displays every post created by the user?
##### Try opening your own profile.
###### Does the profile displays the users that you follow and the ones who are following you?
##### Try opening your own profile.
###### Are you able to change between private profile and public profile?
##### Open two browsers and log in with different users on them, with one of the users having a private profile and successfully follow that user.
###### Are you able to see a followed user private profile?
##### Using the two browsers with the same users, with one of the users having a private profile and be sure not to follow him.
###### Are you prevented from seeing a non-followed user private profile?
##### Using the two browsers with the users, with one of the users having a public profile and be sure not to follow him.
###### Are you able to see a non-followed user public profile?
##### Using the two browsers with the users, with one of the users having a public profile and successfully follow that user.
###### Are you able to see a followed user public profile?
#### Posts
###### Are you able to create a post and commenting already created posts after legging in?
##### Try creating a post.
###### Are you able to include an image (JPG or PNG) or a GIF on it?
##### Try creating a comment.
###### Are you able to include an image (JPG or PNG) or a GIF on it?
##### Try creating a post.
###### Can you specify the type of privacy of the post (private, public, almost private)?
###### If you choose the almost private privacy option, can you specify the users that are allowed to see the post?
##### Groups
##### Try creating a group.
###### Were you able to invite one of your followers to join the group?
##### Open two browsers, log in with different users on each browser, follow each other and with one of the users create a group and invite the other user.
###### Did the other user received a group invitation that he/she can refuse/accept?
##### Using the same browsers and the same users, with one of the users create a group and with the other try to make a group entering request.
###### Did the owner of the group received a request that he/she can refuse/accept?
###### Can a user make group invitations, after being part of the group (being the user different from the creator of the group)?
###### Can a user make a group entering request (a request to enter a group)?
###### After being part of a group, can the user create posts and comment already created posts?
##### Try to create an event in a group.
###### Were you asked for a title, a description, a day/time and at least two options (going, not going)?
##### Using the same browsers and the same users, after both of them becoming part of the same group, create an event with one of them.
###### Is the other user able to see the event and vote in which option he wants?
#### Chat
##### Try and open two browsers (ex: Chrome and Firefox), login with different users in each one. Then with one of the users try to send a private message to the other user.
##### Try and open two browsers (ex: Chrome and Firefox), log in with different users in each one. Then with one of the users try to send a private message to the other user.
###### Did the other user received the message in realtime?
@ -60,7 +158,7 @@
###### Did the chat between the users went well? (did not crash the server)
##### Try and open three browsers (ex: Chrome and Firefox or a private browser), login with different users in each one. Then with one of the users try to send a private message to one of the other users.
##### Try and open three browsers (ex: Chrome and Firefox or a private browser), log in with different users in each one. Then with one of the users try to send a private message to one of the other users.
###### Did only the targeted user received the message?
@ -74,13 +172,36 @@
###### Can you confirm that it is possible to send emojis via chat to other users?
#### Docker
#### Notifications
###### Can you check the notifications on every page of the project?
##### Open two browsers, log in as two different private users and with one of them try to follow the other.
###### Did the other user received a notification regarding the following request?
##### Open two browsers, log in with different users on each browser, follow each other and with one of the users create a group and invite the other user.
###### Did the invited user received a notification regarding the group invitation request?
##### Open two browsers, log in with different users on each browser, create a group with one of them and with the other send a group entering request.
###### Did the other user received a notification regarding the group entering request?
##### Open two browsers, log in with different users on each browser, become part of the same group with both users and with one of the users create an event.
###### Did the other user received a notification regarding the creation of the event?
#### Docker
#### Bonus
###### +Can you login using Github or other type of external OAuthenticator (open standard for access delegation)?
###### +Can you log in using Github or other type of external OAuthenticator (open standard for access delegation)?
###### +Did the student created a migration to fill the database?
###### +If you unfollow a user, do you get a confirmation pop-up?
###### +If you change your profile from public to private (or vice versa), do you get a confirmation pop-up?
###### +Did student created a migration to fill the database?
###### +Is there other notification apart from the ones explicit on the subject?

Loading…
Cancel
Save