- Clone the Repository
- git clone https://github.com/your-username/customer-lifetime.git
- cd customer-lifetime-value
- Google Gemini API Key Setup Go to the frontend directory:
- cd frontend
Access the .env file in the root of the backend/ folder and type in your actual api key in the file:
- GEMINI_API_KEY=your-google-gemini-api-key-here
- Setup & Run the Backend (FastAPI) Navigate to the backend directory:
-
cd ../backend (Optional but recommended) Create a Python virtual environment:
-
python -m venv venv
-
source venv/bin/activate # Linux/Mac
-
venv\Scripts\activate # Windows
Install Python dependencies:
- pip install -r requirements.txt
Run the FastAPI server:
- uvicorn main:app --reload --host 0.0.0.0 --port 8000
- Setup & Run the Frontend (Vite + React + TypeScript) Open a new terminal.
Navigate to the frontend directory:
- cd frontend
Install frontend dependencies:
-
npm install Run the Vite development server:
-
npm run dev
- Access the App (Everything runs through the Frontend Link)
- Open: http://localhost:5173 (It might falsely show that backend is not connected, but check if everything is running to actually clarify.)
This frontend will communicate with the FastAPI backend running on http://localhost:8000 and use the Google Gemini API Key you provided in .env.