mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-11 07:15:08 -05:00
This pull request sets up and configures Orval for API client generation. It automates the process of creating TypeScript clients from the backend's OpenAPI specification, improving development efficiency and reducing manual code maintenance. ### Changes 🏗️ - Configures Orval with a new configuration file (`orval.config.ts`). - Adds scripts to `package.json` for fetching the OpenAPI spec and generating the API client. - Implements a custom mutator for handling authentication. - Adds API client generation as a step in the CI workflow. - Adds `.gitignore` entry for generated API client files. - Adds a security middleware to prevent caching of sensitive data. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified that the API client is generated correctly. - [x] Confirmed that the custom mutator is functioning as expected for authentication. - [x] Ensured that the new CI workflow step for API client generation is successful. - [x] Tested generated API calls #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**)
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
FRONTEND_BASE_URL=http://localhost:3000
|
|
|
|
NEXT_PUBLIC_AUTH_CALLBACK_URL=http://localhost:8006/auth/callback
|
|
NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/api
|
|
NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws
|
|
NEXT_PUBLIC_AGPT_MARKETPLACE_URL=http://localhost:8015/api/v1/market
|
|
NEXT_PUBLIC_LAUNCHDARKLY_ENABLED=false
|
|
NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID=
|
|
NEXT_PUBLIC_APP_ENV=local
|
|
|
|
NEXT_PUBLIC_AGPT_SERVER_BASE_URL=http://localhost:8006
|
|
|
|
## Locale settings
|
|
|
|
NEXT_PUBLIC_DEFAULT_LOCALE=en
|
|
NEXT_PUBLIC_LOCALES=en,es
|
|
|
|
## Supabase credentials
|
|
|
|
NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
|
|
|
|
## OAuth Callback URL
|
|
## This should be {domain}/auth/callback
|
|
## Only used if you're using Supabase and OAuth
|
|
AUTH_CALLBACK_URL="${FRONTEND_BASE_URL}/auth/callback"
|
|
GA_MEASUREMENT_ID=G-FH2XK2W4GN
|
|
|
|
# When running locally, set NEXT_PUBLIC_BEHAVE_AS=CLOUD to use the a locally hosted marketplace (as is typical in development, and the cloud deployment), otherwise set it to LOCAL to have the marketplace open in a new tab
|
|
NEXT_PUBLIC_BEHAVE_AS=LOCAL
|
|
NEXT_PUBLIC_SHOW_BILLING_PAGE=false
|
|
|
|
## Cloudflare Turnstile (CAPTCHA) Configuration
|
|
## Get these from the Cloudflare Turnstile dashboard: https://dash.cloudflare.com/?to=/:account/turnstile
|
|
## This is the frontend site key
|
|
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=
|
|
NEXT_PUBLIC_TURNSTILE=disabled
|
|
|
|
# Devtools
|
|
NEXT_PUBLIC_REACT_QUERY_DEVTOOL=true
|