(formerly known as: Mon Suivi Psy)
Empowering users to better understand their mental health and make informed treatment choices.
- Official website: https://jardinmental.fabrique.social.gouv.fr/
- Project intent: https://beta.gouv.fr/startups/monsuivipsy.html
This repository is a monorepo containing:
- app/: Mobile application (React Native + Expo)
- api/: Backend API (Node.js/TypeScript)
- Other folders for configuration, documentation, etc.
Each main component has its own README.md with detailed instructions.
- Node.js (see
package.jsonfor recommended version) - pnpm (recommended package manager)
- Expo CLI (for the mobile app)
- Docker (optional, for the API)
pnpm installSee app/README.md for detailed instructions.
See api/README.md for detailed instructions.
Build, release, and publishing instructions are specific to each component:
- For the mobile app, see the "Release/Publish" section in app/README.md
- For the API, see api/README.md
Sentry runs in the API and cron containers. To test Sentry error reporting:
- Enable debug endpoints:
export DEBUG_ENDPOINTS_ENABLED=true - Restart the API
- Test:
curl http://localhost:3000/debug/test-sentry
This will send a test error to Sentry with proper context and tags. Only enable in development/staging environments.
- app/README.md — Mobile app documentation
- api/README.md — API documentation
-
Resource
- Type/interface:
Resource - File:
app/src/scenes/resources/data/resources.ts - Data array:
RESOURCES_DATAin the same file
- Type/interface:
-
ResourceExternal
- Type/interface:
ExternalResource - File:
app/src/scenes/resources/data/resourcesExternal.ts - Data array:
EXTERNAL_RESOURCES_DATAin the same file
- Type/interface:
-
toolsData
- Type/interface:
ToolItemEntity - File:
app/src/scenes/tools/toolsData.tsx - Data array:
TOOLS_DATAin the same file
- Type/interface:
- Contact the product team via your usual communication channel (Slack, Teams, email, etc.).
- Provide a draft of the new resource/tool (title, description, type, audience, etc.) and ask for validation or additional details.
- If you are unsure about the content, request examples or reference materials.
- Keep a record of the product team's feedback for traceability.
- Command line: Run
uuidgenin your terminal to generate a new UUID. - Online: Use a trusted UUID generator website (e.g., https://www.uuidgenerator.net/).
- JavaScript: Use the
uuidnpm package:import { v4 as uuidv4 } from "uuid"; const id = uuidv4();
- Note: Each item in the data arrays must have a unique
idfield (UUID format).
Edit app/src/scenes/resources/data/resources.ts and add a new object to the RESOURCES_DATA array:
{
id: "your-uuid-here",
matomoId: 999, // next available number
title: "Your resource title",
image: require("path/to/image.png"),
category: CATEGORIES.YOUR_CATEGORY,
content: "Resource content in markdown or plain text",
externalResources: ["external-resource-uuid-1", "external-resource-uuid-2"], // optional
subCategory: SUB_CATEGORIES.YOUR_SUBCATEGORY, // optional
}Edit app/src/scenes/resources/data/resourcesExternal.ts and add a new object to the EXTERNAL_RESOURCES_DATA array:
{
id: "your-uuid-here",
matomoId: 999, // next available number
title: "External resource title",
url: "https://example.com",
type: "Article", // or "Vidéo", "Podcast", etc.
category: "P1 - A lire dans ce dossier", // or "P2 - Explorer d'autres ressources"
author: "Author name",
}Edit app/src/scenes/tools/toolsData.tsx and add a new object to the TOOLS_DATA array:
{
id: "your-uuid-here",
matomoId: 999, // next available number
title: "Tool title",
description: "Tool description",
type: ["Exercice"], // or other types
themes: ["Theme1", "Theme2"],
audience: ["child", "parent", "student"],
source: "Source name",
// Optional fields: url, innerPath, embed, video
}-
url(string): External URL to the resource (website, PDF, YouTube video, online questionnaire, etc.)url: "https://www.example.com/resource.pdf" -
innerPath(object): Navigate to an internal feature within the Jardin Mental apptext: Action button textpath: Navigation path in the app
innerPath: { text: "Créer mon plan de crise", path: "crisis-plan" }
-
embed(string): Identifier for a special embed type integrated in the appembed: "breath-exercice" -
video(string): Identifier for a locally hosted video or specific video integrationvideo: "coherence-cardiaque-video"
Usage logic:
- Use
innerPathto open an internal app feature (e.g., crisis plan creator) - Use
urlto open an external link (browser or webview) - Use
embed/videofor special multimedia content integrated in the app - These properties can be combined (e.g., a tool can have both
urlandembed)
- Get requirements from the product team (title, description, type, etc.).
- Generate a UUID for the new item.
- Add the item to the appropriate data array in the correct file.
- Test the application to ensure the new item appears as expected.