{"id":23336015,"url":"https://github.com/yuiseki/next-auth-prisma-mongo-template","last_synced_at":"2025-04-09T20:52:11.129Z","repository":{"id":60099390,"uuid":"432626713","full_name":"yuiseki/next-auth-prisma-mongo-template","owner":"yuiseki","description":"The minimum Next.js template repository implemented Authentication and Persistence in MongoDB using NextAuth.js and Prisma.","archived":false,"fork":false,"pushed_at":"2025-04-05T19:09:46.000Z","size":1183,"stargazers_count":6,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T20:19:51.757Z","etag":null,"topics":["authentication","mongodb","nextauth","nextjs","prisma","template"],"latest_commit_sha":null,"homepage":"https://next-auth-prisma-mongo-demo.onrender.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuiseki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-28T05:26:26.000Z","updated_at":"2024-12-05T00:21:54.000Z","dependencies_parsed_at":"2023-10-14T22:16:54.428Z","dependency_job_id":"28d8182b-33fa-4e21-87e8-4a7a4c0a4ee8","html_url":"https://github.com/yuiseki/next-auth-prisma-mongo-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fnext-auth-prisma-mongo-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fnext-auth-prisma-mongo-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fnext-auth-prisma-mongo-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fnext-auth-prisma-mongo-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuiseki","download_url":"https://codeload.github.com/yuiseki/next-auth-prisma-mongo-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111959,"owners_count":21049577,"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":["authentication","mongodb","nextauth","nextjs","prisma","template"],"created_at":"2024-12-21T02:11:44.342Z","updated_at":"2025-04-09T20:52:11.102Z","avatar_url":"https://github.com/yuiseki.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template of Next.js + NextAuth.js + Prisma with MongoDB\n\n## What is this\n\nThe minimum Next.js template repository implemented Authentication and Persistence in MongoDB using NextAuth.js and Prisma.\n\n## How to use it\n\n- Click `Use this template` button on GitHub repository and create your new repository.\n- `git clone` your new repository.\n- `cp .env.sample .env` and Edit it.\n  - Hint: You can generate `NEXTAUTH_SECRET` value via `openssl rand -base64 32` command. https://next-auth.js.org/configuration/options#secret\n  - This template has implemented only Twitter provider authentication, So you should get Twitter Client ID and Client Secret at Twitter Developer Portal, But you can use other soo many providers that support NextAuth.js if you want. https://next-auth.js.org/providers/overview\n\nRun following commands:\n\n```\nnpm ci\nnpm i -g prisma\nprisma generate\n```\n\n### Notice\n\nWe don't need `prisma migrate` command because we are riding on the MongoDB!\n\n## Development with Docker\n\nAccording to the official documentation, Prisma require MongoDB replica set cluster even the development environment!!\n\nhttps://www.prisma.io/docs/concepts/database-connectors/mongodb#error-transactions-are-not-supported-by-this-deployment\n\nI believe it's making things crazy hard...\nBut thankfully, there is a workaround.\n\nhttps://github.com/prisma/prisma/issues/8266#issuecomment-966618742\n\n```\ndocker compose build\ndocker compose exec mongodb mongo --eval \"rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'mongodb:27017'}]});\"\ndocker compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuiseki%2Fnext-auth-prisma-mongo-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuiseki%2Fnext-auth-prisma-mongo-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuiseki%2Fnext-auth-prisma-mongo-template/lists"}