if you want to run the project locally make sure you have installed Ruby and Bundler. to install Ruby go to ruby
if you want to run the project using docker make sure you have installed docker.
to install docker go to docker
to run the project using docker run the following command
docker compose -d upor pull the image from docker hub
docker pull iru44/rails-templatemake sure you pull the database image from docker hub as well
then run the following command
docker run -p 3000:3000 iru44/rails-templateif you want to run the project using kubernetes make sure you have installed minikube.
to install minikube go to minikube to install kubectl go to kubectl
git clone https://github.com/CLIuno/CLIuno-Rails-template.gitthen run the following command
bundle installafter installing the dependencies you can run the project using the following command to migrate the database
bin/rails db:migrate
bin/rails db:seedthen you run the project using the following command
bin/rails serverlist of features that already implemented:
| Status | Feature |
|---|---|
| ✅ | Auth routes |
| ✅ | User routes |
| ✅ | Role routes |
| ✅ | Post routes |
| ✅ | Comment routes |
| ✅ | Todo routes |
| ✅ | Follow routes |
| ✅ | CI/CD with GitHub Actions |
| ✅ | Logging |
| ✅ | Dockerize |
| [ ] | Kubernetes |
| ✅ | Soft delete |
| ✅ | SQLite database |
| ✅ | JWT authentication |
| ✅ | Token blacklisting |
| ✅ | CORS enabled |
| ✅ | Unit tests |
| [ ] | Fully documentation |
| ✅ | Postman collection just basic |
You will get more features if you buy the full version and you can use it for commercial purposes (contact me for more information)
| Status | Feature |
|---|---|
| ✅ | Vote routes |
| ✅ | Comment routes |
| ✅ | Permission routes |
| ✅ | Reacion routes |
| ✅ | Payment routes |
| ✅ | Notification routes |
| ✅ | Pagination |
| ✅ | Redis cache |
| ✅ | File upload |
| ✅ | Fully unit test |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | Register | POST | /api/v1/auth/register |
| ✅ | Login | POST | /api/v1/auth/login |
| ✅ | Logout | POST | /api/v1/auth/logout |
| ✅ | Refresh Token | POST | /api/v1/auth/refresh-token |
| ✅ | Check Token | POST | /api/v1/auth/check-token |
| ✅ | Change Password | POST | /api/v1/auth/change-password |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | Get Current User | GET | /api/v1/users/current |
| ✅ | Update Current User | PATCH | /api/v1/users/current |
| ✅ | Delete Current User | DELETE | /api/v1/users/current |
| ✅ | Get By Username | GET | /api/v1/users/username/:username |
| ✅ | Get User Posts | GET | /api/v1/users/posts |
| ✅ | Get User Role | GET | /api/v1/users/role |
| ✅ | List All Users | GET | /api/v1/users |
| ✅ | Get User By ID | GET | /api/v1/users/:id |
| ✅ | Admin Update User | PATCH | /api/v1/users/:id |
| ✅ | Admin Delete User | DELETE | /api/v1/users/:id |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | List Roles | GET | /api/v1/roles |
| ✅ | Create Role | POST | /api/v1/roles |
| ✅ | Get Role | GET | /api/v1/roles/:id |
| ✅ | Update Role | PATCH | /api/v1/roles/:id |
| ✅ | Delete Role | DELETE | /api/v1/roles/:id |
| ✅ | Users By Role | GET | /api/v1/roles/:id/users |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | List Posts | GET | /api/v1/posts |
| ✅ | Current User Posts | GET | /api/v1/posts/current-user |
| ✅ | Create Post | POST | /api/v1/posts |
| ✅ | Get Post | GET | /api/v1/posts/:id |
| ✅ | Update Post | PATCH | /api/v1/posts/:id |
| ✅ | Delete Post | DELETE | /api/v1/posts/:id |
| ✅ | Get Post Author | GET | /api/v1/posts/:id/user |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | List Comments | GET | /api/v1/posts/:post_id/comments |
| ✅ | Create Comment | POST | /api/v1/posts/:post_id/comments |
| ✅ | Update Comment | PATCH | /api/v1/posts/:post_id/comments/:id |
| ✅ | Delete Comment | DELETE | /api/v1/posts/:post_id/comments/:id |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | List Todos | GET | /api/v1/todos |
| ✅ | Current User Todos | GET | /api/v1/todos/current-user |
| ✅ | Create Todo | POST | /api/v1/todos |
| ✅ | Get Todo | GET | /api/v1/todos/:id |
| ✅ | Update Todo | PATCH | /api/v1/todos/:id |
| ✅ | Delete Todo | DELETE | /api/v1/todos/:id |
| ✅ | Toggle Todo | PATCH | /api/v1/todos/:id/toggle |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | Follow User | POST | /api/v1/follows/:user_id/follow |
| ✅ | Unfollow User | DELETE | /api/v1/follows/:user_id/follow |
| ✅ | Get Followers | GET | /api/v1/follows/:user_id/followers |
| ✅ | Get Following | GET | /api/v1/follows/:user_id/following |
| ✅ | Is Following | GET | /api/v1/follows/:user_id/is-following |
| ✅ | Database Factory | ||
| ✅ | Make use of Enums | ||
| ✅ | GraphQL (Optional) | ||
| ✅ | Postman collection extra | ||
| ✅ | Postgres database or MongoDB |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| ✅ | Login | POST | /api/v1/auth/login |
| [ ] | Register | POST | /api/v1/auth/register |
| [ ] | Logout | POST | /api/v1/auth/logout |
| ✅ | Reset Password | POST | /api/v1/auth/reset-password |
| ✅ | Forgot Password | POST | /api/v1/auth/forgot-password |
| ✅ | Change Password | POST | /api/v1/auth/change-password |
| ✅ | Send Verification Email | POST | /api/v1/auth/send-verify-email |
| ✅ | Verify Email | POST | /api/v1/auth/verify-email |
| [ ] | Check Token | POST | /api/v1/auth/check-token |
| [ ] | Refresh Token | POST | /api/v1/auth/refresh-token |
| ✅ | Verify OTP | POST | /api/v1/auth/otp/verify |
| ✅ | Disable OTP | POST | /api/v1/auth/otp/disable |
| ✅ | Validate OTP | POST | /api/v1/auth/otp/validate |
| ✅ | Generate OTP | POST | /api/v1/auth/otp/generate |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| [ ] | Get all current user | GET | /api/v1/users/current |
| [ ] | Get user by username | GET | /api/v1/users/username/:username |
| [ ] | Get all users | GET | /api/v1/users |
| [ ] | Get a user by ID | GET | /api/v1/users/:id |
| [ ] | Update user by ID | PATCH | /api/v1/users/:id |
| [ ] | Delete user by ID | DELETE | /api/v1/users/:id |
| [ ] | Get permissions by user | GET | /api/v1/users/:user_id/permissions |
| [ ] | Get posts by user | GET | /api/v1/users/:user_id/posts |
| [ ] | Get roles by user | GET | /api/v1/users/:user_id/roles |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| [ ] | Get all roles | GET | /api/v1/roles |
| [ ] | Get role by ID | GET | /api/v1/roles/:id |
| [ ] | Create a role | POST | /api/v1/roles |
| [ ] | Update role by ID | PATCH | /api/v1/roles/:id |
| [ ] | Delete role by ID | DELETE | /api/v1/roles/:id |
| [ ] | Get permissions by role | GET | /api/v1/roles/:role_id/permissions |
| [ ] | Get users by role | GET | /api/v1/roles/:role_id/users |
| Status | Endpoint Description | Method | Path |
|---|---|---|---|
| [ ] | Get all current user posts | GET | /api/v1/posts/current-user |
| [ ] | Get all posts | GET | /api/v1/posts |
| [ ] | Get post by ID | GET | /api/v1/posts/:id |
| [ ] | Create a post | POST | /api/v1/posts |
| [ ] | Update post by ID | PATCH | /api/v1/posts/:id |
| [ ] | Delete post by ID | DELETE | /api/v1/posts/:id |
| [ ] | Get users by post | GET | /api/v1/posts/:post_id/user |
