AOSSIE-Org / AOSSIE-Org/EduAid

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

Abierto
#533 3 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
JavaScript
Estrellas
171
Forks
423
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.