{"id":19574139,"url":"https://github.com/0mppula/nextjs-credits-starter-kit","last_synced_at":"2026-04-16T02:31:30.357Z","repository":{"id":255310183,"uuid":"847770872","full_name":"0mppula/nextjs-credits-starter-kit","owner":"0mppula","description":"Provides everything you need to quickly launch a new SaaS product or any other web application, allowing you to focus on what really matters.","archived":false,"fork":false,"pushed_at":"2024-09-03T07:50:21.000Z","size":2784,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T11:17:42.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextjs-credits-starter-kit.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/0mppula.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":"2024-08-26T14:11:22.000Z","updated_at":"2024-09-03T07:50:25.000Z","dependencies_parsed_at":"2024-08-29T08:25:44.254Z","dependency_job_id":null,"html_url":"https://github.com/0mppula/nextjs-credits-starter-kit","commit_stats":null,"previous_names":["0mppula/nextjs-credits-starter-kit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0mppula/nextjs-credits-starter-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mppula%2Fnextjs-credits-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mppula%2Fnextjs-credits-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mppula%2Fnextjs-credits-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mppula%2Fnextjs-credits-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0mppula","download_url":"https://codeload.github.com/0mppula/nextjs-credits-starter-kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mppula%2Fnextjs-credits-starter-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31868488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":[],"created_at":"2024-11-11T06:38:37.186Z","updated_at":"2026-04-16T02:31:30.336Z","avatar_url":"https://github.com/0mppula.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nextjs Credits Starter Kit\n\n\u003cdiv\u003e\n    \u003ca href=\"https://www.omarkraidie.com/projects\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/✨%20portfolio-1b1b1b?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.linkedin.com/in/omarkraidie/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/LinkedIn-%230073b1?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n## What is Nextjs Credits Starter Kit?\n\nThis starter kit provides everything you need to quickly launch a new SaaS product or any other web application, allowing you to focus on what really matters.\n\nThe starter kit is built with Next.js 14, providing a solid foundation for authentication using NextAuth, Prisma Adapter, and MongoDB. It utilizes TypeScript, React, and Shadcn-UI, with Tailwind CSS for styling. Key features include protected routes, theme switching, and a user account menu integrated into the navbar.\n\nFollow the instructions below to quickly set up this repository and start developing your app.\n\n### Key Features:\n\n-   **User Authentication**: Provides user data persistence using MongoDB.\n-   **Stripe Integration**: Full implementation for purchasing credits and saving individual payments to the database.\n-   **Landing Page Template**: Pre-built landing page to get you started.\n-   **Dashboard and Payment Pages**: Includes dashboard, payment success, and payment cancellation pages.\n-   **Theme Toggling**: Switch between light and dark themes.\n-   **Protected Routes**: Secure your application with protected routes.\n-   **Pricing Cards**: Ready-to-use pricing card components.\n\nIf you find this starter kit helpful, please consider starring ⭐ this repository!\n\n---\n\n## How to Set Up the Project Locally\n\n### Prerequisites\n\n-   Node.js version 18.18 or higher\n-   MongoDB database\n-   **Google Provider**: [Google Cloud](https://console.cloud.google.com/) project with an OAuth consent screen created.\n-   **GitHub Provider**: GitHub [OAuth App](https://github.com/settings/developers)\n-   **Stripe credentials**: Get started [here](https://stripe.com/)\n\n### Cloning the repository\n\n1. Clone the repository into a new directory.\n\n    ```shell\n    git clone https://github.com/0mppula/nextjs-credits-starter-kit.git\n    ```\n\n2. Install the required dependencies\n\n    ```shell\n    npm i\n    ```\n\n### Clone and rename the repository as your own\n\n1. Clone the repository into a new directory.\n\n    ```shell\n    git clone https://github.com/0mppula/nextjs-credits-starter-kit.git \u003cnew-repo-name\u003e\n    ```\n\n2. Navigate into the new directory.\n\n    ```shell\n    cd \u003cnew-repo-name\u003e\n    ```\n\n3. Remove the existing Git history.\n\n    ```shell\n    rm -rf .git\n    ```\n\n4. Initialize a new Git repository.\n\n    ```shell\n    git init\n    ```\n\n5. Add the `\u003cnew-repo-name\u003e` to your `package.json` files top level `name` before installing node modules.\n\n    ```json\n    {\n    \t\"name\": \"new-repo-name\"\n    }\n    ```\n\n6. Install the required dependencies\n\n    ```shell\n    npm i\n    ```\n\n### `.env` File Configuration\n\nIn the root of the project create an `.env` file and declare the following variables:\n\n```\n# MongoDB database connection string\nDATABASE_URL=mongodb+srv://\u003cUSERNAME\u003e:\u003cPASSWORD\u003e@\u003cHOST\u003e/\u003cDATABASE_NAME\u003e\n\n# Google OAuth\nGOOGLE_CLIENT_ID=\nGOOGLE_CLIENT_SECRET=\n\n# GitHub OAuth\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\n\nNEXTAUTH_SECRET=\n\n# Stripe\nSTRIPE_SECRET_KEY=\nNEXT_PUBLIC_STRIPE_PUBLIC_KEY=\n\n# stripe listen --forward-to localhost:3000/api/payments/webhook/stripe\nSTRIPE_WEBHOOK_SECRET=\n\n# Product price ids\nNEXT_PUBLIC_STRIPE_BASIC_PRICE_ID=\nNEXT_PUBLIC_STRIPE_PRO_PRICE_ID=\nNEXT_PUBLIC_STRIPE_PREMIUM_PRICE_ID=\n\n# Used for Stripe checkout session redirections\nFRONTEND_URL=http://localhost:3000\n```\n\nPopulate the variables with the corresponding data.\n\n### Setup Prisma\n\n1. Push the changes from the Prisma schema to the database\n\n    ```shell\n    npx prisma db push\n    ```\n\n2. Generate Prisma Client for type safety across the app.\n\n    ```shell\n    npx prisma generate\n    ```\n\n### Start the app\n\n```shell\nnpm run dev\n```\n\n### Forward Stripe events to your webhook\n\n```shell\nstripe listen --forward-to localhost:3000/webhook\n```\n\n## Available commands\n\nRunning commands with npm `npm run [command]`\n\n| command | description                                                                                      |\n| :------ | :----------------------------------------------------------------------------------------------- |\n| `dev`   | Starts a development instance of the app                                                         |\n| `lint`  | Runs ESLint to check for errors and warnings. Errors will fail the build, but warnings will not. |\n\n---\n\n## Tech Stack\n\n### Technologies\n\n-   **Next.js**: A React framework enabling server-side rendering and static site generation for high-performance web applications.\n-   **Tailwind CSS**: A utility-first CSS framework for rapidly creating custom designs directly in your markup.\n-   **MongoDB**: MongoDB is an open-source NoSQL database that stores data in flexible, JSON-like documents, allowing for scalable, high-performance data management and real-time data processing.\n-   **Prisma**: A next-generation ORM for Node.js and TypeScript that simplifies database access and management with an intuitive query API.\n-   **NextAuth**: A complete open-source authentication solution for Next.js applications.\n-   **Shadcn**: Different component/UI libraries used for design\n\n### Framework\n\n-   **Front-end Framework**: Next.js (v13.4.12)\n\n### UI\n\n-   **UI Library**: shadcn-ui\n-   **UI Styling**: tailwindcss (v3.4.1) with tailwindcss-animate (v1.0.7)\n-   **Theming**: next-themes (v0.3.0)\n-   **Icons**: react-icons (v5.3.0) \u0026 lucide-react (v0.434.0)\n-   **CSS Utility**: clsx (v2.1.1)\n-   **Class Variance Management**: class-variance-authority (v0.7.0)\n\n### Backend \u0026 Authentication\n\n-   **Prisma ORM**: @prisma/client (v5.18.0) with prisma (v5.18.0) as a dev dependency\n-   **User Authentication**: next-auth (v4.24.7) with prisma-adapter (v1.0.7)\n-   **TypeScript**: (v^5)\n-   **Type Definitions**: @types/node (v^20), @types/react (^18), @types/react-dom (v^18)\n\n---\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0mppula%2Fnextjs-credits-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0mppula%2Fnextjs-credits-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0mppula%2Fnextjs-credits-starter-kit/lists"}