School assignment at YRGO. Create an Instagram clone using PHP, SQL, HTML, CSS and JavaScript.
-
As a user I should be able to create an account.
-
As a user I should be able to login.
-
As a user I should be able to logout.
-
As a user I should be able to edit my account email, password and biography.
-
As a user I should be able to upload a profile avatar image.
-
As a user I should be able to create new posts with image and description.
-
As a user I should be able to edit my posts.
-
As a user I should be able to delete my posts.
-
As a user I should be able to like posts.
-
As a user I should be able to remove likes from posts.
-
As a user I should be able to follow and unfollow other users.
-
As a user I should be able to view a list of posts by users I follow.
-
As a user I should be able to search for users.
-
As a user I'm able to comment on a post.
-
As a user I'm able to edit my comments.
-
As a user I'm able to delete my comments.
-
The project should implement nice looking graphical user interface.
-
The application should be written in HTML, CSS, JavaScript and PHP.
-
The application should be built using a SQLite database with at least three different tables.
-
The application should be responsive and be built using the method mobile-first.
-
The application should be implement secure hashed passwords when signing up.
-
The project's PHP files should declare strict types
Note: Strict types should only be declared in files that just contains PHP.
-
The project can't contain any PHP errors, warning or notices.
-
The project must be tested on at least two of your classmates computers.
- Update search function to perform a live search on keydown.
Note: It should update first after user has entered three keys.
- As a user I'm able to delete my account along with all posts and comments..
- Clone this repository to your directory through the terminal.
$ git clone https://github.com/jesperlndqvst/picture-this.git
- Change current directory to the cloned repo.
$ cd picture-this/public
- Start your web server (8000 can be changed to any other 4 digits, ex. 1337 also works).
$ php -S localhost:8000
- register.php#40-44 insted of using bind param you could use execute and to bind multiple variables.
- index.php#23-30 You could break out the error part into a view and require it in to reduce duplication.
- main.js#11-17 you could choose diffrent names for classes fas / far to something more descriptive.
- main.js maybe break up main.js into separate files to easier find the dunction your after.
- index.php#5 you could set a variable in autoload for $user_id = $_SESSION['user']['id'] if it is set since its used quite a bit.
- functions.php Great job on breaking up alot of php into functions.
- functions.php The naming of your functions made it very easy to understand what they did.
- main.js#12-18 you could use heart.classList.replace(fas,far) instead of first removing then adding.
- settings.php#12-14 good job on breaking out sanitize into functions.
- gitignore# you have ignored the uploads posts folder so it didnt exist when i cloned your repo. you could write public/app/uploads/avatars/* and public/app/uploads/posts/* and use gitkeep instead.
Code review by: Erik Johanesson
This project is licensed under the MIT License - see the LICENSE file for details