tyaga001 / devtoolsacademy

everything about awesome developer tools
https://www.devtoolsacademy.com/
Creative Commons Zero v1.0 Universal
38 stars 10 forks source link

feat(tools): implement tools directory with GitHub integration #13

Open tyaga001 opened 3 weeks ago

tyaga001 commented 3 weeks ago

Summary by CodeRabbit

vercel[bot] commented 3 weeks ago

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

Name Status Preview Comments Updated (UTC)
devtoolsacademy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 3:36pm
coderabbitai[bot] commented 3 weeks ago

[!IMPORTANT]

Review skipped

Review was skipped due to path filters

:no_entry: Files ignored due to path filters (8) * `public/tool-logos/cal.png` is excluded by `!**/*.png` * `public/tool-logos/clickhouse.png` is excluded by `!**/*.png` * `public/tool-logos/gitea.png` is excluded by `!**/*.png` * `public/tool-logos/joplin.png` is excluded by `!**/*.png` * `public/tool-logos/meilisearch.png` is excluded by `!**/*.png` * `public/tool-logos/pocketbase.png` is excluded by `!**/*.png` * `public/tool-logos/rocketchat.png` is excluded by `!**/*.png` * `public/tool-logos/sentry.png` is excluded by `!**/*.png`

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes in this pull request encompass significant updates across various files, primarily focused on enhancing database operations, modifying API routes, and introducing new components. The package.json file has been updated to streamline database scripts and adjust dependencies. Several SQL migration files have been deleted, which impacted the structure of the Post, Comment, and BlogUser tables. New models and components, such as Tool, Category, and various UI elements, have been added to improve the application’s functionality and user experience.

Changes

File Path Change Summary
package.json Updated scripts for database operations, added new scripts, and modified dependencies in dependencies and devDependencies.
prisma/migrations/.../migration.sql Deleted SQL migration files affecting the Post, Comment, and BlogUser tables, which included definitions for table structures and foreign key constraints.
prisma/schema.prisma Added new models: Tool and Category, and made formatting adjustments to existing model definitions.
prisma/seed.ts Introduced a new seeding script for categories and tools using Prisma Client.
prisma/seeds/blog.ts Introduced a new seeding script for blog posts using Prisma Client.
scripts/download-logos.ts Introduced a script to download logos from specified URLs and save them locally.
scripts/seed-blog.ts Introduced a script that calls the main function from the blog seeding script.
src/app/api/comments/route.ts Made stylistic changes, including semicolon removals and simplified code for retrieving comments.
src/app/api/cron/sync-tools/route.ts Introduced a new API route for synchronizing GitHub metrics with error handling.
src/app/api/tools/route.ts Added a new API route for retrieving tools with query parameters and error handling.
src/app/api/views/[slug]/route.ts Modified import statement for prisma from default to named import.
src/app/layout.tsx Updated layout structure, metadata descriptions, and styling.
src/app/providers.tsx Introduced a new Providers component for context management.
src/app/tools/loading.tsx Introduced a new Loading component to display skeleton screens during loading states.
src/app/tools/page.tsx Introduced a new ToolsPage component for displaying developer tools with asynchronous data fetching.
src/components/Navbar.tsx Enhanced Navbar functionality and layout, introduced new navigation items.
src/components/tools/ToolCard.tsx Introduced a new ToolCard component for displaying tool information.
src/components/tools/ToolLogo.tsx Introduced a new ToolLogo component for displaying tool logos with fallback behavior.
src/components/tools/ToolsGrid.tsx Introduced a new ToolsGrid component for rendering a grid of tools.
src/components/ui/input.tsx Introduced a new Input component for styled input fields.
src/components/ui/skeleton.tsx Introduced a new Skeleton component for loading placeholders.
src/lib/api/github.ts Introduced a GitHubService class for interacting with the GitHub API and synchronizing metrics.
src/lib/api/tools.ts Introduced functionality for managing and retrieving tools from a database using Prisma.
src/lib/github.ts Introduced functionality for fetching GitHub repository data.
src/lib/prisma.ts Modified the initialization and export of the prisma instance for improved management and logging capabilities.
src/types/tool.ts Introduced new TypeScript interfaces and types related to tools and categories.
prisma/migrations/20241108054148_init/migration.sql Introduced new migration script creating tables for Post, Comment, BlogUser, Tool, Category, and a join table _CategoryToTool with appropriate foreign key constraints and indexes.
src/app/api/tools/[slug]/route.ts Added a new API route for retrieving tool details based on a slug parameter with error handling.
src/app/tools/[slug]/error.tsx Introduced a new component for displaying error messages when a tool page fails to load.
src/app/tools/[slug]/loading.tsx Introduced a new loading component that displays skeleton screens for loading states.
src/app/tools/[slug]/not-found.tsx Introduced a new component to display a user-friendly message when a tool is not found.
src/app/tools/[slug]/page.tsx Introduced a new component for displaying detailed information about a specific tool based on a slug parameter.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant API
    participant Database

    User->>API: GET /api/tools
    API->>Database: Fetch tools with parameters
    Database-->>API: Return tools data
    API-->>User: Return JSON response with tools

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.