/FreeMentors

Free Mentors is a social initiative where accomplished professionals become role models to young people to provide free mentorship sessions.

Primary LanguageJavaScript

FreeMentors

Free Mentors is a social initiative where accomplished professionals become role models to young people to provide free mentorship sessions.

Build Status Coverage Status Maintainability

Users

  • Use can sign up
  • User can sign in
  • User can view all mentors
  • User can view a specific mentor -User can post a session -user(mentor) can accept a session -User(mentor) can decline a session

Sessions

  • post a session
  • accept a session -decline a session

Mentor

  • accept a session
  • decline a session

Admin

  • Admin can update a user to a mentor

Installation

Clone repo to your local machine: console git clone https://github.com/sharonandisi/FreeMentors/.git Install dependencies and run locally
Then run: npm npm init npm install Create .env with your own enviroment variables. Now start the server: npm npm run dev-start-development npm start - production

Testing

To run tests: npm npm run test

API

API is deployed at here on heroku.

API Routes

HTTP VERB ENDPOINT FUNCTIONALITY
POST [ users ] /api/v1/auth/signup Create user account
POST [ admin ] /api/v1/auth/signin Admin can sign in their account
POST [ users ] /api/v1/auth/signin Sign in to user account
GET [ mentors ] /api/v1/mentors/mentors Get all mentors
GET [ mentor ] /api/v1/mentors/mentors/mentorid Get a mentor
POST [ session ] /api/v1/sessions/sessions add a session
PATCH [ admin ] /api/v1/auth/:userid update the mentor status
PATCH [ session ] /api/v1/sessions/sessions/:sessionid/accept mentor can accept a session
PATCH [ session ] /api/v1/sessions/sessions/:sessionid/reject mentor can reject a session