{"id":23439733,"url":"https://github.com/sanidhyy/duolingo-clone","last_synced_at":"2025-04-13T08:09:33.759Z","repository":{"id":229277279,"uuid":"774763649","full_name":"sanidhyy/duolingo-clone","owner":"sanidhyy","description":"Lingo - Interactive platform for language learning.","archived":false,"fork":false,"pushed_at":"2025-02-09T16:13:01.000Z","size":1310,"stargazers_count":254,"open_issues_count":0,"forks_count":116,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T08:09:19.924Z","etag":null,"topics":["ai","css","drizzle","duolingo","duolingo-clone","html","interactive","js","modern-ui","modern-ux","mysql","next","nextjs","postgresql","react","tailwindcss","typscript"],"latest_commit_sha":null,"homepage":"https://lingo-clone.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanidhyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["sanidhyy"],"patreon":"sanidhy","custom":"https://www.buymeacoffee.com/sanidhy"}},"created_at":"2024-03-20T06:18:34.000Z","updated_at":"2025-04-12T01:46:49.000Z","dependencies_parsed_at":"2024-03-23T07:36:44.111Z","dependency_job_id":"f12c1d3f-5c95-4706-bf98-4f9cddb60711","html_url":"https://github.com/sanidhyy/duolingo-clone","commit_stats":null,"previous_names":["sanidhyy/duolingo-clone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fduolingo-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fduolingo-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fduolingo-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanidhyy%2Fduolingo-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanidhyy","download_url":"https://codeload.github.com/sanidhyy/duolingo-clone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681492,"owners_count":21144700,"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":["ai","css","drizzle","duolingo","duolingo-clone","html","interactive","js","modern-ui","modern-ux","mysql","next","nextjs","postgresql","react","tailwindcss","typscript"],"created_at":"2024-12-23T15:33:34.633Z","updated_at":"2025-04-13T08:09:33.662Z","avatar_url":"https://github.com/sanidhyy.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sanidhyy","https://patreon.com/sanidhy","https://www.buymeacoffee.com/sanidhy"],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n# Lingo - Interactive platform for language learning.\n\n![Lingo - Interactive platform for language learning.](/.github/images/img_main.png \"Lingo - Interactive platform for language learning.\")\n\n[![Ask Me Anything!](https://flat.badgen.net/static/Ask%20me/anything?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy \"Ask Me Anything!\")\n[![GitHub license](https://flat.badgen.net/github/license/sanidhyy/duolingo-clone?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/blob/main/LICENSE \"GitHub license\")\n[![Maintenance](https://flat.badgen.net/static/Maintained/yes?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/commits/main \"Maintenance\")\n[![GitHub branches](https://flat.badgen.net/github/branches/sanidhyy/duolingo-clone?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/branches \"GitHub branches\")\n[![Github commits](https://flat.badgen.net/github/commits/sanidhyy/duolingo-clone?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/commits \"Github commits\")\n[![GitHub issues](https://flat.badgen.net/github/issues/sanidhyy/duolingo-clone?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/issues \"GitHub issues\")\n[![GitHub pull requests](https://flat.badgen.net/github/prs/sanidhyy/duolingo-clone?icon=github\u0026color=black\u0026scale=1.01)](https://github.com/sanidhyy/duolingo-clone/pulls \"GitHub pull requests\")\n[![Vercel status](https://img.shields.io/badge/Vercel-000000?style=for-the-badge\u0026logo=vercel\u0026logoColor=white)](https://lingo-clone.vercel.app/ \"Vercel status\")\n\n\u003c!-- Table of Contents --\u003e\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n# :notebook_with_decorative_cover: Table of Contents\n\n\u003c/summary\u003e\n\n- [Folder Structure](#bangbang-folder-structure)\n- [Getting Started](#toolbox-getting-started)\n- [Screenshots](#camera-screenshots)\n- [Tech Stack](#gear-tech-stack)\n- [Stats](#wrench-stats)\n- [Contribute](#raised_hands-contribute)\n- [Acknowledgements](#gem-acknowledgements)\n- [Buy Me a Coffee](#coffee-buy-me-a-coffee)\n- [Follow Me](#rocket-follow-me)\n- [Learn More](#books-learn-more)\n- [Deploy on Vercel](#page_with_curl-deploy-on-vercel)\n- [Give A Star](#star-give-a-star)\n- [Star History](#star2-star-history)\n- [Give A Star](#star-give-a-star)\n\n\u003c/details\u003e\n\n## :bangbang: Folder Structure\n\nHere is the folder structure of this app.\n\n```bash\nduolingo-clone/\n  |- actions/\n    |- challenge-progress.ts\n    |- user-progress.ts\n    |- user-subscription.ts\n  |- app/\n    |-- (main)/\n        |--- courses/\n        |--- leaderboard/\n        |--- learn/\n        |--- quests/\n        |--- shop/\n        |--- layout.tsx\n    |-- (marketing)/\n        |--- footer.tsx\n        |--- header.tsx\n        |--- layout.tsx\n        |--- page.tsx\n    |-- admin/\n        |--- challenge/\n        |--- challengeOption/\n        |--- course/\n        |--- lesson/\n        |--- unit/\n        |--- app.tsx\n        |--- page.tsx\n    |-- api/\n        |--- challengeOptions/\n        |--- challenges/\n        |--- courses/\n        |--- lessons/\n        |--- units/\n        |--- webhooks/stripe/\n    |-- lesson/\n        |--- [lessonId]/\n        |--- card.tsx\n        |--- challenge.tsx\n        |--- footer.tsx\n        |--- header.tsx\n        |--- layout.tsx\n        |--- page.tsx\n        |--- question-bubble.tsx\n        |--- quiz.tsx\n        |--- result-card.tsx\n    |-- apple-icon.png\n    |-- favicon.ico\n    |-- globals.css\n    |-- icon1.png\n    |-- icon2.png\n    |-- layout.tsx\n  |- components/\n    |-- modals/\n    |-- ui/\n    |-- feed-wrapper.tsx\n    |-- mobile-wrapper.tsx\n    |-- mobile-sidebar.tsx\n    |-- promo.tsx\n    |-- quests.tsx\n    |-- sidebar-item.tsx\n    |-- sidebar.tsx\n    |-- sticky-wrapper.tsx\n    |-- user-progress.tsx\n  |- config/\n    |-- index.ts\n  |- db/\n    |-- drizzle.ts\n    |-- queries.ts\n    |-- schema.ts\n  |- lib/\n    |-- admin.ts\n    |-- stripe.ts\n    |-- utils.ts\n  |- public/\n  |- scripts/\n    |-- prod.ts\n    |-- reset.ts\n    |-- seed.ts\n  |- store/\n    |-- use-exit-modal.ts\n    |-- use-hearts-modal.ts\n    |-- use-practice-modal.ts\n  |- types/\n    |-- canvas.ts\n  |- .env\n  |- .env.example\n  |- .eslintrc.js\n  |- .gitignore\n  |- .prettierrc.json\n  |- components.json\n  |- constants.ts\n  |- drizzle.config.ts\n  |- environment.d.ts\n  |- middleware.ts\n  |- next.config.mjs\n  |- package-lock.json\n  |- package.json\n  |- postcss.config.js\n  |- tailwind.config.ts\n  |- tsconfig.json\n```\n\n\u003cbr /\u003e\n\n## :toolbox: Getting Started\n\n1. Make sure **Git** and **NodeJS** is installed.\n2. Clone this repository to your local computer.\n3. Create `.env` file in **root** directory.\n4. Contents of `.env`:\n\n```env\n# .env\n\n# disabled next.js telemetry\nNEXT_TELEMETRY_DISABLED=1\n\n# clerk auth keys\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nCLERK_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n# neon db uri\nDATABASE_URL=\"postgresql://\u003cuser\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cpost\u003e/lingo?sslmode=require\"\n\n# stripe api key and webhook\nSTRIPE_API_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nSTRIPE_WEBHOOK_SECRET=whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n# public app url\nNEXT_PUBLIC_APP_URL=http://localhost:3000\n\n# clerk admin user id(s) separated by comma and space (, )\nCLERK_ADMIN_IDS=\"user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n# or CLERK_ADMIN_IDS=\"user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx, user_xxxxxxxxxxxxxxxxxxxxxx\" for multiple admins.\n\n```\n\n5. Obtain Clerk Authentication Keys\n\n   1. **Source**: Clerk Dashboard or Settings Page\n   2. **Procedure**:\n      - Log in to your Clerk account.\n      - Navigate to the dashboard or settings page.\n      - Look for the section related to authentication keys.\n      - Copy the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` provided in that section.\n\n6. Retrieve Neon Database URI\n\n   1. **Source**: Database Provider (e.g., Neon, PostgreSQL)\n   2. **Procedure**:\n      - Access your database provider's platform or configuration.\n      - Locate the database connection details.\n      - Replace `\u003cuser\u003e`, `\u003cpassword\u003e`, `\u003chost\u003e`, and `\u003cport\u003e` placeholders in the URI with your actual database credentials.\n      - Ensure to include `?sslmode=require` at the end of the URI for SSL mode requirement.\n\n7. Fetch Stripe API Key and Webhook Secret\n\n   1. **Source**: Stripe Dashboard\n   2. **Procedure**:\n      - Log in to your Stripe account.\n      - Navigate to the dashboard or API settings.\n      - Find the section related to API keys and webhook secrets.\n      - Copy the `STRIPE_API_SECRET_KEY` and `STRIPE_WEBHOOK_SECRET`.\n\n8. Specify Public App URL\n\n   1. **Procedure**:\n      - Replace `http://localhost:3000` with the URL of your deployed application.\n\n9. Identify Clerk Admin User IDs\n\n   1. **Source**: Clerk Dashboard or Settings Page\n   2. **Procedure**:\n      - Log in to your Clerk account.\n      - Navigate to the dashboard or settings page.\n      - Find the section related to admin user IDs.\n      - Copy the user IDs provided, ensuring they are separated by commas and spaces.\n\n10. Save and Secure:\n\n    - Save the changes to the `.env` file.\n\n11. Install Project Dependencies using `npm install --legacy-peer-deps` or `yarn install --legacy-peer-deps`.\n\n12. Run the Seed Script:\n\nIn the same terminal, run the following command to execute the seed script:\n\n```bash\nnpm run db:push \u0026\u0026 npm run db:prod\n```\n\nThis command uses `npm` to execute the Typescript file (`scripts/prod.ts`) and writes challenges data in database.\n\n13. Verify Data in Database:\n\nOnce the script completes, check your database to ensure that the challenges data has been successfully seeded.\n\n14. Now app is fully configured 👍 and you can start using this app using either one of `npm run dev` or `yarn dev`.\n\n**NOTE:** Please make sure to keep your API keys and configuration values secure and do not expose them publicly.\n\n## :camera: Screenshots\n\n![Modern UI/UX](/.github/images/img1.png \"Modern UI/UX\")\n\n![Quests](/.github/images/img2.png \"Quests\")\n\n![Shop](/.github/images/img3.png \"Shop\")\n\n## :gear: Tech Stack\n\n[![React JS](https://skillicons.dev/icons?i=react \"React JS\")](https://react.dev/ \"React JS\") [![Next JS](https://skillicons.dev/icons?i=next \"Next JS\")](https://nextjs.org/ \"Next JS\") [![Typescript](https://skillicons.dev/icons?i=ts \"Typescript\")](https://www.typescriptlang.org/ \"Typescript\") [![Tailwind CSS](https://skillicons.dev/icons?i=tailwind \"Tailwind CSS\")](https://tailwindcss.com/ \"Tailwind CSS\") [![Vercel](https://skillicons.dev/icons?i=vercel \"Vercel\")](https://vercel.app/ \"Vercel\") [![Postgresql](https://skillicons.dev/icons?i=postgres \"Postgresql\")](https://www.postgresql.org/ \"Postgresql\")\n\n## :wrench: Stats\n\n[![Stats for Lingo](/.github/images/stats.svg \"Stats for Lingo\")](https://pagespeed.web.dev/analysis?url=https://lingo-clone.vercel.app/ \"Stats for Lingo\")\n\n## :raised_hands: Contribute\n\nYou might encounter some bugs while using this app. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.\n\n## :gem: Acknowledgements\n\nUseful resources and dependencies that are used in Lingo.\n\n- Special Thanks to Kenney Assets: https://kenney.nl/\n- Freesound: https://freesound.org/\n- Elevenlabs AI: https://elevenlabs.io/\n- Flagpack: https://flagpack.xyz/\n\n- [@clerk/nextjs](https://www.npmjs.com/package/@clerk/nextjs): ^4.29.9\n- [@neondatabase/serverless](https://www.npmjs.com/package/@neondatabase/serverless): ^0.9.0\n- [@radix-ui/react-avatar](https://www.npmjs.com/package/@radix-ui/react-avatar): ^1.0.4\n- [@radix-ui/react-dialog](https://www.npmjs.com/package/@radix-ui/react-dialog): ^1.0.5\n- [@radix-ui/react-progress](https://www.npmjs.com/package/@radix-ui/react-progress): ^1.0.3\n- [@radix-ui/react-separator](https://www.npmjs.com/package/@radix-ui/react-separator): ^1.0.3\n- [@radix-ui/react-slot](https://www.npmjs.com/package/@radix-ui/react-slot): ^1.0.2\n- [class-variance-authority](https://www.npmjs.com/package/class-variance-authority): ^0.7.0\n- [clsx](https://www.npmjs.com/package/clsx): ^2.1.0\n- [dotenv](https://www.npmjs.com/package/dotenv): ^16.4.5\n- [drizzle-orm](https://www.npmjs.com/package/drizzle-orm): ^0.30.4\n- [lucide-react](https://www.npmjs.com/package/lucide-react): ^0.359.0\n- [next](https://www.npmjs.com/package/next): 14.1.4\n- [next-themes](https://www.npmjs.com/package/next-themes): ^0.3.0\n- [ra-data-simple-rest](https://www.npmjs.com/package/ra-data-simple-rest): ^4.16.12\n- [react](https://www.npmjs.com/package/react): ^18\n- [react-admin](https://www.npmjs.com/package/react-admin): ^4.16.13\n- [react-circular-progressbar](https://www.npmjs.com/package/react-circular-progressbar): ^2.1.0\n- [react-confetti](https://www.npmjs.com/package/react-confetti): ^6.1.0\n- [react-dom](https://www.npmjs.com/package/react-dom): ^18\n- [react-use](https://www.npmjs.com/package/react-use): ^17.5.0\n- [sonner](https://www.npmjs.com/package/sonner): ^1.4.32\n- [stripe](https://www.npmjs.com/package/stripe): ^14.22.0\n- [tailwind-merge](https://www.npmjs.com/package/tailwind-merge): ^2.2.2\n- [tailwindcss-animate](https://www.npmjs.com/package/tailwindcss-animate): ^1.0.7\n- [zustand](https://www.npmjs.com/package/zustand): ^4.5.2\n\n## :coffee: Buy Me a Coffee\n\n[\u003cimg src=\"https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black\" width=\"200\" /\u003e](https://www.buymeacoffee.com/sanidhy \"Buy me a Coffee\")\n\n## :rocket: Follow Me\n\n[![Follow Me](https://img.shields.io/github/followers/sanidhyy?style=social\u0026label=Follow\u0026maxAge=2592000)](https://github.com/sanidhyy \"Follow Me\")\n[![Tweet about this project](https://img.shields.io/twitter/url?style=social\u0026url=https%3A%2F%2Ftwitter.com%2FTechnicalShubam)](https://twitter.com/intent/tweet?text=Check+out+this+amazing+app:\u0026url=https%3A%2F%2Fgithub.com%2Fsanidhyy%2Fduolingo-clone \"Tweet about this project\")\n[![Subscribe to my YouTube Channel](https://img.shields.io/youtube/channel/subscribers/UCNAz_hUVBG2ZUN8TVm0bmYw)](https://www.youtube.com/@OPGAMER./?sub_confirmation=1 \"Subscribe to my YouTube Channel\")\n\n## :books: 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## :page_with_curl: 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 [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n\n## :star: Give A Star\n\nYou can also give this repository a star to show more people and they can use this repository.\n\n## :star2: Star History\n\n\u003ca href=\"https://star-history.com/#sanidhyy/duolingo-clone\u0026Timeline\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=sanidhyy/duolingo-clone\u0026type=Timeline\u0026theme=dark\" /\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=sanidhyy/duolingo-clone\u0026type=Timeline\" /\u003e\n  \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=sanidhyy/duolingo-clone\u0026type=Timeline\" /\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003cbr /\u003e\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanidhyy%2Fduolingo-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanidhyy%2Fduolingo-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanidhyy%2Fduolingo-clone/lists"}