{"id":20745287,"url":"https://github.com/ev0clu/next-blog","last_synced_at":"2026-04-09T17:03:44.726Z","repository":{"id":203275148,"uuid":"707687834","full_name":"ev0clu/next-blog","owner":"ev0clu","description":"Fullstack (Next.js) Blog App","archived":false,"fork":false,"pushed_at":"2024-01-19T14:17:43.000Z","size":418,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T02:41:22.943Z","etag":null,"topics":["api","bcryptjs","markdown","mongodb","next-auth","nextjs","prisma-orm","react-hook-form","react-hook-forms","react-icons","simplemde","tailwindcss","typescript","zod","zod-validation"],"latest_commit_sha":null,"homepage":"https://next-blog-eight-azure.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/ev0clu.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":"2023-10-20T12:46:35.000Z","updated_at":"2024-03-11T19:12:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"69bfb6ca-2281-411a-8147-cefe9463ad6a","html_url":"https://github.com/ev0clu/next-blog","commit_stats":null,"previous_names":["ev0clu/next-blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev0clu%2Fnext-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev0clu%2Fnext-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev0clu%2Fnext-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev0clu%2Fnext-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ev0clu","download_url":"https://codeload.github.com/ev0clu/next-blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243039609,"owners_count":20226131,"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":["api","bcryptjs","markdown","mongodb","next-auth","nextjs","prisma-orm","react-hook-form","react-hook-forms","react-icons","simplemde","tailwindcss","typescript","zod","zod-validation"],"created_at":"2024-11-17T07:19:28.652Z","updated_at":"2025-12-30T19:15:45.715Z","avatar_url":"https://github.com/ev0clu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Next.js Blog**\n\nA basic blog app has built with Next.js framework. The app allows users to log in in order to write comments under any posts.\n\n### Demo: [Link](https://next-blog-eight-azure.vercel.app/)\n\n## Features\n\n- Allow user to register, log in and log out\n- Only logged in users have rights to write comments\n- Only users with admin rights can create a new post\n- User with admin rights can remove/update posts and comments\n- User without admin rigths can remove/update comments which have written by himself/herself\n- Posts and comments update date has shown\n- Next.js used for CSR and SSR\n- MongoDB used to store users, posts and comments informations\n- Prisma ORM is used\n- Bcrypt.js used to hash the user password\n- Zod used for validation\n- Render-as-you-fetch approach is used for Loading screen\n- Hosted on Vercel\n- Responsive design\n\n## How to run from local repository\n\n1. Clone the repository\n2. Run `npm install` command in your terminal\n3. Set up MongoDB database\n   Create .env file and add enviromental variables: open ssl key should generate to NEXTAUTH_SECRET\n4. Create .env file and add enviromental variables: open ssl key should generate to NEXTAUTH_SECRET\u003cbr\u003e\n   `DATABASE_URL=\"your-mongodb-connection-link\"`\u003cbr\u003e\n   `NEXTAUTH_SECRET=\"open-ssl-generated-key\"`\u003cbr\u003e\n   `CODE=\"3.1415\"`\n5. Run `npx prisma generate`\n6. Run `npm run dev` command in your terminal\n7. Server running at `http://localhost:3000/`\n\n### Useful links and informations\n\n- Open SSL key generation:\n  - You can use the following link to create open ssl key: `https://www.cryptool.org/en/cto/openssl` or you can install open ssl and generate key from terminal. To generate code you should run: `openssl rand -base64 32`\n- Tailwind `prose` and `typography` handling are needed for markdowns:\n  - [Stackoverflow](https://stackoverflow.com/questions/75706164/problem-with-tailwind-css-when-using-the-react-markdown-component)\n  - [TailwindCSS official plugin](https://tailwindcss.com/docs/typography-plugin)\n- Markdown editor needed to run in `use client` mode and need to be imported in dynamic to avoid navigator is not defined error:\n  - [Stackoverflow](https://stackoverflow.com/questions/77301109/next-navigation-giving-error-navigator-is-not-defined)\n  - [GitHub](https://github.com/RIP21/react-simplemde-editor/issues/30)\n- SimpleMDE usage, options:\n  - [Usage: GitHub](https://github.com/Ionaru/easy-markdown-editor#configuration)\n  - [Options: Github](https://github.com/RIP21/react-simplemde-editor)\n- React Hook Form usage with UI component needs to has `ref={null}` property to avoid ref warning:\n  - [Stackoverflow](https://stackoverflow.com/questions/67877887/react-hook-form-v7-function-components-cannot-be-given-refs-attempts-to-access)\n  - [GitHub](https://github.com/react-hook-form/react-hook-form/issues/3411)\n- Loading screen approaches (Fetch-than-render, Render-as-you-fetch, Suspense, ):\n  - [Medium.com](https://medium.com/jspoint/introduction-to-react-v18-suspense-and-render-as-you-fetch-approach-1b259551a4c0)\n  - [Linkedin.com](https://www.linkedin.com/pulse/fetch-then-render-render-as-you-fetch-fetch-on-render-amit-pal/)\n\n### Dependencies\n\n- [React](https://react.dev/)\n- [React DOM](https://www.npmjs.com/package/react-dom)\n- [React Icons](https://www.npmjs.com/package/react-icons)\n- [Typescript](https://www.typescriptlang.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Next.js](https://nextjs.org/)\n- [Next Auth](https://next-auth.js.org/)\n- [Prisma](https://www.prisma.io/)\n- [Prisma Adapter](https://authjs.dev/reference/adapter/prisma)\n- [bcrypt](https://www.npmjs.com/package/bcrypt)\n- [React Hook Form](https://react-hook-form.com/)\n- [@hookform/resolvers](https://www.npmjs.com/package/@hookform/resolvers)\n- [Zod](https://zod.dev/)\n- [SimpleMDE (EasyMDE)](https://www.npmjs.com/package/react-simplemde-editor)\n- [React Markdown](https://www.npmjs.com/package/react-markdown)\n- [date-fns](https://date-fns.org/)\n\n### Layout\n\n![layout1 picture](https://github.com/ev0clu/next-blog/blob/main/layout1.png?raw=true)\n![layout2 picture](https://github.com/ev0clu/next-blog/blob/main/layout2.png?raw=true)\n![layout3 picture](https://github.com/ev0clu/next-blog/blob/main/layout3.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev0clu%2Fnext-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fev0clu%2Fnext-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev0clu%2Fnext-blog/lists"}