GitReFind is a web application that allows users to search for GitHub repositories, view their details, and keep track of their search history.
- Search: Search for GitHub repositories by name and description.
- Repository Details: View detailed information about a repository like readme, stars, forks.
- Search History: Recent searches are saved for quick access.
client/: The React frontend application.server/: The Django backend API.
The frontend is built with React and Vite. It uses react-router-dom for routing and axios for making API requests. The UI is styled with Tailwind CSS.
src/pages/: Contains the main pages of the application (HomePage,SearchPage,RepoDetailPage,HistoryPage).src/components/: Contains reusable componentsNavbarandRepoCard.src/types.ts: Defines the TypeScript types for the repository data.
The backend is a Django application that provides a REST API for the frontend and caching..
serverapp/views.py: Contains the API views for searching repositories and getting repository details.serverapp/urls.py: Defines the API endpoints.requirements.txt: Lists the Python dependencies for the backend.
-
Clone the repository:
git clone https://github.com/MORISON-K/GitReFind.git cd GitReFind -
Set up the backend:
-
Create and acivate a virtual environment:
python -m venv env env\Scripts\activate -
Install the Python dependencies:
pip install -r requirements.txt -
Create a
.envfile in the root of the project and add your GitHub token:GITHUB_TOKEN=-github-personal-access-token
-
-
Set up the frontend:
-
Navigate to the
clientdirectory:cd client -
Install the npm dependencies:
npm install
-
-
Start the backend server:
- Make sure you are in the root directory and the virtual environment is activated.
- Run the Django development server:
python manage.py runserver - The backend will be running at
http://127.0.0.1:8000.
-
Start the frontend development server:
- Open a new terminal and navigate to the
clientdirectory. - Run the Vite development server:
npm run dev - The frontend will be running at
http://localhost:5173.
- Open a new terminal and navigate to the
GET /api/search/?q=<query>: Search for repositories.GET /api/repos/<owner>/<repo>/: Get details for a specific repository.