AOSSIE-Org / AOSSIE-Org/EduAid

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

Aperta
#533 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
171
Fork
423
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.