This document provides instructions for setting up and running the IssueMatch platform with the new features.
- Python 3.9+
- Node.js 18+
- Firebase project
- Google AI Studio API key (for Gemini API)
- Navigate to the backend directory:
cd backend- Create and activate a virtual environment:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the backend directory with the following variables:
FIREBASE_CREDENTIALS_PATH=path/to/your/firebase-credentials.json
GOOGLE_AI_STUDIO_API_KEY=your_gemini_api_key
SECRET_KEY=your_secret_key_for_session_middleware
- Start the backend server:
uvicorn app.main:app --reload --port 8000- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.env.localfile in the frontend directory with the following variables:
NEXT_PUBLIC_APP_URL=http://localhost:3000
- Start the frontend server:
npm run dev-
Create the following collections in your Firebase Firestore database:
leaderboard_scoresreferralsmentorsmentorship_requests
-
Add the following security rules to your Firestore database:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /leaderboard_scores/{document} {
allow read: if true;
allow write: if request.auth != null;
}
match /referrals/{document} {
allow read: if request.auth != null && (request.auth.uid == resource.data.referrerId || request.auth.uid == resource.data.referredUserId);
allow write: if request.auth != null;
}
match /mentors/{document} {
allow read: if true;
allow write: if request.auth != null && request.auth.uid == resource.data.userId;
}
match /mentorship_requests/{document} {
allow read: if request.auth != null && (request.auth.uid == resource.data.requesterId || request.auth.uid == resource.data.mentorId);
allow write: if request.auth != null;
}
}
}
If you encounter any issues with the backend server, check the following:
- Make sure your Firebase credentials are correctly set up
- Ensure you have the correct Google AI Studio API key
- Check that all required dependencies are installed
For frontend issues:
- Make sure you have the latest version of Node.js
- Clear your browser cache
- Check the browser console for any errors