Skip to content

CLIuno/CLIuno-Rails-template

Repository files navigation

Cliuno Ruby on rails template

logo

Installation

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 up

or pull the image from docker hub

docker pull iru44/rails-template

make sure you pull the database image from docker hub as well

then run the following command

docker run -p 3000:3000 iru44/rails-template

if 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

Clone the repository

git clone https://github.com/CLIuno/CLIuno-Rails-template.git

then run the following command

bundle install

Usage

after installing the dependencies you can run the project using the following command to migrate the database

bin/rails db:migrate
bin/rails db:seed

then you run the project using the following command

bin/rails server

Features

list 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

Premium features

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

list of endpoints

Auth

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

Users

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

Roles

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

Posts

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

Comments

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

Todos

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

Follows

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

list of endpoints

Auth

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

Users

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

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

Posts

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

About

Under Cliuno Tool

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Sponsor this project

 

Contributors