A mini version of the website we all love and enjoy
- Signup & login to your account
- Create subs of your interest
- Create posts in the sub
Go to the website Here
- First, clone this repo to your local mechine with git command.
git clone https://github.com/YatoAki/reddit-mini
- Go to the cloned source code dictionary.
cd ./reddit-mini
- Install the required gems
bundle install
- Migrate the database
rails db:migrate
- Run the rails server
rails server
- Go to
http://localhost:3000/
in your broswer
- By using the password-hashing function called Bcrypt, we were able to minimize dataleak by only keep hashed version of passwords
- We allow users to login by giving session token as cookie
- username, password_digest (hashed password), session_token
- has many posts, subs
- name, detail
- belongs to moderator
- has many posts
- title, content
- belongs to author, sub
- new, create
- create, new, destroy
- create, new, destroy, index, show, edit, update
- create, destroy, show
- Upvote & downvote
- Comments