This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This project is configured for deployment to Google App Engine using Google Cloud Build with Secret Manager integration.
- Google Cloud Platform account
- Google Cloud project with the following APIs enabled:
- App Engine Admin API
- Cloud Build API
- Secret Manager API
- A secret named
API_KEYstored in Secret Manager
# Create a secret
echo -n "your-api-key-value" | gcloud secrets create API_KEY --data-file=-
# Grant access to the Cloud Build service account
PROJECT_ID=$(gcloud config get-value project)
PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format='value(projectNumber)')
CLOUDBUILD_SA="${PROJECT_NUMBER}@cloudbuild.gserviceaccount.com"
gcloud secrets add-iam-policy-binding API_KEY \
--member="serviceAccount:$CLOUDBUILD_SA" \
--role="roles/secretmanager.secretAccessor"
# Grant access to the App Engine service account
APPENGINE_SA="${PROJECT_ID}@appspot.gserviceaccount.com"
gcloud secrets add-iam-policy-binding API_KEY \
--member="serviceAccount:$APPENGINE_SA" \
--role="roles/secretmanager.secretAccessor"- Copy
.env.local.exampleto.env.local - Update
NEXT_PUBLIC_API_KEYwith your actual API key - Run
npm run dev
gcloud builds submit --config=cloudbuild.yamlThis will:
- Access the API key securely from Secret Manager
- Install dependencies
- Build the application with the secret available as an environment variable
- Deploy to App Engine
The app will be accessible at https://[PROJECT_ID].appspot.com.