{"id":15770365,"url":"https://github.com/c-ehrlich/auth-api-prisma","last_synced_at":"2025-03-31T11:43:11.269Z","repository":{"id":134325553,"uuid":"471050914","full_name":"c-ehrlich/auth-api-prisma","owner":"c-ehrlich","description":"Auth API using Prisma","archived":false,"fork":false,"pushed_at":"2022-03-18T20:17:53.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-05T14:40:52.121Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/c-ehrlich.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-17T16:07:17.000Z","updated_at":"2022-03-17T16:07:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bb9716a-fef4-467c-ae72-028f1d4b0fe8","html_url":"https://github.com/c-ehrlich/auth-api-prisma","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fauth-api-prisma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fauth-api-prisma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fauth-api-prisma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fauth-api-prisma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-ehrlich","download_url":"https://codeload.github.com/c-ehrlich/auth-api-prisma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465212,"owners_count":20781914,"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":[],"created_at":"2024-10-04T14:40:40.530Z","updated_at":"2025-03-31T11:43:11.210Z","avatar_url":"https://github.com/c-ehrlich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth API (Prisma)\n\n## What is this?\nAn authentication API with JWTs using Express, TypeScript, and Zod.\n\nThis version uses MongoDB/Mongoose/TypeGoose for the database. I also built the same app but using Postgres/Prisma. You can find that [here](https://github.com/c-ehrlich/auth-api-mongoose).\n\nThe MongoDB version is based on this video: [Tom Does Tech - Build an Authentication API with Node.js, TypeScript, Typegoose, ExpressJS \u0026 Zod](https://www.youtube.com/watch?v=qylGaki0JhY)\n\nThe main point was to have a well structured boilerplate with good structure, schema validation, etc. that I could base future projects on. While there are many ways it can be improved in the future, I'm happy with it for now as a starting point.\n\n## What did I learn?\nThe main point of this was to get hands on with Prisma, so I learned a lot about how it's different from both Mongo/Mongoose and from other SQL ORMs I've used in the past - most importantly the Django ORM. The biggest pro of Prisma to me is that relations need to be defined in both directions (ie on each model), which I believe will make the models much easier to read for others in the future. So far the biggest downside I've found is that building pre/post save hooks is a bit clumsy compared to other ORMs, but it seems there is a lot of discussion about this in the Prisma repo.\n\n## What is missing?\n* The biggest issue is that there currently isn't a real mailserver - it's just using nodemailer to send the \"emails\" to the terminal. Other than that it's fully functional.\n* The password reset codes are currently not time limited - in the future I would like to add a reset expiration data so that each code can only be used for 15 minutes, or whatever amount of time is deemed appropriate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-ehrlich%2Fauth-api-prisma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-ehrlich%2Fauth-api-prisma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-ehrlich%2Fauth-api-prisma/lists"}