diff --git a/.env b/.env index 195967ea4..25d69693c 100644 --- a/.env +++ b/.env @@ -1,13 +1,28 @@ +<<<<<<< HEAD # Public Environment Variables NEXT_PUBLIC_CURRENCY=$ -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY='' +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_bGl2ZS1hYXJkdmFyay02MC5jbGVyay5hY2NvdW50cy5kZXYk # Private Environment Variables -CLERK_SECRET_KEY='' -MONGODB_URI='' -INNGEST_SIGNING_KEY='' -INNGEST_EVENT_KEY='' +CLERK_SECRET_KEY=sk_test_tic1QW0yRTTTIa9c6mlTC0dpF0c8w8EdrR9MfqqpA4 +MONGODB_URI='mongodb+srv://greatstack:greatstack123@cluster0.vqereny.mongodb.net' +INNGEST_SIGNING_KEY='signkey-prod-04ae332277151b22de5311c38e3c055c5fb516e5921798440ebb7605a37541c8' +INNGEST_EVENT_KEY='4W2DR61mPbC280Yc7jaiPjL5eTgN0CzP2BDNvP3NGhgh5fF_KUkjihEj_Q24HK5hoUs6_40rAYfBi7go4wKSzg' # Cloudinary CLOUDINARY_CLOUD_NAME ='' CLOUDINARY_API_KEY ='' +======= +# Public Environment Variables +NEXT_PUBLIC_CURRENCY=$ +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_bGl2ZS1hYXJkdmFyay02MC5jbGVyay5hY2NvdW50cy5kZXYk + +# Private Environment Variables +CLERK_SECRET_KEY=sk_test_tic1QW0yRTTTIa9c6mlTC0dpF0c8w8EdrR9MfqqpA4 +MONGODB_URI='mongodb+srv://greatstack:greatstack123@cluster0.vqereny.mongodb.net' +INNGEST_SIGNING_KEY='signkey-prod-04ae332277151b22de5311c38e3c055c5fb516e5921798440ebb7605a37541c8' +INNGEST_EVENT_KEY='4W2DR61mPbC280Yc7jaiPjL5eTgN0CzP2BDNvP3NGhgh5fF_KUkjihEj_Q24HK5hoUs6_40rAYfBi7go4wKSzg' +# Cloudinary +CLOUDINARY_CLOUD_NAME ='' +CLOUDINARY_API_KEY ='' +>>>>>>> 2f308bd55c846f45d5ab3b4d5e2e859747899682 CLOUDINARY_API_SECRET ='' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1b7a73ab0..cec3e6e88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,41 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -# .env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +# .env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7ac4bb10a..5f673e497 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,128 +1,128 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit or reject -comments, commits, code, wiki edits, issues and other contributions that are -not aligned to this Code of Conduct and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -greatstackdev@gmail.com. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit or reject +comments, commits, code, wiki edits, issues and other contributions that are +not aligned to this Code of Conduct and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +greatstackdev@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc57e4f1b..6e68f96af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,55 +1,55 @@ -# Contributing to QuickCart - -Thank you for considering contributing to **QuickCart** -We welcome contributions from everyone whether it's fixing a bug, adding a new feature or improving the design. - ---- - -## How to Contribute - -1. **Fork** the repo -2. **Create a new branch** (example: `git checkout -b feature/added-about-page`) -3. **Make your changes** (UI, animations, pages, etc.) -4. **Commit and push** -5. **Open a Pull Request (PR)** - ---- - -## Development Setup - -- Use **Next.js** and **Tailwind CSS** -- Run `npm run dev` for local development -- Keep code **clean, modular and reusable** -- Prefer functional components and hooks -- Follow existing folder structure and naming conventions - ---- - -## Contribution Guidelines - -- **Small, Focused PRs** → Don’t bundle unrelated changes in one PR -- **Commit Messages** → Use clear and descriptive messages (e.g., `feat: add product card animation`) -- **Code Style** → Run Prettier/ESLint (if configured) before committing -- **Accessibility** → Keep UI components accessible whenever possible -- **Discussions First** → For large changes (new features, big design changes), open an issue before creating a PR -- **Respect Others** → Follow the [Code of Conduct](./CODE_OF_CONDUCT.md) - ---- - -## Ideas for Contribution - -You can: -- Create new pages -- Improve layouts -- Add animations and transitions -- Enhance responsiveness -- Refactor components -- Suggest new UI/UX ideas -- Add themes or color variations -- Introduce accessibility improvements -- Add filtering/search features -- Improve documentation - ---- - +# Contributing to QuickCart + +Thank you for considering contributing to **QuickCart** +We welcome contributions from everyone whether it's fixing a bug, adding a new feature or improving the design. + +--- + +## How to Contribute + +1. **Fork** the repo +2. **Create a new branch** (example: `git checkout -b feature/added-about-page`) +3. **Make your changes** (UI, animations, pages, etc.) +4. **Commit and push** +5. **Open a Pull Request (PR)** + +--- + +## Development Setup + +- Use **Next.js** and **Tailwind CSS** +- Run `npm run dev` for local development +- Keep code **clean, modular and reusable** +- Prefer functional components and hooks +- Follow existing folder structure and naming conventions + +--- + +## Contribution Guidelines + +- **Small, Focused PRs** → Don’t bundle unrelated changes in one PR +- **Commit Messages** → Use clear and descriptive messages (e.g., `feat: add product card animation`) +- **Code Style** → Run Prettier/ESLint (if configured) before committing +- **Accessibility** → Keep UI components accessible whenever possible +- **Discussions First** → For large changes (new features, big design changes), open an issue before creating a PR +- **Respect Others** → Follow the [Code of Conduct](./CODE_OF_CONDUCT.md) + +--- + +## Ideas for Contribution + +You can: +- Create new pages +- Improve layouts +- Add animations and transitions +- Enhance responsiveness +- Refactor components +- Suggest new UI/UX ideas +- Add themes or color variations +- Introduce accessibility improvements +- Add filtering/search features +- Improve documentation + +--- + We're excited to see your contributions 🚀 \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 1c0872c3c..192ad7c46 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,9 +1,9 @@ -MIT License - -Copyright (c) 2025 GreatStackDev - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of the Software and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +MIT License + +Copyright (c) 2025 GreatStackDev + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of the Software and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index a01e2bd17..679fb0f2d 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,69 @@ -# QuickCart - A simple eCommerce website - -QuickCart is an open-source **Next.js eCommerce frontend** project. -It provides a modern, fast and customizable shopping UI. -This repo is **frontend only** – contributors can improve the design, add new pages, animations and more. - ---- - -## Features - -- Built with **Next.js + Tailwind CSS** -- Responsive design -- Reusable components -- Customizable layouts and colors -- Open for contributions (UI/UX, animations, themes, layouts etc.) - ---- - -## Getting Started - -1. Clone the repo - - ```bash - git clone https://github.com/GreatStackDev/QuickCart.git - cd QuickCart - ``` - -2. Install dependencies - - ```bash - npm install - ``` - -3. Run locally - - ```bash - npm run dev - ``` - ---- - -## Contributing - -We welcome all kinds of contributions! You can: - -- Create new pages -- Improve layouts -- Add animations and transitions -- Enhance responsiveness -- Refactor components -- Suggest new UI/UX ideas -- Add themes or color variations -- Introduce accessibility improvements -- Add filtering/search features -- Improve documentation - -Check out [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines. - ---- - -## License - -This project is licensed under the **MIT License**. - ---- - -## 🌟 Contributors - +# QuickCart - A simple eCommerce website + +QuickCart is an open-source **Next.js eCommerce frontend** project. +It provides a modern, fast and customizable shopping UI. +This repo is **frontend only** – contributors can improve the design, add new pages, animations and more. + +--- + +## Features + +- Built with **Next.js + Tailwind CSS** +- Responsive design +- Reusable components +- Customizable layouts and colors +- Open for contributions (UI/UX, animations, themes, layouts etc.) + +--- + +## Getting Started + +1. Clone the repo + + ```bash + git clone https://github.com/GreatStackDev/QuickCart.git + cd QuickCart + ``` + +2. Install dependencies + + ```bash + npm install + ``` + +3. Run locally + + ```bash + npm run dev + ``` + +--- + +## Contributing + +We welcome all kinds of contributions! You can: + +- Create new pages +- Improve layouts +- Add animations and transitions +- Enhance responsiveness +- Refactor components +- Suggest new UI/UX ideas +- Add themes or color variations +- Introduce accessibility improvements +- Add filtering/search features +- Improve documentation + +Check out [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines. + +--- + +## License + +This project is licensed under the **MIT License**. + +--- + +## 🌟 Contributors + Thanks to everyone who contributes to **QuickCart**! \ No newline at end of file diff --git a/app/api/inngest/route.js b/app/api/inngest/route.js new file mode 100644 index 000000000..7061514be --- /dev/null +++ b/app/api/inngest/route.js @@ -0,0 +1,10 @@ +import { serve } from "inngest/next"; +import { inngest, sy, syncUserCreation } from "@/config/inngest"; + +// Create an API that serves zero functions +export const { GET, POST, PUT } = serve({ + client: inngest, + functions: [ + syncUserCreation, syncUserUpdate, syncUserDeletion + ], +}); \ No newline at end of file diff --git a/app/layout.js b/app/layout.js index 9a70a3e83..46f0ec89f 100644 --- a/app/layout.js +++ b/app/layout.js @@ -2,6 +2,7 @@ import { Outfit } from "next/font/google"; import "./globals.css"; import { AppContextProvider } from "@/context/AppContext"; import { Toaster } from "react-hot-toast"; +import { ClerkProvider } from "@clerk/nextjs"; const outfit = Outfit({ subsets: ['latin'], weight: ["300", "400", "500"] }) @@ -12,6 +13,7 @@ export const metadata = { export default function RootLayout({ children }) { return ( + @@ -20,5 +22,6 @@ export default function RootLayout({ children }) { + ); } diff --git a/components/Navbar.jsx b/components/Navbar.jsx index ed1f4b58e..a0cff8b7d 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -1,14 +1,16 @@ "use client" import React from "react"; -import { assets} from "@/assets/assets"; +import { assets, BagIcon, BoxIcon, CartIcon, HomeIcon} from "@/assets/assets"; import Link from "next/link" import { useAppContext } from "@/context/AppContext"; import Image from "next/image"; +import { userAgent } from "next/server"; +import { useClerk, UserButton } from "@clerk/nextjs"; const Navbar = () => { - const { isSeller, router } = useAppContext(); - + const { isSeller, router } = useAppContext() + const {opnenSignIn} = useClerk() return (