Coder Social home page Coder Social logo

duckpond's Introduction

Duckpond

Simple Reddit clone written in Laravel 9. Demo screenshots available here.

Built by

Install guide

  1. Clone the repository

    •   git clone https://github.com/theo0165/duckpond
      
        cd duckpond
  2. Create .env file

    •   cp .env.example .env
  3. Update .env with your own values.

  4. Install dependencies for php and node.js

    •   npm install
        composer install
  5. Generate application key

    •   php artisan key:generate
  6. Run migrations and populate database for testing

    •   php artisan migrate:fresh --seed
    • This will take up to 30 seconds
  7. Start dev servers

    •   npm run dev
        php artisan serve
  8. Visit the website on http://localhost:8000

Code Review

Code review written by Christopher, Oliver & Sophie.

  1. No installation guide (during time of code review)
  2. CreateReplayController :15 : $data as a variable name could be more specific.
  3. ShowUserController :12 : is this comment supposed to be there?
  4. GuestTest :328 : This test is in a comment, can be deleted since it’s not being used.
  5. In the table comments there is a column named parent_id, maybe specify more.
  6. All tests “includes” the faker class but it is never used.
  7. Most of the controllers have unused request classes.
  8. Comment on what q would be in search controller.
  9. A lot of files have the “boiler” code left.
  10. The code could benefit a lot from comments explaining more specific variables.
  11. DeleteCommentController.php:16 has commented dd left in code
  12. ShowPostController.php:13 do not use $request
  13. [minor]Controller/submit breaks structure with small letters
  14. StoreSubmitController.php:25 has commented dd left in code
  15. ShowUserProfileController.php:12 commented code left in prod
  16. UserFollowCommunityController.php $checkIfFollow-naming. Check if whats follow what?
  17. Maybe pagination on front page?
  18. Models/Comment.php:52 has some commented code
  19. Models/Post.php:25 has some commented code
  20. Good use of built in functions etc.
  21. Very good html structure.
  22. Good grouping of routes.
  23. Overall a very well made project, especially considered the time frame ⭐️

Tables/Models

  • User
    • Email
    • 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

Relationships

  • User

    • Has Many
      • Posts
      • Comment
      • Community
  • Post

    • Has Many
      • Comments
    • Belongs to
      • User
      • Community
  • Community

    • Has many
      • Posts
    • Belongs to
      • User
  • Comment

    • Has many
      • Comments
    • Belongs to
      • Post/comment
      • User
  • Vote

    • Belongs to
      • Post/Comment

Features

  • Users
    • Admin (?)
      • Can delete posts
    • Profile page, public
      • Posts
      • Comments (?)
      • Settings for own user.
        • Update
          • Password
          • Email
  • "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
  • Front page
    • Sort by most upvoted last 24hr
  • Search
    • Communities
    • User
    • Post (?)
  • Sort by controversial
    • Many upvotes and downvotes

Deliminations

  • No mods on communties
    • Only super user

duckpond's People

Contributors

chrs-m avatar patrikstaaf avatar theo0165 avatar

Stargazers

 avatar

Watchers

 avatar

duckpond's Issues

Demo/Screenshots

Hi,

thank you for creating this code...
Can you please attach a few demo screenshots or a working url?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.