-
-
Notifications
You must be signed in to change notification settings - Fork 102
Document .env variables #1188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @arkid15r since I have worked with repo , I have good idea regarding this so can I work on it? |
@coderabbitai help us here, create drafts for https://github.com/OWASP/Nest/blob/main/frontend/.env.example and https://github.com/OWASP/Nest/blob/main/backend/.env.example variables documenation |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed:
Length of output: 1035 🏁 Script executed:
Length of output: 1483 🏁 Script executed:
Length of output: 4088 @arkid15r I'll create documentation drafts for both the frontend and backend environment variables. Based on my analysis of the codebase, here are the draft documentations: Frontend Environment Variables (.env.example)# Frontend Environment Variables Documentation
This document describes all environment variables used in the OWASP Nest frontend application.
## API Configuration
### VITE_API_URL
- **Description**: URL for the backend REST API endpoints
- **Default**: `http://localhost:8000/api/v1/`
- **Used in**: API requests throughout the application
- **Example**: `https://api.example.com/api/v1/`
### VITE_GRAPHQL_URL
- **Description**: URL for the GraphQL API endpoint
- **Default**: `http://localhost:8000/graphql/`
- **Used in**: Apollo GraphQL client configuration
- **Example**: `https://api.example.com/graphql/`
### VITE_IDX_URL
- **Description**: URL for the indexing service
- **Default**: `http://localhost:8000/idx/`
- **Example**: `https://api.example.com/idx/`
## Environment Configuration
### VITE_ENVIRONMENT
- **Description**: Specifies the environment the application is running in
- **Default**: `local`
- **Valid values**: `local`, `development`, `staging`, `production`
- **Used for**: Conditionally enabling features based on environment
### VITE_RELEASE_VERSION
- **Description**: Application version for deployment tracking
- **Default**: Empty (auto-populated during CI/CD)
- **Example**: `1.0.0` or Git commit hash
## Analytics and Monitoring
### VITE_GTM_ID
- **Description**: Google Tag Manager container ID
- **Default**: `your-google-tag-manager-id`
- **Example**: `GTM-XXXXXXX`
- **Used in**: Google Tag Manager integration for analytics
### VITE_GTM_AUTH
- **Description**: Google Tag Manager authentication parameter
- **Default**: `your-google-tag-manager-auth`
- **Example**: Alphanumeric authentication string
- **Used with**: GTM environments
### VITE_GTM_PREVIEW
- **Description**: Google Tag Manager preview parameter
- **Default**: Empty
- **Example**: `env-X` where X is a number
- **Used for**: Testing GTM configurations
### VITE_SENTRY_DSN
- **Description**: Sentry Data Source Name for error tracking
- **Default**: Empty
- **Example**: `https://[email protected]/0`
- **Used in**: Error monitoring and reporting Backend Environment Variables (.env.example)# Backend Environment Variables Documentation
This document describes all environment variables used in the OWASP Nest backend application.
## Django Core Configuration
### DJANGO_SECRET_KEY
- **Description**: Django secret key used for cryptographic signing
- **Default**: `None`
- **Requirement**: Must be a long, random string in production
- **Security**: Critical security setting, must be kept secret
### DJANGO_ALLOWED_HOSTS
- **Description**: List of host/domain names that Django can serve
- **Default**: `*` (allows all hosts, insecure for production)
- **Example**: `example.com,www.example.com`
- **Security**: Should be set to specific domains in production
### DJANGO_CONFIGURATION
- **Description**: Django configuration class to use
- **Default**: `Test`
- **Valid values**: `Test`, `Local`, `Staging`, `Production`
- **Used in**: Application configuration management
### DJANGO_PUBLIC_IP_ADDRESS
- **Description**: Public IP address of the server
- **Default**: `"127.0.0.1"`
- **Used for**: Network configuration and access control
### DJANGO_RELEASE_VERSION
- **Description**: Backend application version identifier
- **Default**: `None`
- **Example**: `1.0.0` or Git commit hash
- **Used for**: Version tracking in logs and error reports
## Database Configuration
### DJANGO_DB_NAME
- **Description**: PostgreSQL database name
- **Default**: `None`
- **Example**: `nest_db`
### DJANGO_DB_USER
- **Description**: PostgreSQL database user
- **Default**: `None`
- **Example**: `nest_user`
### DJANGO_DB_PASSWORD
- **Description**: PostgreSQL database password
- **Default**: `None`
- **Security**: Must be kept secret
### DJANGO_DB_HOST
- **Description**: PostgreSQL database host
- **Default**: `None`
- **Example**: `localhost` or `db.example.com`
### DJANGO_DB_PORT
- **Description**: PostgreSQL database port
- **Default**: `None`
- **Example**: `5432`
## Search Functionality (Algolia)
### DJANGO_ALGOLIA_APPLICATION_ID
- **Description**: Algolia application ID for search functionality
- **Default**: `None`
- **Used in**: Search indexing and querying
### DJANGO_ALGOLIA_WRITE_API_KEY
- **Description**: Algolia API key with write permissions
- **Default**: `None`
- **Security**: Must be kept secret
- **Used for**: Managing search indices
### DJANGO_ALGOLIA_EXCLUDED_LOCAL_INDEX_NAMES
- **Description**: Names of Algolia indices to exclude from local environment
- **Default**: `None`
- **Example**: `users,projects`
- **Used to**: Prevent modifying production indices during development
## External Services
### DJANGO_OPEN_AI_SECRET_KEY
- **Description**: OpenAI API key for AI-powered features
- **Default**: `None`
- **Security**: Must be kept secret
- **Used in**: AI text generation and analysis
### DJANGO_SENTRY_DSN
- **Description**: Sentry Data Source Name for error tracking
- **Default**: `None`
- **Used in**: Error monitoring and reporting in production
### DJANGO_SLACK_BOT_TOKEN
- **Description**: Slack bot token for integration with Slack
- **Default**: `None`
- **Security**: Must be kept secret
- **Used for**: Sending notifications to Slack
### DJANGO_SLACK_SIGNING_SECRET
- **Description**: Slack signing secret to verify requests
- **Default**: `None`
- **Security**: Must be kept secret
- **Used for**: Verifying Slack webhook requests
## AWS Configuration
### DJANGO_AWS_ACCESS_KEY_ID
- **Description**: AWS access key ID for AWS services access
- **Default**: `None`
- **Security**: Must be kept secret
- **Used for**: S3 and other AWS service integrations
### DJANGO_AWS_SECRET_ACCESS_KEY
- **Description**: AWS secret access key
- **Default**: `None`
- **Security**: Must be kept secret
- **Used with**: AWS access key ID for authentication
## GitHub Integration
### GITHUB_TOKEN
- **Description**: GitHub personal access token or OAuth token
- **Default**: `None`
- **Security**: Must be kept secret
- **Used for**: GitHub API interactions
- **Permissions needed**: Depends on the features using GitHub API Would you like me to make any adjustments to these documentation drafts? I can provide more specific information about certain variables if needed. |
@rishyym0927 you can use this content -- review it and add into the documentation structure. |
Hey @arkid15r do I need to update this in readme.md only or in the docs or in the both? |
Describe the solution you'd like
Update documentation with meaning of all existing .env variables for OWASP Nest backend/frontend.
Are you going to work on implementing this?
Additional context
Consider using @coderabbitai's help for that.
The text was updated successfully, but these errors were encountered: