A full-stack chat application built with React TypeScript frontend and FastAPI backend, integrated with Google's Gemini AI API and deployed on Google Cloud Run.
- Real-time chat interface with Gemini AI
- Document-aware responses
- Private/public document management
- Automated deployment with GitHub Actions
- Cloud Run hosting for both frontend and backend
- Node.js v14.0.0+ and npm v6.0.0+
- Python 3.8+
- Gemini API key from Google AI Studio
- Google Cloud account with Cloud Run enabled
- GitHub account for automated deployments
# Clone the repository
git clone <your-repository-url>
cd <project-directory>
# Create documentation directories
mkdir -p backend/docs/private backend/docs/templates
cd frontend
npm install
npm run dev
# Development server at http://localhost:3000
cd backend
python3 -m venv venv
source venv/bin/activate # Windows: .\venv\Scripts\activate
pip3 install -r requirements.txt
# Start development server
uvicorn main:app --reload --host 0.0.0.0 --port 8000
# frontend/.env.development
VITE_BACKEND_URL=http://localhost:8000
VITE_ENV=development
# frontend/.env.production
VITE_BACKEND_URL=https://backend-240663900746.me-west1.run.app
VITE_ENV=production
# backend/.env.development
FRONTEND_DEV_URL=http://localhost:3000
GEMINI_API_KEY=your_api_key_here
EMAIL_ADDRESS=your_gmail@gmail.com
EMAIL_PASSWORD=your_app_password_here
YOUR_EMAIL=your_receiving_email@gmail.com
# backend/.env.production
FRONTEND_PROD_URL=https://frontend-240663900746.me-west1.run.app
GEMINI_API_KEY=your_api_key_here
EMAIL_ADDRESS=your_gmail@gmail.com
EMAIL_PASSWORD=your_app_password_here
YOUR_EMAIL=your_receiving_email@gmail.com
The application uses GitHub Actions for automated deployment to Google Cloud Run.
GCP_PROJECT_ID
: Your Google Cloud project IDGCP_SA_KEY
: Service account key with Cloud Run accessGEMINI_API_KEY
: Gemini API key for productionEMAIL_ADDRESS
: Gmail address for SMTPEMAIL_PASSWORD
: Gmail App Password (16-digit code)YOUR_EMAIL
: Email address to receive contact form submissions
- Frontend: https://frontend-240663900746.me-west1.run.app
- Backend: https://backend-240663900746.me-west1.run.app
backend/docs/
├── private/ # Private docs (gitignored)
│ └── resume.md
└── templates/ # Public templates
For detailed documentation:
GET /
: Health checkGET /check-paths
: Check available documentsGET /api/content/{file_name}
: Retrieve specific file contentPOST /generate-text
: Basic chatPOST /chat-with-files
: Context-aware chat
- Fork repository
- Create feature branch
- Commit changes
- Push to branch
- Open Pull Request