- 📋 【Knowledge Base Driven Review】: Support customized repository-level code review standards based on best practices accumulated in knowledge base
- 🤖 【Smart Single File Review】: Provide professional scoring and improvement suggestions for single file code changes by combining knowledge base experience with LLM analysis
- 🚀 【Global Code Analysis】: Provide comprehensive review reports including code walkthrough, change description and sequence diagrams based on all file changes through LLM
- 🌍 【All Language Support】: Support intelligent Code Review for all mainstream programming languages
- 🔄 【GitHub Deep Integration】: Seamlessly integrate with GitHub workflow for automated Code Review
- 🌐 【Multi-language Response】: Support customized language for Code Review feedback
- 🧠 Dify - Used for building intelligent LLM workflows
- 🔥 Next.js App Router - Used for building modern web applications
- 🎨 Tailwind CSS - Used for implementing elegant responsive design
- 🔐 Clerk - Used for providing secure and reliable user authentication
- 📦 Supabase - Used for implementing high-performance data storage
- 🔗 Github App - Used for achieving GitHub deep integration
You can deploy this template by setting up the following services and adding their corresponding environment variables:
-
Run
npm install
to install dependencies, then runnpm run dev
to start the development server. -
The system will require you to provide
CLERK_SECRET_KEY
. Follow these steps: -
Now your frontend and backend should be running, you can log in but won't be able to perform code reviews yet.
-
Create a Supabase account to get your API key.
-
Create a Supabase project, copy from
Project Settings
:SUPABASE_URL
SUPABASE_KEY
Execute the following SQL statement to create
githubId_clerkId
table:CREATE TABLE "public"."githubId_clerkId" ( "github_id" text NOT NULL, "clerk_id" text NOT NULL, PRIMARY KEY ("github_id") );
Execute the following SQL statement to create
repoName_file
table:CREATE TABLE "public"."repoName_file" ( "repo_fullName" text NOT NULL, "file_name" text NOT NULL, "folder_name" text NOT NULL, PRIMARY KEY ("repo_fullName", "file_name", "folder_name") );
-
Copy from
Storage
>S3 Connection
:SUPABASE_S3_ENDPOINT
SUPABASE_S3_REGION
-
Create new in
Storage
>S3 Access Keys
:SUPABASE_STORE_ID
SUPABASE_STORE_SECRET_KEY
-
Create new bucket in
Storage
usingNew bucket
:- Fill bucket name in
SUPABASE_BUCKET_NAME
- Fill bucket name in
SUPABASE_URL= SUPABASE_KEY= SUPABASE_S3_ENDPOINT= SUPABASE_S3_REGION= SUPABASE_STORE_ID= SUPABASE_STORE_SECRET_KEY= SUPABASE_BUCKET_NAME=
-
-
Create a Github account, then create a Github App.
- Click
New GitHub App
inSettings
->Developer settings
->GitHub Apps
. - Fill in
GitHub App name
,Homepage URL
,Webhook URL
and other information. - Generate
Private key
and download it, copyApp ID
,Client ID
,Client secret
to your.env.local
file.
GITHUB_APP_ID= GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= # Only fill in the content between -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- GITHUB_PRIVATE_KEY=
- Click
-
Create a Dify account and configure LLM workflow:
- Register a Dify account and configure LLM model in model providers
- Import workflow in Dify Studio:
- Click "Create Application" and select "Import DSL"
- Switch to URL mode, enter workflow file URL:
https://ovlxxbdwimhigoejxkqn.supabase.co/storage/v1/object/public/test-bucket-api/Dify_DSL/CR-Mentor.yml
- Click create to complete import
- Publish workflow:
- Click "Publish" button on "Orchestration" page
- Get API Key:
- Click "API Access" in left navigation
- Switch to "Workflow App API" page
- Click "API Key" in top right to create new Secret key
- Copy Secret key to
.env.local
file:
DIFY_APIKEY= DIFY_BASE_URL=https://api.dify.ai/v1 # Fixed value
- Build professional code review knowledge base to accumulate team best practices
- Optimize code review suggestion display based on knowledge base
- Develop intelligent code review template system supporting multiple scenarios
- Implement knowledge graph based code review task assignment
- Build collaborative review platform supporting real-time comments and discussions
- Integrate intelligent code quality analysis for automatic issue detection
- Continuously optimize LLM model to improve suggestion quality and response speed
- Deep integration with mainstream code hosting platforms (like GitHub, GitLab)
- Build review data analysis system generating in-depth insight reports
- Improve knowledge base management for intelligent experience reuse
- Support multi-language knowledge base and documentation system