-
Notifications
You must be signed in to change notification settings - Fork 502
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
chore: write-a-blog-on-example-app-exp #2087
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughWalkthroughThis pull request introduces a new blog post titled "Learn by building," which describes the author's experience in developing a web application for personal project management. It details the tools and technologies used, such as Auth.js, SQLite with Drizzle ORM, Next.js, and Unkey for rate limiting. Additionally, it includes new functionalities in the codebase, such as input validation with Zod, a rate-limited procedure in tRPC routes, and a controlled form schema. Changes
Possibly related PRs
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this 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)
apps/www/content/blog/learn-by-building.mdx (1)
15-45
: Informative overview of the project setup!This section provides a clear overview of the tools, technologies, and approach used for building the project. Starting with the database schema is a good practice, and using the T3 stack for initial setup can boost productivity.
One minor suggestion:
- The official spelling of the web framework is "Next.js" (with a dot).
Tools
LanguageTool
[uncategorized] ~30-~30: The official spelling of this programming framework is “Next.js”.
Context: ...- Auth.js - sqlite db and Drizzle ORM - NextJS - Unkey ratelimit protection I starte...(NODE_JS)
[grammar] ~37-~37: The word “setup” is a noun. The verb is spelled with a space.
Context: ...myself a good starting point to quickly setup and hit the ground running. I found tha...(NOUN_VERB_CONFUSION)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
apps/www/public/images/blog-images/covers/learn-by-building.png
is excluded by!**/*.png
apps/www/public/images/blog-images/learn-by-building/createt3.png
is excluded by!**/*.png
Files selected for processing (1)
- apps/www/content/blog/learn-by-building.mdx (1 hunks)
Additional context used
LanguageTool
apps/www/content/blog/learn-by-building.mdx
[uncategorized] ~30-~30: The official spelling of this programming framework is “Next.js”.
Context: ...- Auth.js - sqlite db and Drizzle ORM - NextJS - Unkey ratelimit protection I starte...(NODE_JS)
[grammar] ~37-~37: The word “setup” is a noun. The verb is spelled with a space.
Context: ...myself a good starting point to quickly setup and hit the ground running. I found tha...(NOUN_VERB_CONFUSION)
[grammar] ~52-~52: This is normally spelled as one word.
Context: ... about now. As usual, I was starting to over think the schema and layout and whatever else...(OVER_COMPOUNDS)
[misspelling] ~55-~55: This word is normally spelled with a hyphen.
Context: ...erience as it allowed me to think about self restraint and management. Just telling myself tha...(EN_COMPOUNDS_SELF_RESTRAINT)
[uncategorized] ~101-~101: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...s thing I need to worry about once setup so I can focus on the things that need to ...(COMMA_COMPOUND_SENTENCE)
[grammar] ~112-~112: After ‘it’, use the third-person verb form “takes”.
Context: ...`` Unkey makes this incredible easy it take a couple of steps to implement. I used ...(IT_VBZ)
[uncategorized] ~164-~164: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ke everyone else I hate bothering people but sometimes the best path forward to reac...(COMMA_COMPOUND_SENTENCE_2)
[typographical] ~168-~168: It appears that a comma is missing.
Context: .... ## Conclusion In making this project I learned a hell of a lot. I now have a m...(BY_FOR_IN_COMMA)
[typographical] ~168-~168: Consider adding a comma.
Context: ...ence, while docs will get you pretty far there is no substitute for another person to ...(IF_THERE_COMMA)
[typographical] ~168-~168: Consider adding a comma here.
Context: ...ore features to this in the future, but for now I have added the example into Unkey's t...(FOR_NOW_COMMA)
Additional comments not posted (4)
apps/www/content/blog/learn-by-building.mdx (4)
1-8
: LGTM!The blog post metadata follows the correct format and includes all necessary fields. The title, description, and tags are appropriate for the content. The image path is correct and the author field matches the post content.
64-80
: Effective use of Zod for input validation!The
getProjectsByCategory
procedure demonstrates a good use of Zod for input validation. The procedure correctly queries the database based on the provided category, limits the results to 50, and efficiently includes associated steps in the query.
85-99
: Robust form validation using Zod!The form schema defined using Zod provides robust validation rules for each field. The validation rules are appropriate and help prevent invalid data from being submitted. Making the image field optional provides flexibility, and restricting the image file types ensures only supported formats are allowed.
117-147
: Well-implemented rate limiting for tRPC procedures!The custom
rateLimitedProcedure
is a great addition to enforce rate limits on protected tRPC procedures. Using the Unkey Ratelimit library simplifies the implementation, and allowing thelimit
andduration
to be configurable provides flexibility.Throwing a specific
TRPCError
with a "TOO_MANY_REQUESTS" code helps clients handle rate limiting correctly, and adding the remaining rate limit information to the context is useful for monitoring and client-side handling.
What does this PR do?
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated
Summary by CodeRabbit
New Features
Documentation