This is a simple Blog WebApi that allows users to view posts and comments and interacte with each other, while Admin can manage all posts and comments and view them. The project is built using Ruby On Rails, ActiveRecord and mysql2 and jwt and bcrypt gems.
- CRUD operations for Posts.
- CRUD operations for Comments.
- CRUD operations for Users.
- CRUD operations for Roles.
- Authentication and Authorization operations for all Users.
- Ruby
- Ruby on rails
- mysql2 database
- jwt
- bcrypt
To get started with this project, follow these steps:
- Clone the repository to your local machine.
git clone https://github.com/seifhassan89/Blog
- Install Ruby and Ruby on Rails if you haven't already
gem install rails -v 5.0.1
- Run bundle install to install all required gems.
bundle install
1.to create the database run:
db:create
2.to run the database migrations run:
db:migrate
- Here is command to run your application:
rails s
You should now be able to access the application at http://localhost:3000.
The API endpoints can be tested using a tool such as Postman. The following endpoints are available:
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new feature branch.
- Make your changes.
- Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.