MEP: Add the entire project - #7
Merged
Merged
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces the initial TaskFlow API project structure: an Express + MongoDB REST API for task management, along with supporting infrastructure for Dockerized deployment and a Jenkins CI/CD pipeline.
Changes:
- Added CRUD API for tasks (
/api/tasks) and a health endpoint (/health). - Added Jest unit + integration tests (including MongoDB in-memory integration testing).
- Added containerization and automation: Dockerfiles, Nginx reverse proxy, Docker Compose stack, and Jenkins pipeline.
Reviewed changes
Copilot reviewed 21 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/index.js |
Express app bootstrap; mounts routes and conditionally starts server. |
src/config/db.js |
MongoDB connection helper via Mongoose. |
src/models/Task.js |
Mongoose Task schema (title/description/status) with timestamps. |
src/routes/tasks.js |
Tasks CRUD routes with basic validation and error handling. |
src/routes/health.js |
Health endpoint returning status/uptime/version. |
tests/unit/tasks.test.js |
Unit tests for task routes using mocked model. |
tests/unit/health.test.js |
Unit test for health endpoint response shape. |
tests/integration/tasks.integration.test.js |
Integration test using mongodb-memory-server. |
package.json |
Node scripts, dependencies, and Jest configuration. |
README.md |
Project documentation: endpoints, pipeline description, and setup. |
Dockerfile |
Multi-stage build for production Node container + healthcheck. |
Dockerfile.nginx |
Nginx container for reverse proxy. |
nginx/nginx.conf |
Reverse proxy configuration to the API service. |
docker-compose.yml |
Local/prod stack for API + MongoDB + Nginx + Jenkins. |
Jenkinsfile |
Declarative Jenkins pipeline for CI/CD stages and deploy checks. |
.eslintrc.json |
ESLint rules for the codebase. |
.editorconfig |
Editor conventions (LF, trimming whitespace, indentation). |
.gitattributes |
Line-ending normalization across file types. |
.env.example |
Example environment variables. |
.vscode/settings.json |
VS Code formatting/lint-on-save settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+51
to
+55
| - `POST /api/tasks` | ||
| - Rôle: crée une nouvelle tâche. | ||
| - Body JSON: `{ "title": "...", "description": "...", "status": "todo|in-progress|done" }`. | ||
| - Réponse attendue: `201` avec la tâche créée. | ||
| - Cas d'erreur: `400` si `title` est absent ou vide. |
Comment on lines
+62
to
+65
| - `PUT /api/tasks/:id` | ||
| - Rôle: met à jour une tâche existante (principalement le statut). | ||
| - Body JSON exemple: `{ "status": "done" }`. | ||
| - Réponse attendue: `200` avec la tâche mise à jour. |
| Complétez cette section avec la répartition finale réelle du binôme avant rendu. | ||
|
|
||
| - Yann: développement API, tests unitaires et intégration, conteneurisation, orchestration | ||
| - Loris: pipeline jenkins CI/CD,, rédaction du rapport |
Comment on lines
+11
to
+13
| await mongoose.connect(mongoUri); | ||
|
|
||
| // Clear the require cache to ensure fresh module load |
| context: . | ||
| dockerfile: Dockerfile.jenkins | ||
| container_name: taskflow-jenkins | ||
| user: root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.