Odinbook is a social media clone done as the final deliverable for the popular full stack web development course: The Odin Project.
- The base URL is: https://odinbook-ben.herokuapp.com
| Description | Method | URL |
|---|---|---|
| Signup | POST | /api/auth/signup |
| Login | POST | /api/auth/login |
| Login as guest | POST | /api/auth/testdrive |
| Login with Facebook | POST | /api/auth/facebook |
| Get all users | GET | /api/users |
| Get own user profile | GET | /api/users/info |
| Get one user profile | GET | /api/users/:userId |
| Description | Method | URL |
|---|---|---|
| Request friend | POST | /api/friends/req |
| Reject friend | DELETE | /api/friends/cancel |
| Accept friend | PUT | /api/friends/accept |
| Description | Method | URL |
|---|---|---|
| Create post | POST | /api/posts |
| Get own feed | GET | /api/posts |
| Get one post | GET | /api/posts/:id |
| Like/unlike post | PUT | /api/posts/:postId/like |
| Description | Method | URL |
|---|---|---|
| Create comment | POST | /api/posts/:postId/comments/ |
| Like/unlike comment | PUT | /api/posts/:postId/comments/:commentId/like |
Users are authenticated with JWT tokens each time they login to the service. The token is then stored in local storage and used to make all subsequent API calls until the user logs out.