This is a NextJS starter in Firebase Studio.
To get started, take a look at src/app/page.tsx.
This application uses Genkit with Vertex AI to provide generative AI capabilities.
To enable the AI features, you will need to set up your environment variables. First, create a .env.local file in the root of your project by copying the example .env file:
cp .env .env.localThen, fill in the following values in your new .env.local file:
- What it is: The unique identifier for your Google Cloud project.
- How to get it: Go to the Google Cloud Console. Your Project ID is on the main dashboard in the "Project info" card.
- What it is: The geographic region for your Vertex AI resources (e.g.,
us-central1). - How to get it: You can use
us-central1as a default. For other options, see the official list of Vertex AI locations.
After setting these variables, you need to:
- Enable the Vertex AI API in your Google Cloud project.
- Set up authentication: For local development, you can use the gcloud CLI. Run
gcloud auth application-default loginin your terminal to authenticate.
The map feature on the /map page uses the Google Maps API. To enable it, you need to add the following to your .env.local file:
- What it is: The API key that allows your app to display Google Maps.
- How to get it:
- In the Google Cloud Console, go to "APIs & Services" > "Credentials".
- Click + CREATE CREDENTIALS and select API key.
- Important: Remember to restrict your API key to your website's domain for security purposes.
- Enable the Maps JavaScript API for your project.