|
1 |
| -# TeamInsight - Contribution Analytics Platform |
| 1 | +# Toban Contribution Viewer |
2 | 2 |
|
3 | 3 | TeamInsight is an AI-powered analytics platform designed to extract, analyze, and visualize team contributions across digital workspaces. The platform connects to Slack, GitHub, and Notion via their APIs to collect activity data, processes it using AI to identify meaningful contributions, and presents actionable insights through an intuitive dashboard.
|
4 | 4 |
|
@@ -43,9 +43,9 @@ TeamInsight is an AI-powered analytics platform designed to extract, analyze, an
|
43 | 43 |
|
44 | 44 | ### Prerequisites
|
45 | 45 |
|
46 |
| -- Python 3.8+ |
47 |
| -- Node.js 16+ |
48 |
| -- PostgreSQL |
| 46 | +- Python 3.12+ |
| 47 | +- Node.js 18+ |
| 48 | +- PostgreSQL 13+ |
49 | 49 | - API keys for:
|
50 | 50 | - Slack
|
51 | 51 | - GitHub
|
@@ -104,6 +104,38 @@ TeamInsight is an AI-powered analytics platform designed to extract, analyze, an
|
104 | 104 | npm run dev
|
105 | 105 | ```
|
106 | 106 |
|
| 107 | +## Environment Variables Management |
| 108 | + |
| 109 | +The project uses a structured approach to environment variables management to ensure proper configuration across environments. |
| 110 | + |
| 111 | +### Backend Environment Variables |
| 112 | + |
| 113 | +Backend environment variables are managed through: |
| 114 | + |
| 115 | +1. **Configuration Definition**: All environment variables are defined in `app/config.py` using Pydantic for validation |
| 116 | +2. **Environment Validation**: The application validates required variables at startup and logs warnings if any are missing |
| 117 | +3. **Testing Utility**: A utility (`app/core/env_test.py`) is provided to check environment configurations |
| 118 | +4. **Command-line Verification**: The `scripts/check_env.py` script can be used to verify environment variables before deployment |
| 119 | + |
| 120 | +Required backend environment variables: |
| 121 | +- `DATABASE_URL`: PostgreSQL connection string |
| 122 | +- `SECRET_KEY`: Application secret key for security |
| 123 | +- `AUTH0_DOMAIN`, `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_AUDIENCE`: Auth0 authentication settings |
| 124 | +- `OPENAI_API_KEY`: For AI-powered analysis |
| 125 | + |
| 126 | +### Frontend Environment Variables |
| 127 | + |
| 128 | +Frontend environment variables are managed through: |
| 129 | + |
| 130 | +1. **Centralized Configuration**: All environment variables are accessed through the `src/config/env.ts` module |
| 131 | +2. **Validation at Runtime**: The application validates required variables during initialization |
| 132 | +3. **Build-time Verification**: The `npm run check-env` script verifies environment variables during build |
| 133 | +4. **Typed Access**: Strongly-typed access to environment variables with proper error handling |
| 134 | + |
| 135 | +Required frontend environment variables: |
| 136 | +- `VITE_API_URL`: URL to the backend API |
| 137 | +- `VITE_AUTH0_DOMAIN`, `VITE_AUTH0_CLIENT_ID`, `VITE_AUTH0_AUDIENCE`: Auth0 authentication settings |
| 138 | + |
107 | 139 | ## Contributing
|
108 | 140 |
|
109 | 141 | Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
|
0 commit comments