sentinel is a repository containing Python and Next.js components designed to integrate GitHub repository analysis, semantic search, and AI-driven code reviews. The backend leverages Python libraries such as LangChain, Groq, Sentence Transformers, and FAISS for semantic indexing and retrieval. The frontend is built with Next.js, React, and Tailwind CSS.
spirizeon-sentinel/
├── README.md
├── requirements.txt
├── sentinel.py
└── frontend/
├── README.md
├── eslint.config.mjs
├── next.config.ts
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── tsconfig.json
├── .gitignore
├── public/
└── src/
├── app/
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── components/
│ ├── Gemini.tsx
│ ├── Globe.tsx
│ ├── Grid.tsx
│ └── ui/
│ ├── globe.tsx
│ ├── google-gemini-effect.tsx
│ └── layout-grid.tsx
├── data/
│ ├── globe.json
│ └── music_courses.json
└── lib/
└── utils.ts
all-MiniLM-L6-v2
) and indexes them with FAISS.mixtral-8x7b-32768
model.Function Name | Description |
---|---|
fetch_github_repo_files |
Retrieves files from a specified GitHub repository. |
update_rag_index |
Updates the FAISS index with embeddings of the latest repository files. |
search_faiss |
Performs semantic search within the indexed embeddings. |
generate_response |
Generates AI-driven responses based on user queries and context. |
process_github_repo |
Processes a GitHub repository to answer user queries. |
process_pull_request |
Automatically generates review comments for open pull requests. |
Key libraries include:
langchain
, langchain-core
, langchain-community
, langchain-groq
)groq
)sentence-transformers
)faiss-cpu
)PyGithub
)The frontend is built with Next.js 15.x and React 19.x, styled using Tailwind CSS.
To run the frontend locally:
npm install
npm run dev # or yarn dev / pnpm dev / bun dev
Visit http://localhost:3000
to view the application.
Key dependencies include:
next
)react
, react-dom
)three
, @react-three/fiber
, @react-three/drei
)tailwindcss
, @tailwindcss/postcss
)@radix-ui/react-hover-card
)repo_name = 'Spirizeon/claxvim'
user_query = "What improvements can be made to error handling?"
result = process_github_repo(repo_name, user_query)
print(f"Query: {result['query']}")
print(f"Relevant files: {result['relevant_files']}")
print(f"Response: {result['response']}")
open_prs = get_open_pr_numbers("spirizeon", "claxvim")
if not open_prs:
print("Nothing to review!")
for pr_number in open_prs:
pr_result = process_pull_request('Spirizeon/claxvim', pr_number)
print(f"PR Review Status: {pr_result['status']}")
if 'review' in pr_result:
print(f"Review Comments:\n{pr_result['review']}")
The frontend can be easily deployed on Vercel:
For backend deployment:
To contribute:
git checkout -b feature/your-feature-name
).git commit -am 'Add feature'
).git push origin feature/your-feature-name
).This project is licensed under the MIT License.