AOSSIE-Org / AOSSIE-Org/EduAid

[Enhancement]: Add backend startup diagnostics endpoint for environment and dependency checks

Đang mở
#533 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
171
Fork
423
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Feature and its Use Cases

### Feature Description

Add a lightweight backend diagnostics endpoint that helps contributors and users verify whether their local environment is properly configured.

Currently, when someone sets up EduAid locally, issues such as Python version mismatch, missing dependencies, missing NLTK data, or invalid credentials can cause the backend to fail during startup. These errors often appear only as terminal stack traces and can be difficult for new contributors to diagnose.

### Proposed Feature

Introduce a simple endpoint such as:

GET /diagnostics

This endpoint would return useful information about the runtime environment and important dependencies.

Example response:

{
"status": "ok",
"python_version": "3.10.x",
"transformers_available": true,
"spacy_available": true,
"nltk_data_available": true,
"google_credentials_loaded": true
}

### Use Cases

1. **Contributor Setup Verification**
New contributors can quickly verify whether their environment is correctly configured before running the application.

2. **Debugging Local Setup Issues**
If the backend fails or behaves unexpectedly, the diagnostics endpoint can reveal missing dependencies or misconfigurations.

3. **Improved Developer Experience**
This feature would reduce setup friction and make troubleshooting easier for developers working on EduAid.

4. **Faster Issue Reporting**
When reporting issues, contributors can include diagnostics output, making debugging easier for maintainers.

### Benefits

- Improves contributor onboarding
- Simplifies debugging of environment issues
- Helps maintainers quickly identify configuration problems

### Additional Context

This feature would be especially helpful for contributors who encounter setup issues related to Python versions, dependency mismatches, or missing configuration files.

Several contributors in the Discord server have reported difficulties while running the backend locally due to environment configuration problems.

Adding a diagnostics endpoint would provide a quick and reliable way to verify the system environment.

If the maintainers agree, I would be happy to work on implementing this feature.

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.