{"id":23228813,"url":"https://github.com/sord-dev/mental-health-server","last_synced_at":"2026-05-16T00:38:50.724Z","repository":{"id":160903115,"uuid":"635695762","full_name":"sord-dev/mental-health-server","owner":"sord-dev","description":"A mental health application catered towards people who struggle with accountability and people who just want to hear a second opinion from a guide/therapist-like AI.","archived":false,"fork":false,"pushed_at":"2023-05-12T21:25:49.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T15:51:52.353Z","etag":null,"topics":["chat-bot","mental-health-awareness","mentorship-app","openai"],"latest_commit_sha":null,"homepage":"https://serenity-ai.netlify.app/authenticate/login","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sord-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T09:00:05.000Z","updated_at":"2023-06-02T09:48:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1599c8f-52d4-46e0-891c-2930e261c453","html_url":"https://github.com/sord-dev/mental-health-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sord-dev%2Fmental-health-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sord-dev%2Fmental-health-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sord-dev%2Fmental-health-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sord-dev%2Fmental-health-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sord-dev","download_url":"https://codeload.github.com/sord-dev/mental-health-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247381221,"owners_count":20929875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-bot","mental-health-awareness","mentorship-app","openai"],"created_at":"2024-12-19T01:15:07.145Z","updated_at":"2025-10-28T10:04:08.082Z","avatar_url":"https://github.com/sord-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mental Health Web Application Backend API Documentation\n\nWelcome to the backend API documentation for our mental health web application! This documentation provides an overview of the API endpoints, request/response formats, and authentication mechanisms used by our application's backend.\n\n## Hosted Application\nFind the hosted application [here.](https://serenity-ai.netlify.app)\n\n![image](https://github.com/sord-dev/mental-health-server/assets/75338985/743d33f7-8914-462f-91d4-1612d18203cd)\n\n![image](https://github.com/sord-dev/mental-health-server/assets/75338985/4a8c6c35-3953-41d2-b80e-e4088328779e)\n\n## Technologies Used\n\nOur backend is built using the following technologies:\n\n- Express.js: a fast and minimalist web framework for Node.js\n- Postgres: an SQL database for storing data\n- OpenAI API: for providing personalized mentorship to users\n- Node.js: a JavaScript runtime environment for building server-side applications\n\n## API Endpoints\n\nThe backend API provides the following endpoints:\n\n### User Authentication Endpoints\n\n- `POST /auth/register`: Register a new user with the application by providing their name, email, and password.\n- `POST /auth/login`: Authenticate a user by providing their email and password.\n\n### User Endpoints\n\n- `GET /user/:id`: Retrieve a user's profile information by their user ID.\n- `PATCH /user/pts`: Update a user's points by providing their user ID and the new point value.\n- `PATCH /user/goals`: Update a user's long-term goals by providing their user ID and the new goal value.\n- `PATCH /user/st/goals`: Update a user's short-term goals by providing their user ID and the new short-term goal value.\n- `POST /user/st/goals`: Mark a user's short-term goal as completed by providing their user ID and the goal ID.\n- `PATCH /user/mentor`: Update a user's active mentor by providing their user ID and the new mentor ID.\n\n### Forum Endpoints\n\n- `GET /forum`: Retrieve all forums.\n- `GET /forum/forum/:id`: Retrieve a forum by its ID.\n- `GET /forum/user/:user_id`: Retrieve all forums from a specific user by providing their user ID.\n- `POST /forum`: Create a new forum by providing its title, description, and user ID.\n- `PATCH /forum/:id`: Update a fourm.\n- `DELETE /forum/:id`: Delete a forum.\n\n### AI Mentor Endpoints\n\n- `POST /mentor/chat`: Get a personalized message from the user's AI mentor based on their current mental state by providing their user ID.\n- `POST /mentor/info`: Retrieve information about available AI mentors.\n- `GET /mentor/prices`: Retrieve information about available AI mentor personalities and their prices from the marketplace.\n\n## Response Format\n\nThe API returns responses in JSON format. The response format consists of two fields: `success` and `data`. The `success` field indicates whether the request was successful or not, and the `data` field contains the response data.\n\n## Authentication\n\nCurrently, our backend API does not use JSON Web Tokens (JWT) or any other form of authentication. Authentication is managed through the `/auth/register` and `/auth/login` endpoints, which use email and password for user authentication.\n\nWe hope this documentation provides a helpful overview of our backend API. If you have any questions or feedback, please don't hesitate to reach out to us!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsord-dev%2Fmental-health-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsord-dev%2Fmental-health-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsord-dev%2Fmental-health-server/lists"}