VITE_API_URL="http://localhost:5000"
VITE_PYTHON_API_URL="http://localhost:5001"
VITE_API_KEY=
VITE_AUTH_DOMAIN=
VITE_PROJECT_ID=
VITE_STORAGE_BUCKET=
VITE_MESSAGING_SENDER_ID=
VITE_APP_ID=
VITE_BUCKET_URL=
VITE_GNEWS_API_KEY=
gsutil
is part of the Google Cloud SDK. If you don’t have it installed, follow these steps to install it:
-
Install the Google Cloud SDK.
-
Once installed, initialize it by running:
gcloud init
Create a cors.json
file with your desired CORS configuration. Here's the file:
[
{
"origin": ["http://localhost:5173"],
"method": ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
"maxAgeSeconds": 3600,
"responseHeader": ["Content-Type", "Authorization"]
}
]
Now, use the following gsutil
command to set the CORS configuration for your Firebase Storage bucket:
gsutil cors set cors.json <bucket-url>
Make sure to replace <bucket-url>
with your bucket name if it's different.
You can verify that the CORS settings were applied correctly by running:
gsutil cors get <bucket-url>
This will display the current CORS configuration for your bucket.
npm run dev
MONGODB_URI=""
JWT_SECRET=""
PORT=5000
JWT_EXPIRE="<your-custom-duration>(for e.g. 10h)"
DIALOGFLOW_PROJECT_ID=""
DIALOGFLOW_KEY_PATH=""
GEMINI_API_KEY=""
npm run server
# Firebase Configuration
FIREBASE_CREDENTIALS='<path-to-admin-sdk-file>'
FIREBASE_BUCKET='<firebase-buket-url>'
# MongoDB Configuration
MONGO_URI="<mongodb-uri>"
# Twilio Configuration
ACCOUNT_SID=''
TWILIO_AUTH_TOKEN=''
TWILIO_PHONE_NUMBER = '<Enter-phone-number>'
TWILIO_WHATSAPP_FROM='whatsapp:<Enter-phone-number>'
# Gemini AI Configuration
GEMINI_API_KEY="<gemini-api-key>"
Run the following command based on your operating system.
python -m venv venv
python3 -m venv venv
This will create a virtual environment named venv
in your current directory.
cd venv\Scripts\
activate.bat
source venv/bin/activate
After activation, your terminal prompt should show the virtual environment name, typically as (env)
.
pip install -r requirements.txt
To deactivate, simply run:
deactivate
You are now back to the global Python environment.
> **Tip:** Always activate your virtual environment before installing any packages to keep dependencies isolated.
python app.py
In the Dialogflow_Object folder a zip file is provided just import it in the dialogflow and there you are ready to go.