created by @sulmanweb
- Docker
- Ruby 2.7.3
- Postgresql
-
Install Docker
-
In terminal run
docker compose up -d --build
-
After operation completes, run:
docker compose run web rails db:create
-
Finally run:
docker compose run web rails db:migrate
-
The app is available now at http://localhost:3000
-
To run the console run:
docker compose run web rails console
Sign Up
POST
http://localhost:3000/auth/sign_up
{
"email": "hello@hello.com",
"password": "abcd@1234",
"name": "Hello World"
}
Destroy Self User
DELETE
http://localhost:3000/auth/destroy
headers
Authorization: Bearer xxxxxxxxx
Empty Body
Sign In
POST
http://localhost:3000/auth/sign_in
{
"email": "hello@hello.com",
"password": "abcd@1234"
}
Validate Token
GET
http://localhost:3000/auth/validate_token
headers
Authorization: Bearer xxxxxxxxx
Sign Out
DELETE
http://localhost:3000/auth/sign_out
headers
Authorization: Bearer xxxxxxxxx
Confirm Email
GET
http://localhost:3000/auth/confirm_email
query params
token: xxxxxxxxx
Resend Confirmation Email
PUT
http://localhost:3000/auth/resend_confirm_email
headers
Authorization: Bearer xxxxxxxxx
Empty Body
Forgot Password Request
POST
http://localhost:3000/auth/forgot_password_email
{
"email": "hello@world.com"
}
Verify Forgot Password Token Received In Email
GET
http://localhost:3000/auth/verify_reset_password_email
query params
token: xxxxxxxxx
Change Password For Logged In User
PUT
http://localhost:3000/auth/reset_password
headers
Authorization: Bearer xxxxxxxxx
OR query params
token: xxxxxxxxx
{
"password": "abcd@1234",
"confirm_password": "abcd@1234"
}
MIT