{"id":26926476,"url":"https://github.com/pa4080/promptopia","last_synced_at":"2025-07-29T14:10:53.019Z","repository":{"id":176268498,"uuid":"655245264","full_name":"pa4080/promptopia","owner":"pa4080","description":"Share AI Prompts - Next.js App Router, MongoDB, Tailwind, Typescript","archived":false,"fork":false,"pushed_at":"2024-05-03T10:28:15.000Z","size":3998,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T03:35:16.327Z","etag":null,"topics":["mongodb","mongose","next-auth","next-intl","nextjs13","reactjs","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://promptopia.metalevel.tech","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pa4080.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":"2023-06-18T10:27:34.000Z","updated_at":"2025-01-17T17:27:04.000Z","dependencies_parsed_at":"2023-09-06T12:55:47.707Z","dependency_job_id":"bf8a2776-5eb8-4ff5-9a76-8afb58288efc","html_url":"https://github.com/pa4080/promptopia","commit_stats":null,"previous_names":["metalevel-tech/exc-nextjs-2023-shared-prompts","metalevel-tech/prj-nextjs-promptopia-shared-propmpts","pa4080/prj-nextjs-promptopia-shared-propmpts","pa4080/promptopia"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pa4080/promptopia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa4080%2Fpromptopia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa4080%2Fpromptopia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa4080%2Fpromptopia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa4080%2Fpromptopia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pa4080","download_url":"https://codeload.github.com/pa4080/promptopia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa4080%2Fpromptopia/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267701290,"owners_count":24130447,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["mongodb","mongose","next-auth","next-intl","nextjs13","reactjs","tailwindcss","typescript"],"created_at":"2025-04-02T03:32:19.373Z","updated_at":"2025-07-29T14:10:52.984Z","avatar_url":"https://github.com/pa4080.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js 13 Full Course 2023\n\n_Platform that serves as a hub for exchanging AI prompts in a format similar to blog posts._\n\n[![image](public/images/promptopia-screenshot-1.png)](https://promptopia.metalevel.tech/)\n\n**_Fullstack \u003cs\u003eCRUD\u003c/s\u003e REST App with Next.js, MongoDB, Tailwind CSS, and TypeScript_**\n\nThis project is based on [**Next.js 13 Full Course 2023 | Build and Deploy a Full Stack App Using the Official React Framework**](https://youtu.be/wm5gMKuwSYk), with the following objectives:\n\n- Next.js 13 App Folder Structure\n- Next.js 13 Client Components vs Server Components\n- Next.js 13 File-based Routing (including dynamic and nested routes)\n- Next.js 13 page, layout, loading, and error Special Files\n- Next.js 13 Serverless Route Handlers (Next API, Full Stack Apps)\n- Next.js 13 Metadata and Search Engine Optimization (SEO)\n- Three ways to fetch data in Next.js:\n  - Server Side Rendering (SSR),\n  - Static Site Generation (SSG)\n  - Incremental Static Generation (ISR)\n\nNotes:\n\n- **This is a [TypeScript](https://www.typescriptlang.org/) implementation of the tutorial.**\n- Another feature that is implemented here is the [Internationalization](https://next-intl-docs.vercel.app/docs/next-13) support. It is enabled via `middleware.ts` as it is described in the official documentation. It is possible to use the client components or the (beta) server side rendering.\n  If one prefers they can setup [`next-i18next`](https://github.com/i18next/next-i18next) instead.\n\n  _Currently the we are supporting only English language, but the project is ready to be extended to support more languages._\n\n- Many improvements and added features as:\n\n  - Two major Prompt/Posts categories: 1) Chats and 2) Images.\n    - For the Chat category one may attach a link to a shared chat...\n    - For the Image category one may upload an image...\n\nReferences:\n\n- \u003chttps://github.com/adrianhajdin/project_next_13_ai_prompt_sharing\u003e\n- \u003chttps://gist.github.com/adrianhajdin/6df61c6cd5ed052dce814a765bff9032\u003e\n- \u003chttps://nextjs.org/docs\u003e\n- \u003chttps://next-intl-docs.vercel.app/docs/next-13\u003e\n- \u003chttps://www.npmjs.com/package/slugify\u003e\n- [**_Setting the properties in an object parameter to optional \u003e Set the entire object parameter to optional_**](https://bobbyhadz.com/blog/typescript-function-optional-parameters#setting-the-properties-in-an-object-parameter-to-optional)\n- \u003chttps://pagespeed.web.dev/analysis/https-promptopia-metalevel-tech/n0pcgydmgq?form_factor=mobile\u003e\n\nThis is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n\n## UseForm\n\n```bash\nnpm i react-hook-form\n```\n\n- \u003chttps://mui.com/material-ui/react-text-field/#complementary-projects\u003e\n- **\u003chttps://react-hook-form.com/get-started\u003e**\n- \u003chttps://codesandbox.io/s/react-hook-form-with-ui-library-ts-forked-qjgkx?file=/src/index.tsx:582-594\u003e\n- \u003chttps://codevoweb.com/form-validation-react-hook-form-material-ui-react/\u003e\n\n## Shadcn-UI\n\nBeautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source. **Re-usable components built using _Radix UI_ and _Tailwind CSS_.** This is NOT a component library. It's a collection of re-usable components that you can copy and paste into your apps.\n\n- \u003chttps://youtu.be/7MKEOfSP2s4\u003e - An example how to implement the [`\u003cSkeleton /\u003e`](./app/components/ui/skeleton.tsx) component, while fetch data from the [RAWG](https://rawg.io/) API. This example illustrate also ho to use Next.js 13 App Router [`loading.tsx`](./app/%5Blocale%5D/games/loading.tsx) component.\n- \u003chttps://ui.shadcn.com/\u003e\n- \u003chttps://www.radix-ui.com/\u003e\n\n### CLI\n\n**Use the CLI to add components to your project.** Use the `init` command to initialize dependencies for a new project. The `init` command installs dependencies, adds the cn util, _configures `tailwind.config.js`_, and CSS variables for the project.\n\n```bash\nnpx shadcn-ui init slugify\n```\n\nUse the `add` command to add components to your project and installs all required dependencies.\n\n```bash\nnpx shadcn-ui add [component]\n```\n\nRun the add command without any arguments to view a list of all available components:\n\n```bash\nnpx shadcn-ui add\n```\n\n## TailWind CSS\n\n- \u003chttps://tailwindcss.com/docs/align-items\u003e\n- \u003chttps://marketplace.visualstudio.com/items?itemName=dimitribarbot.tailwind-styled-components-extractor\u003e\n- \u003chttps://github.com/ben-rogerson/twin.macro\u003e\n- (\u003chttps://dev.to/dbshanks/an-efficient-react-tailwindcss-styled-components-workflow-458m\u003e)\n\nPlugins:\n\n- [Flowbite (quick start)](https://flowbite.com/docs/getting-started/quickstart/) used for the [radio buttons](https://flowbite.com/docs/forms/radio/).\n\n## NextAuth (GoogleProvider) and Google OAuth\n\n- \u003chttps://next-auth.js.org/getting-started/example\u003e\n- \u003chttps://next-auth.js.org/configuration/initialization#route-handlers-app\u003e\n- \u003chttps://next-auth.js.org/getting-started/typescript\u003e\n- \u003chttps://next-auth.js.org/providers/google\u003e\n- \u003chttps://youtu.be/wm5gMKuwSYk?t=4800\u003e\n- **\u003chttps://www.youtube.com/watch?v=w2h54xz6Ndw\u003e**\n- \u003chttps://console.cloud.google.com/apis/credentials/\u003e\n- \u003chttps://next-auth.js.org/configuration/options#options\u003e (`NEXTAUTH_SECRET`)\n- **\u003chttps://codevoweb.com/setup-and-use-nextauth-in-nextjs-13-app-directory/\u003e**\n  - \u003chttps://codevoweb.com/setup-and-use-nextauth-in-nextjs-13-app-directory/#implement-the-nextauth-authentication-code\u003e\n  - \u003chttps://codevoweb.com/setup-and-use-nextauth-in-nextjs-13-app-directory/#different-ways-to-protect-routes\u003e\n- **\u003chttps://next-intl-docs.vercel.app/docs/routing/middleware#example-auth-js\u003e**\n\n...Access blocked: This app’s request is invalid:\n\n- \u003chttps://youtu.be/wm5gMKuwSYk?t=6217\u003e\n- \u003chttps://next-auth.js.org/getting-started/rest-api#getpost-apiauthcallbackprovider\u003e\n  `/api/auth/callback/:provider` \u003e `/api/auth/callback/google` \u003e In the google's OAuth2.0 configuration\n- \u003chttps://console.cloud.google.com/apis/credentials/oauthclient/\u003e\n\n## MongoDB\n\n```bash\nnpm i bcrypt mongodb mongoose next-auth\n```\n\nReferences:\n\n- [Next.js and MongoDB integration exercise repository](https://github.com/metalevel-tech/exc-nextjs-2023-with-mongodb-example)\n- [How to Integrate Vercel \u0026 MongoDB Step-by-Step: YouTube](https://youtu.be/JIlYroSsInU)\n- \u003chttps://www.mongodb.com/atlas\u003e\n- \u003chttps://youtu.be/wm5gMKuwSYk?t=5285\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa4080%2Fpromptopia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpa4080%2Fpromptopia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa4080%2Fpromptopia/lists"}