Simple Reddit clone written in Laravel 9. Demo screenshots available here.
Built by
-
Clone the repository
-
git clone https://github.com/theo0165/duckpond cd duckpond
-
-
Create .env file
-
cp .env.example .env
-
-
Update .env with your own values.
-
Install dependencies for php and node.js
-
npm install composer install
-
-
Generate application key
-
php artisan key:generate
-
-
Run migrations and populate database for testing
-
php artisan migrate:fresh --seed
- This will take up to 30 seconds
-
-
Start dev servers
-
npm run dev php artisan serve
-
-
Visit the website on http://localhost:8000
Code review written by Christopher, Oliver & Sophie.
- No installation guide (during time of code review)
- CreateReplayController :15 : $data as a variable name could be more specific.
- ShowUserController :12 : is this comment supposed to be there?
- GuestTest :328 : This test is in a comment, can be deleted since it’s not being used.
- In the table comments there is a column named parent_id, maybe specify more.
- All tests “includes” the faker class but it is never used.
- Most of the controllers have unused request classes.
- Comment on what q would be in search controller.
- A lot of files have the “boiler” code left.
- The code could benefit a lot from comments explaining more specific variables.
- DeleteCommentController.php:16 has commented dd left in code
- ShowPostController.php:13 do not use $request
- [minor]Controller/submit breaks structure with small letters
- StoreSubmitController.php:25 has commented dd left in code
- ShowUserProfileController.php:12 commented code left in prod
- UserFollowCommunityController.php $checkIfFollow-naming. Check if whats follow what?
- Maybe pagination on front page?
- Models/Comment.php:52 has some commented code
- Models/Post.php:25 has some commented code
- Good use of built in functions etc.
- Very good html structure.
- Good grouping of routes.
- Overall a very well made project, especially considered the time frame ⭐️
- User
- Username
- Password
- Is admin?
- Post
- Title
- Value
- Type
- Text/link
- User id
- Community
- Title
- Owner (user id)
- Vote
- Post id
- Comment id
- User id
- Up/down (true/false)
- Comment
- User id
- Text
- Post id -> post
- Parent id -> comment
- Post on community
- User id
- Post id
- Commnunity id
-
User
- Has Many
- Posts
- Comment
- Community
- Has Many
-
Post
- Has Many
- Comments
- Belongs to
- User
- Community
- Has Many
-
Community
- Has many
- Posts
- Belongs to
- User
- Has many
-
Comment
- Has many
- Comments
- Belongs to
- Post/comment
- User
- Has many
-
Vote
- Belongs to
- Post/Comment
- Belongs to
- Users
- Admin (?)
- Can delete posts
- Profile page, public
- Posts
- Comments (?)
- Settings for own user.
- Update
- Password
- Update
- Admin (?)
- "Communties"
- Can visited seperate from front page
- Can only see posts from that community
- User can delete
- Posts
- Text/link
- Upvote/Downvote
- Comment
- Upvote/downvote
- Delete
- Delete
- User can create
- User can follow
- Posts from followed communties on front page
- Can visited seperate from front page
- Front page
- Sort by most upvoted last 24hr
- Search
- Communities
- User
- Post (?)
- Sort by controversial
- Many upvotes and downvotes
- No mods on communties
- Only super user