- Added all the necessary API endpoints with JWT authentication. Needs a header for bearer token. Sent on user creation and/or login
- Added docker-compose and dockerfile. Server should start just with "docker-compose up" at localhost:3000
- Added some sample integration tests for routes and a unit test for helper
- Data is persisted in mongodb, via mongoose ORM
- Adding a swagger API documentation
- increase supertest API tests
- Joi validation for ensuring the correct body received in post requests
- A couple of conditions mentioned in the comments in the routes
- A postman based API test for testing a complete user creation/ jam flow
-
Create user : POST req => localhost:3000/users, Body => {name:'vineetchawla', password:'test', email:'vineetchawla19@gmail.com'} Returns the token required for authentication
-
Get user details: GET req => localhost:3000/users/me Returns user details
-
Add skills for user: POST req => localhost:3000/skill/, Body => { ['guitar']}
-
Add new skill of user: PUT req => localhost:3000/skill/, Body => {['keyboard']}
-
Create jam : POST req => localhost:3000/jam/create, Body => { name: 'jam1', totalMembers: 3, roles: ['guitar', 'keyboard']}
-
Join a jam: POST req => localhost:3000/participate/join, Body => { name: 'jam1'}
-
Remove yourself from jam: DELETE req => localhost:3000/participate/remove/jam1
-
Start a jam: GET req => localhost:3000/participate/start/jam1
-
get all jams: GET req => localhost:3000/jam/all
-
Get jams of a user: GET req => localhost:3000/jam/user returns an object with jams -> { created, partricipated }
-
Find a specific jam: GET req => localhost:3000/jam/find/jam1
-
Delete a jam: DELETE req => localhost:3000/jam/jam1