Skip to content

Conversation

@ayclqt
Copy link
Contributor

@ayclqt ayclqt commented Dec 1, 2025

Added public folder to Vercel recipes and warning if users don't have it in README.MD

Summary by CodeRabbit

  • Documentation
    • Clarified that a public folder with static files is required for deployments.
    • Added a caution that omitting a public folder can cause the deployment to serve project root files, potentially exposing sensitive source files.

✏️ Tip: You can customize this high-level summary in your review settings.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ayclqt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the clarity and security guidance within the Vercel deployment documentation. It introduces a crucial detail about the public folder requirement, which is essential for proper static file serving and protecting application source code from unintended exposure during deployment.

Highlights

  • Vercel Deployment Documentation: Updated the vercel/README.md to specify the requirement of a public folder for Vercel deployments of Go Fiber applications. This ensures static files are served correctly and prevents accidental exposure of source code.
  • Security Warning: Added a caution note to the README.md explaining that if a public folder is not present, Vercel will serve all project files, including sensitive source code, which could pose a security risk.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the README.md for the Vercel example to include a crucial requirement for a public folder. It correctly warns users that without this folder, Vercel might expose all project files, including source code. My feedback includes a suggestion to make the warning message even more explicit about the security risk to prevent any potential misinterpretation. Overall, this is a valuable documentation improvement.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated Vercel README to require a public folder with static files and added a caution that omitting the public folder may cause Vercel to serve project root files, potentially exposing source code.

Changes

Cohort / File(s) Summary
Documentation update
vercel/README.md
Added a requirement to include a public folder containing one or more static files and a caution/warning that without a public folder Vercel may serve project root files, which could expose sensitive source code.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Review focus: wording accuracy and clarity of the caution block; ensure no unintended guidance about deployment behavior.

Poem

🐰 I tucked my files in public tight,
So Vercel serves the static light.
No wandering eyes on code so deep,
Safe hops and builds before I sleep. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating the README to include a public folder requirement for Vercel, which aligns with the summary of adding a public folder declaration and caution warning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36024d4 and c0ab1a2.

📒 Files selected for processing (1)
  • vercel/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ReneWerner87
Repo: gofiber/recipes PR: 0
File: :0-0
Timestamp: 2024-11-26T20:05:15.793Z
Learning: For future contributions to the `gofiber/recipes` repository, ensure that the tasks outlined in `.github/CONTRIBUTING.md` are incorporated, including creating a new directory without a "fiber" prefix, adding a `README.md` with Docusaurus metadata, and updating the overview by running `make generate`.
🔇 Additional comments (1)
vercel/README.md (1)

22-24: Documentation change appropriately incorporates security guidance.

The requirement for a public folder and the corresponding caution block clearly communicate the security implications. The wording matches the suggested phrasing from the previous review feedback, explicitly mentioning "sensitive files like your source code."

Please verify that:

  1. The public folder exists in the repository at vercel/public/
  2. The relative link [public](public) resolves correctly when the README is viewed on GitHub

If the public folder is expected to be created by users during setup, consider adding clarification to the Requirements section—for example: "A folder named public (create one if it doesn't exist) with one or more static files to be served."

Additionally, consider adding the public folder to the Project Structure section (around line 31) to make the repository layout explicit.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🧹 Nitpick comments (2)
vercel/README.md (2)

26-30: Add public folder to Project Structure.

The Project Structure section should include the newly required public folder for completeness and clarity. Once you confirm the folder exists, update this section:

 ## Project Structure

 - `api/index.go`: The main entry point for the serverless function.
 - `vercel.json`: Configuration file for Vercel.
 - `go.mod`: The Go module file.
+- `public/`: Static files served by Vercel.

32-43: Add guidance on creating the public folder in Setup.

Users should understand how to create and populate the public folder as part of the setup. Consider adding a step:

 ## Setup

 1. Clone the repository:
     ```bash
     git clone https://github.com/gofiber/recipes.git
     cd recipes/vercel
     ```

+2. Create the public folder with static files:
+    ```bash
+    mkdir -p public
+    echo "Hello from Vercel!" > public/index.html
+    ```
+
-2. Install the dependencies:
+3. Install the dependencies:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec1e83a and 36024d4.

📒 Files selected for processing (1)
  • vercel/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ReneWerner87
Repo: gofiber/recipes PR: 0
File: :0-0
Timestamp: 2024-11-26T20:05:15.793Z
Learning: For future contributions to the `gofiber/recipes` repository, ensure that the tasks outlined in `.github/CONTRIBUTING.md` are incorporated, including creating a new directory without a "fiber" prefix, adding a `README.md` with Docusaurus metadata, and updating the overview by running `make generate`.
🔇 Additional comments (1)
vercel/README.md (1)

22-24: Remove references to the public folder requirement—this content does not exist in the file.

The review comment references lines 22-24 containing a public folder requirement and caution block, but the current vercel/README.md does not include this content. The Requirements section (lines 17-21) lists only Go, Git, and Vercel CLI. The Project Structure (lines 23-27) lists only api/index.go, vercel.json, and go.mod. The public folder does not exist in the vercel directory.

If adding a public folder requirement to this documentation is intended, that change should be proposed separately in the PR. However, as currently written, this review comment addresses non-existent code.

Likely an incorrect or invalid review comment.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ReneWerner87 ReneWerner87 merged commit 82f6c0d into gofiber:master Dec 1, 2025
4 checks passed
@welcome
Copy link

welcome bot commented Dec 1, 2025

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants