This is a simple Node API to create and sign in users with Stream and JWT authentication using in-memory data.
- User authentication and authorization
- Schedule consultations with therapists
- Node.js (v16 or higher)
- npm or yarn
- MongoDB
- Stream account and credentials
Clone the repository:
git clone https://github.com/Galaxies-dev/mental-health-api
cd mental-health-api
Copy the DUMMY.env
file to .env
and fill in the following variables:
PORT=3000
STREAM_API_KEY=your_stream_api_key
STREAM_API_SECRET=your_stream_api_secret
JWT_SECRET=your_jwt_secret
Install dependencies:
npm install
Development mode:
npm run start:dev
Production mode:
npm run build
npm start
The API will be available at http://localhost:3000
POST /auth/register
- Register a new userPOST /auth/login
- Login existing user
POST /consultations
- Schedule a new consultationGET /consultations
- Get all consultationsPATCH /consultations/:id
- Update consultation status
Take a shortcut from web developer to mobile development fluency with guided learning
Enjoyed this project? Learn to use React Native to build production-ready, native mobile apps for both iOS and Android based on your existing web development skills.