{"id":13782014,"url":"https://github.com/yann-yinn/adonis-starter","last_synced_at":"2026-03-11T12:49:34.862Z","repository":{"id":46564288,"uuid":"405662135","full_name":"yann-yinn/adonis-starter","owner":"yann-yinn","description":"A Node.js / TypeScript / Postgres starter with ready-to-use users management (register, login, forgot password etc) to focus on building your new ideas. Built upon the excellent AdonisJS MVC Framework.","archived":false,"fork":false,"pushed_at":"2021-10-10T13:02:09.000Z","size":4525,"stargazers_count":72,"open_issues_count":3,"forks_count":15,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2026-01-03T15:27:39.069Z","etag":null,"topics":["adonisjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/yann-yinn.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":"2021-09-12T14:20:05.000Z","updated_at":"2025-12-17T09:40:31.000Z","dependencies_parsed_at":"2022-09-04T12:51:53.358Z","dependency_job_id":null,"html_url":"https://github.com/yann-yinn/adonis-starter","commit_stats":null,"previous_names":["yann-yinn/mvp-starter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yann-yinn/adonis-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yann-yinn%2Fadonis-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yann-yinn%2Fadonis-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yann-yinn%2Fadonis-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yann-yinn%2Fadonis-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yann-yinn","download_url":"https://codeload.github.com/yann-yinn/adonis-starter/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yann-yinn%2Fadonis-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30381733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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"],"created_at":"2024-08-03T18:01:32.024Z","updated_at":"2026-03-11T12:49:34.819Z","avatar_url":"https://github.com/yann-yinn.png","language":"TypeScript","funding_links":[],"categories":["Miscellaneous","TypeScript","AdonisJS"],"sub_categories":[],"readme":"# MVP starter\n\nA Node.js, TypeScript \u0026 postgres SQL starter built upon [Adonis JS](https://adonisjs.com) framework, with **ready-to-use users management system**, to focus on building your new ideas.\n\n🔋 Batteries included:\n\n- [x] Sign up form\n- [x] Sign in form\n- [x] Logout\n- [x] List / create / delete users in admin page\n- [x] Forgot password\n- [x] Email verification\n- [x] Roles and permissions with AdonisJS bouncers\n\n\u003cimg src=\"https://github.com/yann-yinn/adonis-starter/blob/main/screen.png\"/\u003e\n\n## Installation\n\nRequirements:\n\n- ⚠️ Latest release of Node.js 14, along with npm \u003e= 6.0.0.\n- A Postgres database.\n- An STMP server to send emails (you might use, for example, Mailgun, Sparkpot, Amazon SES)\n\n```sh\n# Check your node version\nnode -v\n# Check your npm version\nnpm -v\n\n# Clone the repo\n# stable branch, to start a new project\ngit clone -b main git@github.com:yann-yinn/adonis-starter.git\n# If you want to contribute: clone dev branch instead of main.\n# git clone -b dev git@github.com:yann-yinn/mvp-starter.git\n\n# Install dependencies\nnpm install\n\n# Configure your environment variables:\n#\n# 1) Generate your unique app id, you need this value for APP_KEY env var in .env.\nnode ace generate:key\n# 2) copy env.example file to create a \".env\" file\n# edit the env file and set required env vars.\ncp env.example .env\n\n# Create postgres tables\n npm run migrate-up\n\n# Launch dev server !\nnpm run dev\n```\n\n## Contribute\n\nFork **dev** branch and make a PR againts the **dev** branch.\n\n## Roles and Permissions\n\n### Adding new role\n\nYou can add new roles inside `config/roles.ts` file. By default, there is only \"root\", \"admin\" and \"member\" roles. Root role is special and MUST NOT be deleted. First created user became automatically a \"root\" user.\n\n```js\nimport { Role } from \"App/types\";\n\nconst roles: Role[] = [\n  // root is a special role and has all authorizations.\n  {\n    id: \"root\",\n    label: \"Root\",\n  },\n  // Member is the default role when someone creates a new account.\n  {\n    id: \"member\",\n    label: \"Member\",\n  },\n  // Admin can create / delete users, except the root user.\n  {\n    id: \"admin\",\n    label: \"Administrator\",\n  },\n];\nexport default roles;\n```\n\n### Definining authorizations\n\nMVP starter is using \"bouncers\" from Adonis JS framework to define authorizations.\n\nSee `start/bouncer.ts` File for predefined authorizations or to add new authorizations.\n\nExample bouncer: \"Admin role can edit any post. Member can only edit their own posts\":\n\n```ts\n.define(\"editPost\", (user: User, post: Post) =\u003e {\n  if (userHasRoles([\"admin\"], user)) {\n    return true;\n  }\n  if (userHasRoles([\"member\"], user) \u0026\u0026 user.id === post.userId) {\n    return true;\n  }\n  return false;\n})\n```\n\nThen, in your controller, use the defined bouncer like so (don't forget the **await** keyword!)\n\n```ts\npublic async edit({ view, request, bouncer }: HttpContextContract) {\n  const entity = await this.entityModel.findOrFail(request.param(\"id\"));\n  await bouncer.authorize(\"editPost\", entity);\n  // etc\n}\n```\n\nYou can control authorizations in the templates too:\n\n```html\n@can('editPost', entity)\n  \u003ca href=\"{{entity._editLink}}\"\u003eEdit\u003c/a\u003e \u003c/td\u003e\n@end\n```\n\nSee adonis docs on \"bouncers\" for more details: [https://docs.adonisjs.com/guides/authorization](https://docs.adonisjs.com/guides/authorization)\n\n## FAQ\n\n### POSTGRES SSL AND HEROKU\n\nFix SSL issue in development with postgres hosted with Heroku: configure `rejectUnauthorized` in your `config/database.ts` config file.\n\n```js\n// config/database.ts\nconnections: {\n  pg: {\n    client: \"pg\",\n    connection: {\n      ssl: {\n        rejectUnauthorized: Env.get(\"NODE_ENV\") === \"production\" ? true : false,\n      },\n      // ...\n```\n\n## Changelog\n\n- 5 oct. User is (optionnaly) blocked until his email is verified (thanks @Yoann-TYT)\n- 5 oct. Add \"root\" role, (default role for the very first registered user)\n- 5 otc. Add password validations rules\n- 5 oct. Show / Hide password (thanks @Sreejit7)\n- 5 oct. When user upload a new profile picture, delete the old one (thanks @Yoann-TYT)\n- nov. forgot password and mail verification (thanks @HugoLd)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyann-yinn%2Fadonis-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyann-yinn%2Fadonis-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyann-yinn%2Fadonis-starter/lists"}