BUG: Landing Page Repository Input Not Connected to CodeGraph Indexing
Is there an existing issue for this?
- [x] I have searched the existing issues
What happened?
📌 Issue Overview
Landing Page Repository Input Not Connected to CodeGraph Indexing
The landing page allows users to enter a GitHub repository URL, but clicking "Analyze Repository" fails because the frontend calls a non-existent backend API endpoint (/api/repo-stats). The repository indexing functionality with FalkorDB exists in the codebase but is not exposed via the REST API for the web frontend.
🔍 Steps to Reproduce
- Go to the landing page (
LandingPage.tsx) - Enter a valid GitHub repository URL (e.g.,
https://github.com/AOSSIE-Org/Devr.AI) - Click on "Analyze Repository" button
- See the error toast: "Failed to fetch repository stats. Please check the URL or backend server."
🎯 Expected Behavior
- User enters a GitHub repository URL in the landing page
- Frontend sends the URL to backend API endpoint
- Backend calls
RepoService.index_repo()to index the repository using FalkorDB CodeGraph - Repository is cloned, analyzed, and stored as a graph in FalkorDB
- Indexing metadata (status, node count, edge count) is saved to Supabase
- User receives success message with repository stats
- User is navigated to the dashboard showing the indexed repository data
🚨 Actual Behavior
- User enters a GitHub repository URL in the landing page
- Frontend attempts to POST to
http://localhost:8000/api/repo-stats(line 23 inLandingPage.tsx) - Request fails with 404 - endpoint does not exist in the backend
- User sees error toast message
- No repository indexing occurs
- User cannot proceed to dashboard
Technical Details:
The frontend makes this call:
const response = await axios.post('http://localhost:8000/api/repo-stats', { repo_url: repoUrl });
But /api/repo-stats endpoint is not defined in:
- ❌
backend/app/api/router.py - ❌
backend/app/api/v1/(no repositories endpoint)
However, the infrastructure exists:
- ✅
backend/app/services/codegraph/repo_service.py- CompleteRepoServiceclass - ✅
RepoService.index_repo()method works (tested via Discord bot) - ✅ FalkorDB integration functional
- ✅ Supabase database with
indexed_repositoriestable - ❌ Just missing the REST API layer to expose this functionality
Files to Modify:
backend/app/api/v1/repositories.py(create new file)backend/app/api/router.py(add router registration)frontend/src/components/landing/LandingPage.tsx(update API endpoint)
Record
- [x] I agree to follow this project's Code of Conduct
- [ ] I want to work on this issue
Later on we can extend this functionality to provide the repository stats too including with the functionality to index repositories.
@smokeyScraper Interested in taking this up. Assign me if available
Hi @smokeyScraper, I'd like to pick up Issue #170.My proposed approach is to:
- Create a new POST /api/v1/repositories/index endpoint to handle the repo_url.
- Have this endpoint validate the URL, enqueue the RepoService.index_repo() job, and persist the metadata in Supabase.
- Update LandingPage.tsx to call this new API and show success/error feedback to the user. Please assign this to me if it sound okay to you!
@smokeyScraper sir please assign it to me
Assigning to @Vaibhaviitian. Sorry @Bhup-GitHUB, @OmRatnaparkhe, but this issue was proposed by @Vaibhaviitian himself, that's why assigning it to him.
No worries