diff --git a/subjects/ascii-art-web/ascii-art-web.audit.en.md b/subjects/ascii-art-web/ascii-art-web.audit.en.md index afe350068..6584d8e06 100644 --- a/subjects/ascii-art-web/ascii-art-web.audit.en.md +++ b/subjects/ascii-art-web/ascii-art-web.audit.en.md @@ -71,8 +71,8 @@ o-o-o o--o o-o o o o o-o | | o o ##### Try to navigate between all the available pages in the website. ###### Are all the pages working? Does the project implement [404 status](https://www.restapitutorial.com/httpstatuscodes.html)? -###### Does the project implement HTTP status [400 bad request](https://kinsta.com/knowledgebase/400-bad-request/#causes)? -###### Does the project implement HTTP status [500 internal server error](https://www.restapitutorial.com/httpstatuscodes.html)? +###### Does the project handle [HTTP status 400 - Bad Request](https://kinsta.com/knowledgebase/400-bad-request/#causes)? +###### Does the project handle [HTTP status 500 - Internal Server Errors](https://www.restapitutorial.com/httpstatuscodes.html)? ##### Try making a request to the server (clicking a button to generate the ascii-art representation on the website) ###### Is the communication between [server and client](https://www.geeksforgeeks.org/client-server-model/) well established? diff --git a/subjects/forum/forum.audit.en.md b/subjects/forum/forum.audit.en.md new file mode 100644 index 000000000..fb88882dd --- /dev/null +++ b/subjects/forum/forum.audit.en.md @@ -0,0 +1,177 @@ +#### Authentication + +###### Are an email and a password asked for in the resgistration? + +###### Does the project detect if the email or password are wrong? + +###### Does the project detect if the email or user name is already taken in the registration? + +##### Try to register as a new user in the forum. + +###### Is it possible to register? + +##### Try to login with the user you created. + +###### Can you login and have all the rights of a registered user? + +##### Try to login without any credentials. + +###### Does it show a warning message? + +###### Are sessions present in the project? + +##### Try opening two different browsers and login into one of them. Refresh the other browser. + +###### Can you confirm that the browser non logged remains unregistered? + +##### Try opening two different browsers and login into one of them. Then create a new post or just add a comment. Refresh both browsers. + +###### Does it present the comment/post on both browsers? + +#### SQLite + +###### Does the code contain at least one CREATE query? + +###### Does the code contain at least one INSERT query? + +###### Does the code contain at least one SELECT query? + +##### Try registering in the forum, open the database with `sqlite3 ` and perform a query to select all the users (Example: SELECT \* FROM users;). + +###### Does it present the user you created? + +##### Try creating a post in the forum, open the database with `sqlite3 ` and perform a query to select all the users (Example: SELECT \* FROM post;). + +###### Does it present the post you created? + +##### Try creating a comment in the forum, open the database with `sqlite3 ` and perform a query to select all the users (Example: SELECT \* FROM comment;). + +###### Does it present the comment you created? + +#### Docker + +###### Does the project have Dockerfiles? + +##### Try to run the command `"docker image build [OPTINS] PATH | URL | -"` to build the image using using the project Dockerfiles and run the command `"docker images"` to see images. + +``` +student$ docker images +REPOSITORY TAG IMAGE ID CREATED SIZE + latest 85a65d66ca39 7 seconds ago 795MB +``` + +###### Does all images build as above? + +##### Try running the command `"docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]"` to start the containers using the images just created and run the command `"docker ps -a"` to see containers. + +``` +student$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cc8f5dcf760f "./server" 6 seconds ago Up 6 seconds 0.0.0.0:8080->8080/tcp ascii-art-web +``` + +###### Is the docker containers running as above? + +###### Does the project present no [unused object](https://docs.docker.com/config/pruning/)? + +#### Functional + +##### Enter the forum as a non-registered user. + +###### Are you prohibited to create a post? + +##### Enter the forum as a non-registered user. + +###### Are you prohibited to create a comment? + +##### Enter the forum as a non-registered user and try to like a comment. + +###### Are you prohibited to like a post? + +##### Enter the forum as a non-registered user and try to dislike a comment. + +###### Are you prohibited to dislike a comment? + +##### Enter the forum as a registered user, go to a post and try to create a comment for it. + +###### Were you able to create the comment? + +##### Enter the forum as a registered user, go to a post and try to create an empty comment for it. + +###### Were you prohibited to create the comment? + +##### Enter the forum as a registered user and try to create a post. + +###### Were you able to create a post? + +##### Enter the forum as a registered user and try to create an empty post. + +###### Were you prohibited to create the post? + +##### Try creating a post as a registered user and try to choose a category for that post. + +###### Were you able to choose a category for that post? + +##### Enter the forum as a registered user and try to like or dislike a post. + +###### Can you like or dislike the post? + +##### Enter the forum as a registered user and try to like or dislike a comment. + +###### Can you like or dislike the comment? + +##### Enter the forum as a registered user, try liking and disliking a post and then refresh the page. + +###### Does the number of likes/dislikes change? + +##### Enter the forum as a registered user and try to like and then dislike the same post. + +###### Can you confirm that it is not possible that the post is liked and disliked at the same time? + +##### Enter the forum as a registered user and try seeing all of your created posts. + +###### Does it present the expected posts? + +##### Enter the forum as a registered user and try seeing all of your liked posts. + +###### Does it present the expected posts? + +##### Navigate to a post of your choice and see its comments. + +###### Are all users (registered or not) able to see the number of likes and dislikes that comment has? + +##### Try seeing all posts from one category using the filter. + +###### Are all posts displayed from that category? + +###### Did the server behaved as expected?(did not crashed) + +###### Does the server use the right [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)? + +###### Are all the pages working? (Absence of 404 page?) + +###### Does the project handle [HTTP status 400 - Bad Requests](https://kinsta.com/knowledgebase/400-bad-request/#causes)? + +###### Does the project handle [HTTP status 500 - Internal Server Errors](https://www.restapitutorial.com/httpstatuscodes.html)? + +###### Are only the allowed packages being used? + +#### General + +###### +Does the project present a script to build the images and containers? (using a script to simplify the build) + +#### Basic + +###### +Does the project runs quickly and effectively? (Favoring recursive, no unnecessary data requests, etc) + +###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)? + +###### +Is there a test file for this code? + +#### Social + +###### +Did you learn anything from this project? + +###### +Can it be open-sourced / be used for other sources? + +###### +Would you recommend/nominate this program as an example for the rest of the school? diff --git a/subjects/forum/forum.en.md b/subjects/forum/forum.en.md new file mode 100644 index 000000000..7abdc829d --- /dev/null +++ b/subjects/forum/forum.en.md @@ -0,0 +1,100 @@ +## forum + +### Objectives + +This project consists in creating a web forum that allows : + +- communication between users. +- associating categories to posts. +- liking and disliking posts and comments. +- filtering posts. + +#### SQLite + +In order to store the data in your forum (like users, posts, comments, etc.) you will use the database library SQLite. + +SQLite is a popular choice as embedded database software for local/client storage in application software such as web browsers. It enables you to create a database as well as controlling it by using queries. + +To structure your database and to achieve better performance we highly advise you to take a look at the [entity relationship diagram](https://www.smartdraw.com/entity-relationship-diagram/) and build one based on your own database. + +- You must use at least one SELECT, one CREATE and one INSERT queries. + +To know more about SQLite you can check the [SQLite page](https://www.sqlite.org/index.html). + +#### Authentication + +In this segment the client must be able to `register` as a new user on the forum, by inputting their credentials. You also have to create a `login session` to access the forum and be able to add posts and comments. + +You should use cookies to allow each user to have only one opened session. Each of this sessions must contain an expiration date. It is up to you to decide how long the cookie stays "alive". + +Instructions for user registration: + +- Must ask for email + - When the email is already taken return an error response. +- Must ask for username +- Must ask for password + - The password must be encrypted when stored + +The forum must be able to check if the email provided is present in the database and if all credentials are correct. It will check if the password is the same with the one provided and, if the password is not the same, it will return an error response. + +#### Communication + +In order for users to communicate between each other, they will have to be able to create posts and comments. + +- Only registered users will be able to create posts and comments. +- When registered users are creating a post they can associate one or more categories to it. + - The implementation and choice of the categories is up to you. +- The posts and comments should be visible to all users (registered or not). +- Non-registered users will only be able to see posts and comments. + +#### Likes and Dislikes + +Only registered users will be able to like or dislike posts and comments. + +The number of likes and dislikes should be visible by all users (registered or not). + +#### Filter + +You need to implement a filter mechanism, that will allow users to filter the displayed posts by : + +- categories +- created posts +- liked posts + +You can look at filtering by categories as subforums. A subforum is a section of an online forum dedicated to a specific topic. + +Note that the last two are only available for registered users and must refer to the logged in user. + +#### Docker + +For the forum project you must use Docker. You can see all about docker basics on the [ascii-art-web-dockerize](https://public.01-edu.org/subjects/ascii-art-web/ascii-art-web-dockerize.en) subject. + +This project will help you learn about: + +- Client utilities. +- The basics of web : + - HTML + - HTTP + - Sessions and cookies +- Using and [setting up Docker](https://docs.docker.com/get-started/) + - Containerizing an application + - Compatibility/Dependency + - Creating images +- SQL language + - Manipulation of databases +- The basics of encryption + +### Instructions + +- You must use **SQLite**. +- You must handle website errors, HTTP status. +- You must handle all sort of technical errors. +- The code must respect the [**good practices**](https://public.01-edu.org/subjects/good-practices.en). +- It is recommended that the code should present a **test file**. + +### Allowed packages + +- All [standard go](https://golang.org/pkg/) packages are allowed. +- github.com/mattn/go-sqlite3 +- golang.org/x/crypto/bcrypt +- github.com/satori/go.uuid diff --git a/subjects/groupie-tracker/groupie-tracker.audit.en.md b/subjects/groupie-tracker/groupie-tracker.audit.en.md index 7ea387c21..0e1a2cc22 100644 --- a/subjects/groupie-tracker/groupie-tracker.audit.en.md +++ b/subjects/groupie-tracker/groupie-tracker.audit.en.md @@ -61,9 +61,9 @@ ###### Are all the pages working? (Absence of 404 page?) -###### Does the project avoid [HTTP status 400](https://kinsta.com/knowledgebase/400-bad-request/#causes)? +###### Does the project handle [HTTP status 400 - Bad Requests](https://kinsta.com/knowledgebase/400-bad-request/#causes)? -###### Does the project avoid [HTTP status 500](https://www.restapitutorial.com/httpstatuscodes.html)? +###### Does the project handle [HTTP status 500 - Internal Server Errors](https://www.restapitutorial.com/httpstatuscodes.html)? ###### Is the communication between server and client well established?