{"id":21802032,"url":"https://github.com/amitkhare/adonis-jwt-api-starter","last_synced_at":"2026-04-06T06:03:49.127Z","repository":{"id":42361394,"uuid":"133461763","full_name":"amitkhare/adonis-jwt-api-starter","owner":"amitkhare","description":"Boilerplate for creating a JWT API server in AdonisJs with vuejs as backend.","archived":false,"fork":false,"pushed_at":"2023-04-20T10:41:23.000Z","size":14336,"stargazers_count":41,"open_issues_count":0,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-27T11:24:58.337Z","etag":null,"topics":["adonisjs","api","authentication","boilerplate","javascript","nodejs","vuejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitkhare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T05:05:47.000Z","updated_at":"2024-06-24T02:24:01.000Z","dependencies_parsed_at":"2023-02-10T14:46:11.040Z","dependency_job_id":null,"html_url":"https://github.com/amitkhare/adonis-jwt-api-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amitkhare/adonis-jwt-api-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitkhare%2Fadonis-jwt-api-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitkhare%2Fadonis-jwt-api-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitkhare%2Fadonis-jwt-api-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitkhare%2Fadonis-jwt-api-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitkhare","download_url":"https://codeload.github.com/amitkhare/adonis-jwt-api-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitkhare%2Fadonis-jwt-api-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266071519,"owners_count":23871940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adonisjs","api","authentication","boilerplate","javascript","nodejs","vuejs"],"created_at":"2024-11-27T11:22:22.581Z","updated_at":"2025-12-30T01:26:24.774Z","avatar_url":"https://github.com/amitkhare.png","language":"JavaScript","funding_links":[],"categories":["AdonisJS"],"sub_categories":[],"readme":"\n# Welcome to AdonisJS JWT\n\nThis is the boilerplate for creating an API server in AdonisJs, it comes pre-configured with.\n\n1. Bodyparser\n2. Authentication\n\t-    authorise,\n\t-    signup,\n\t-    verify email,\n\t-    forgot password,\n\t-    resend email verification,\n\t-    refresh token,\n\t-    me (current user info except password),\n\t-    my tokens (current user's auth tokens)\n3. CORS\n4. Lucid ORM\n5. Migrations and seeds\n5. Translations\n\n## Setup\n\nUse the adonis command to install the blueprint\n\n```bash\nadonis new starter --blueprint=amitkhare/adonis-jwt-api-starter\n```\n\nor manually clone the repo and then run `npm install`.\n\n\n### Configs\n- Setup database configs in `ROOT/.env`\n- Setup Mail server config in `ROOT/.env`\n- *[optional]* Set `APP_SUPERADMIN_EMAIL` in `ROOT/.env` *[ This will ensure bypass email varification for this email address.]*\n\n\u003e Feel free to change `ROOT/.env` PORT, APP_* or any other variable according to your needs.\n\n\n### Migrations\nRun the following command to run startup migrations.\n\n```js\nadonis migration:run\n```\n\n### Run\n```js\nadonis serve --dev\n```\n\n# AUTH API Endpoints\n\n## Endpoints with JSON response\n\n| method   | endpoint | request   | response   | needs auth   |\n| ------------ | ------------ | ------------ | ------------ | ------------ |\n| POST  | /api/auth/authorise  |  [email, password] |  jwt and refresh token  | no  |\n| POST  | /api/auth/signup  |  [username, email, password] |  jwt and refresh token  | no  |\n| GET  | /api/auth/revoke/token  |  { refreshToken=\u003c TOKEN \u003e, isRevokeAll=true/false, isRemove=true/false } |  message  | yes |\n| POST  | /api/auth/resend/email/verification/code  |  [email] |  message  | no  |\n| POST |  /api/auth/forgot/password | [email] |  message/ sends email  | no  |\n| POST |  /api/auth/reset/password | [token, password] |  message  | no  |\n| POST |  /api/auth/refresh/token | [refresh_token] |  jwt and new refresh token   | no  |\n| POST |  /api/auth/update/password | [password, newPassword] |  message  | yes  |\n| POST |  /api/auth/update/email | [password, email] |  message  | yes  |\n| POST |  /api/auth/assign/role | [userId, role] |  message  | yes (Super Admin)  |\n| POST |  /api/auth/remove/user/:id | [id] |  message  | yes (Super Admin)  |\n| GET |  /api/auth/users  |  ?page=1 (query param) |  paginated users list  | yes (Manager Level)  |\n| GET |  /api/auth/toggle/user/ban/:id  |  [id] | message | yes (Super Admin)  |\n| GET |  /api/auth/confirm/email/:token  |  token (as param) |  message  | no  |\n| GET |  /api/auth/me | NONE |  Current User Info except password   | yes  |\n| GET |  /api/auth/my/tokens | NONE |  Current User Tokens   | yes  |\n\n## Endpoints with HTML View\n\n| method   | endpoint | request   | response   | needs auth   |\n| ------------ | ------------ | ------------ | ------------ | ------------ |\n| GET |  /api/auth/view/confirm/email/:token | NONE |  HTML View   | no  |\n| GET |  /api/auth/view/reset/password/:token | NONE |  HTML View   | no  |\n\n# PROFILE API Endpoints\n\n## Endpoints with JSON response\n\n| method   | endpoint | request   | response   | needs auth   |\n| ------------ | ------------ | ------------ | ------------ | ------------ |\n| GET |  /api/profile  |  NONE |  user profile  | yes  |\n| POST |  /api/profile/update  |  [first_name, last_name] |  message  | yes(verified)  |\n| POST |  /api/profile/update/avatar  |  file[avatar] |  message  | yes(verified)  |\n\n# LOG API Endpoints\n\n## Endpoints with JSON response\n\n| method   | endpoint | request   | response   | needs auth   |\n| ------------ | ------------ | ------------ | ------------ | ------------ |\n| GET |  /api/logs  |  ?page=1 (query param) |  Paginated Logs  | yes  |\n| GET |  /api/logs/remove/:id  |  id (as param) |  message (remove log by id)  | yes [admin level]  |\n| GET |  /api/logs/clear/all  |  NONE | message (clears all logs)  | yes [admin level]  |\n\n\n# FEATURES/ TODO\n## AUTH endpoint\n- [x] Authorise\n- [x] Signup\n- [x] revokeToken\n- [x] Forgot Password\n- [x] Verify Email\n- [x] Resend Email\n- [x] Refresh Token\n- [x] List User Tokens\n- [x] Level Based Restriction middleware\n  - [x] `jwtAuth` (All authenticated users)\n  - [x] `JwtAuthVerified` (Only verified users)\n  - [x] `jwtAuthMember` (Member level and followings )\n  - [x] `jwtAuthModerator` (Moderator level and followings )\n  - [x] `jwtAuthManager` (Manager level and followings )\n  - [x] `jwtAuthAdmin` (Admin and Super Admin only)\n  - [x] `jwtAuthSuperAdmin` (Super Admin only)\n- [x] User Details (except password)\n- [x] Update Email\n- [x] Update Password\n- [x] Assign auth level to user\n- [x] List Users\n- [x] Remove User\n- [x] Toggle User Ban\n- [x] Translations\n\n## PROFILE endpoint\n- [x] Profile\n- [x] Update Profile\n- [x] Auto fetch avatar during user signup (with email)\n- [x] Update Avatar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitkhare%2Fadonis-jwt-api-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitkhare%2Fadonis-jwt-api-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitkhare%2Fadonis-jwt-api-starter/lists"}