{"id":18614895,"url":"https://github.com/andrewjbateman/next-prisma-postgres","last_synced_at":"2026-04-19T04:34:30.217Z","repository":{"id":96860746,"uuid":"381333898","full_name":"AndrewJBateman/next-prisma-postgres","owner":"AndrewJBateman","description":":clipboard: Next.js app with Prisma backend","archived":false,"fork":false,"pushed_at":"2021-07-01T08:20:22.000Z","size":319,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T01:34:27.715Z","etag":null,"topics":["dockerfile","nextjs","postgresql","prisma","prisma-client"],"latest_commit_sha":null,"homepage":"next-prisma-postgres.vercel.app","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/AndrewJBateman.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":"2021-06-29T11:01:34.000Z","updated_at":"2023-06-18T06:50:28.000Z","dependencies_parsed_at":"2023-04-16T06:33:11.637Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/next-prisma-postgres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/next-prisma-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-prisma-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-prisma-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-prisma-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-prisma-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/next-prisma-postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-prisma-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31995126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dockerfile","nextjs","postgresql","prisma","prisma-client"],"created_at":"2024-11-07T03:27:21.709Z","updated_at":"2026-04-19T04:34:30.195Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","readme":"# :zap: Next Prisma Postgres\n\n* A Full-stack app using a Next.js + Semantic UI frontend with a Prisma ORM and Docker Postgres instance database backend\n* Code from CodingAndCaffeine with modifications - see :clap: Inspiration below\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/next-prisma-postgres?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/next-prisma-postgres?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/next-prisma-postgres?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/next-prisma-postgres?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Next API Data](#zap-next-api-data)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General Info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General Info\n\n* User enters their data in a Semantic UI table: names, email etc.\n* User data stored in a postgres database.\n* Postgres instance started using docker-compose YAML file\n* Prisma used for Node.js and Typescript Object Relational Mapping (ORM) for the PostgreSQL database\n* Next.js used for frontend is for server-rendered react apps. It has automatic code splitting, simple page-based routing, built-in CSS support and hot reloading. Every component file in the pages folder is treated as a page\n\n## :camera: Screenshots\n\n![Example screenshot](./img/home.png).\n\n## :signal_strength: Technologies\n\n* [Node.js v14](https://nodejs.org/) javascript runtime using the [Chrome V8 engine](https://v8.dev/).\n* [React v17](https://reactjs.org/) Javascript library.\n* [Next v11](https://nextjs.org/) minimalist framework for rendering react apps on the server.\n* [Semantic UI React v2](https://react.semantic-ui.com/) React version of [Semantic User Interface](https://semantic-ui.com/)\n* [Docker Engine - Community v20](https://hub.docker.com/) for Windows\n* [Docker Compose](https://docs.docker.com/compose/) used to define and run a container using a YAML Docker file\n* [Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-gb/windows/wsl/install-win10) - note: this will not work on Windows 10 Home as it does not have Hyper-V. There are ways to get round this with virtual terminals etc. but I never got them to work. This project was done on Windows Pro.\n* [Prisma v2](https://www.prisma.io/)\n* [Prisma CLI v2](https://www.prisma.io/docs/concepts/components/prisma-cli/installation)\n* [TablePlus for Windows](https://tableplus.com/windows) database management\n\n## :floppy_disk: Setup\n\n* `npm run dev` runs the app in the development mode. Open [http://localhost:3000](http://localhost:3000) to view it in the browser.\n* `npm run build` builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\n\n## :computer: Code Examples\n\n* `create.ts` to save user data using Prisma\n\n```tsx\n  import { NextApiRequest, NextApiResponse } from \"next\"\nimport prisma from \"../../lib/prisma\";\n\nconst userResponse = async (req: NextApiRequest, res: NextApiResponse) =\u003e {\n  if (req.method !== 'POST') {\n    return res.status(405).json({\n      message: 'Only POST method allowed'\n    });\n  }\n\n  try {\n    const { user } = req.body;\n    const savedUser = await prisma.user.create({\n      data: user\n    });\n    res.status(200).json(savedUser);\n  } catch (error) {\n    res.status(400).json({ \n      message: 'An error occured',\n      error: error\n   })\n  }\n}\n\nexport default userResponse;\n```\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Nothing\n\n## :clap: Inspiration\n\n* [CodingAndCaffeine: Getting started with Prisma, Next.js \u0026 Postgres | FullStack Application](https://www.youtube.com/watch?v=2rslnyHksqg)\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnext-prisma-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fnext-prisma-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnext-prisma-postgres/lists"}