Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Unkey-Next.js - Google Gemini Plant Identifier template [SIDE QUEST] #2607

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Khaan25
Copy link
Contributor

@Khaan25 Khaan25 commented Oct 29, 2024

What does this PR do?
Fixes #2150

Created a Google Gemini Plant Identifier app with Next.js 15 and protected the endpoint using Unkey. It uses Redis to store the the response returned from Gemini. We've a limit of 3 per 10 minutes. We've loading, error state, response output, image preview.

Link to the repo:
https://github.com/Khaan25/ai-plant-detector

Live link:

https://ai-plant-detector-zia-unkey.vercel.app/

Screenshots

image
image
image
image
image

Summary by CodeRabbit

  • New Features

    • Added a new project entry showcasing "Google Gemini Plant Identifier Nextjs API with Unkey" by Khaan25, enhancing examples of Unkey integration.
  • Documentation

    • Updated the project list to include the latest contribution, ensuring users have access to current open-source examples.

Copy link

changeset-bot bot commented Oct 29, 2024

⚠️ No Changeset found

Latest commit: 473f58e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 4:24pm

Copy link
Contributor

coderabbitai bot commented Oct 29, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request updates the document oss.gg/7_create_a_template.md by adding a new entry that highlights a project utilizing Unkey. The entry, contributed by Khaan25, is titled "Google Gemini Plant Identifier Nextjs API with Unkey" and includes a link to the corresponding GitHub repository. This update enhances the list of projects demonstrating the integration of Unkey across various frameworks.

Changes

File Change Summary
oss.gg/7_create_a_template.md Added new entry: 29-October-2024 by Khaan25 Google Gemini Plant Identifier Nextjs API with Unkey

Assessment against linked issues

Objective Addressed Explanation
Add new contributions to the project list (2150)

Possibly related issues

Possibly related PRs

Suggested labels

🕹️ oss.gg, :joystick: 750 points, hacktoberfest

Suggested reviewers

  • mcstepp
  • chronark
  • perkinsjr
  • MichaelUnkey

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

vercel bot commented Oct 29, 2024

@Khaan25 is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Oct 29, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
oss.gg/7_create_a_template.md (1)

43-43: Update framework name to use official spelling.

The framework name should be written as "Next.js" instead of "Nextjs" to maintain consistency with official branding.

Apply this change:

-» 29-October-2024 by Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaan25/ai-plant-detector)
+» 29-October-2024 by Khaan25 [Google Gemini Plant Identifier Next.js API with Unkey](https://github.com/Khaan25/ai-plant-detector)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~43-~43: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7322cef and 27c341c.

📒 Files selected for processing (1)
  • oss.gg/7_create_a_template.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
oss.gg/7_create_a_template.md

[uncategorized] ~43-~43: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

Comment on lines +43 to +44
» 29-October-2024 by Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaan25/ai-plant-detector)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Repository does not meet side quest requirements

The verification reveals several issues with the submitted repository:

  • Missing LICENSE file which is a required component
  • README.md contains only the default Next.js template content without any project-specific documentation
  • No evidence of Google Gemini or Unkey integration as claimed in the title
  • Repository appears to be a basic Next.js starter template without the promised functionality
🔗 Analysis chain

Verify repository meets side quest requirements.

Let's verify that the linked repository meets all the requirements specified in the side quest.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the repository meets the side quest requirements

# Test 1: Check if repository exists and is public
echo "Checking repository accessibility..."
gh repo view Khaan25/ai-plant-detector

# Test 2: Check for README.md and LICENSE
echo "Checking for required files..."
gh api repos/Khaan25/ai-plant-detector/contents/README.md
gh api repos/Khaan25/ai-plant-detector/contents/LICENSE

# Test 3: Check if this is a unique template
echo "Checking for duplicate templates..."
rg -i "plant.*identifier|plant.*detect" 

Length of output: 5076

🧰 Tools
🪛 LanguageTool

[uncategorized] ~43-~43: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
oss.gg/7_create_a_template.md (1)

69-70: Use correct framework naming: "Next.js" instead of "Nextjs"

Please update the framework name to follow the official spelling:

-» 29-October-2024 by Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaan25/ai-plant-detector)
+» 29-October-2024 by Khaan25 [Google Gemini Plant Identifier Next.js API with Unkey](https://github.com/Khaan25/ai-plant-detector)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~69-~69: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 27c341c and 473f58e.

📒 Files selected for processing (1)
  • oss.gg/7_create_a_template.md (2 hunks)
🧰 Additional context used
🪛 Markdownlint
oss.gg/7_create_a_template.md

49-49: null
Spaces inside link text

(MD039, no-space-in-links)

🪛 LanguageTool
oss.gg/7_create_a_template.md

[uncategorized] ~69-~69: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

🔇 Additional comments (1)
oss.gg/7_create_a_template.md (1)

69-70: Repository does not meet side quest requirements

The previously identified issues with the repository remain unaddressed. Please refer to the earlier review comment for details about the missing LICENSE file, insufficient README documentation, and lack of integration evidence.

Let's verify if the issues have been addressed:

#!/bin/bash
# Description: Verify repository requirements

# Check for required files and content
gh api repos/Khaan25/ai-plant-detector/contents/LICENSE || echo "LICENSE still missing"
gh api repos/Khaan25/ai-plant-detector/contents/README.md | jq -r '.content' | base64 -d | grep -i "gemini\|unkey" || echo "README still lacks integration details"

# Check for integration evidence
rg -l "gemini|unkey" || echo "No evidence of claimed integrations found"
🧰 Tools
🪛 LanguageTool

[uncategorized] ~69-~69: The official spelling of this programming framework is “Next.js”.
Context: ...Khaan25 [Google Gemini Plant Identifier Nextjs API with Unkey](https://github.com/Khaa...

(NODE_JS)

@chronark
Copy link
Collaborator

please license it under MIT

@Khaan25
Copy link
Contributor Author

Khaan25 commented Oct 30, 2024

Done

@Khaan25
Copy link
Contributor Author

Khaan25 commented Oct 30, 2024

@chronark

@Khaan25
Copy link
Contributor Author

Khaan25 commented Oct 31, 2024

@chronark sorry to tag you again but today's last day so I'm trying to gather points

@unrenamed
Copy link
Contributor

unrenamed commented Oct 31, 2024

@Khaan25,here is another NextJS template created by @harshsbhat.

https://www.unkey.com/templates/cost-ratelimit

It's key idea is to showcase how you can ratelimit your AI powered application based on estimated cost. I'd love to hear how yours is novel, apart from using another popular AI service?

@Khaan25
Copy link
Contributor Author

Khaan25 commented Oct 31, 2024

Let @chronark decide because we've to create a template on how we can use unkey with particular framework. In my case, Rate limiting AI powered Plant Identifier app in nextjs. We're protecting the API route, if someone wants to build similar AI project, this starter kit may help him out.

@harshsbhat
Copy link
Contributor

Hey @Khaan25 , I am not the maintainer of this repo. Not sure about what's unique and how Andreas is planning to determine that. But I am pretty sure you need to add a repo-specific README.md for your repo. Currently, it only has the NextJS default README.md. Refer to any of the previous templates from https://www.unkey.com/templates . All of them have template specific README

@Khaan25
Copy link
Contributor Author

Khaan25 commented Oct 31, 2024

Yes, thank you for that. I've updated the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🕹️] SIDE QUESTS: https://go.unkey.com/ossgg-challenges
4 participants