{"id":21017220,"url":"https://github.com/remiljw/mmogo","last_synced_at":"2026-05-18T00:33:16.698Z","repository":{"id":53806694,"uuid":"346171282","full_name":"remiljw/mmogo","owner":"remiljw","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-01T17:55:55.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T14:59:55.960Z","etag":null,"topics":["api","authentication","django"],"latest_commit_sha":null,"homepage":"","language":"Python","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/remiljw.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}},"created_at":"2021-03-09T23:20:14.000Z","updated_at":"2022-02-01T16:59:15.000Z","dependencies_parsed_at":"2022-08-22T05:21:01.203Z","dependency_job_id":null,"html_url":"https://github.com/remiljw/mmogo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/remiljw/mmogo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remiljw%2Fmmogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remiljw%2Fmmogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remiljw%2Fmmogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remiljw%2Fmmogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remiljw","download_url":"https://codeload.github.com/remiljw/mmogo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remiljw%2Fmmogo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","authentication","django"],"created_at":"2024-11-19T10:18:32.049Z","updated_at":"2026-05-18T00:33:16.682Z","avatar_url":"https://github.com/remiljw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mmogo Assessment\n\n[![TeleMedicine](https://circleci.com/gh/remiljw/mmogo.svg?style=svg)](https://circleci.com/gh/remiljw/mmogo)\n\n- This is the backend of the Mmogo Assessment. This repo has to be run simultaneously with the frontend at https://github.com/remiljw/mmogo-frontend\n\n## Setup\n- Clone this repo on your machine \n- cd into 'mmogo' and create a virtualenv and activate it\n- run `pip install -r requirements.txt`\n- create a `.env` file at the root of the project and add the needed variables for the database, reference the settings page to know what variables to set.\n- In your `.env` file set your DOMAIN to be the running port of the react server. i.e `localhost:3000`, set the SITE_NAME to any of your choice. \n- run `python manage.py migrate`\n- run `python manage.py loaddata data.json` to populate the database\n- run `python manage.py runserver`\n- Hurray! you have the back end set up.\n- Visit https://github.com/remiljw/mmogo-frontend to set up the front end.\n\n## Documentation\nBelow are the list of endpoints and what each endpoint does\n\n### Register User \n- https://mmogo-assessment.herokuapp.com/auth/users/\n- - send a POST request  to register a new user, here is a sample request data:\n```json\n    {\n        \"username\": \"test\",\n        \"email\": \"test@test.com\",\n        \"password\": \"Compl!c@ted\"\n    }\n```\n- - sample response:\n```json\n    {\n        \"username\": \"test\",\n        \"email\": \"test@test.com\"\n    }\n```\n- - on successful registeration a user is sent a link via mail to activate the account.\n\n### Activate User \n- https://mmogo-assessment.herokuapp.com/auth/users/activation/\n- - NOTE: the `uid` and `token` are  embedded in the url sent to the user's mail for activation.\n- - -  the url looks like this https://mmogo-frontend.vercel.app/user/activate/confirm/MjU/ajjzio-37af2b8fa556999dd3ff38fc420eab2e where `MjU` is the `uid` and `ajjzio-37af2b8fa556999dd3ff38fc420eab2e` is the `token`\n- - send a POST request  to activate user, here is a sample request data:\n```json\n    {\n        \"uid\": \"MjU\",\n        \"token\": \"ajjzio-37af2b8fa556999dd3ff38fc420eab2e\"\n     }\n```\n\n### Login \n- https://mmogo-assessment.herokuapp.com/auth/token/login/\n- - send a POST request to login, here is a sample request data:\n```json\n    {\n        \"email\": \"test@test.com\",\n        \"password\": \"Compl!c@ted\"\n    }\n```\n- - the endpoint returns a token which will be used for authentiation\n```json\n    {\n        \"auth_token\": \"bBgsduol7p8238ddchdcuou8ds7sdc7\"\n    }\n```\n### Reset User Password \n- https://mmogo-assessment.herokuapp.com/auth/users/reset_password/\n- - send a POST request to receive a link to reset password, here is a sample request data:\n```json\n    {\n        \"email\": \"test@test.com\"\n    }\n```\n### Confirm Password Reset \n- https://mmogo-assessment.herokuapp.com/auth/users/reset_password_confirm/\n- -  NOTE: the `uid` and `token` are in embedded in the url sent to the user's mail for password reset.\n- - - the url looks like this https://mmogo-frontend.vercel.app/password/reset/confirm/GuY/wxttty-2w5f2b8fa556999dd3ff38fc4f7k8 where `GuY` is the `uid` and `wxttty-2w5f2b8fa556999dd3ff38fc4f7k8` is the `token`\n- - send a POST request to set new password, here is a sample request data:\n```json\n    {\n        \"uid\": \"GuY\",\n        \"token\" : \"wxttty-2w5f2b8fa556999dd3ff38fc4f7k8 \",\n        \"new_password\": \"Stre$$ed!\"\n    }\n```\n### Get User Details \n- https://mmogo-assessment.herokuapp.com/auth/users/me/\n- - requires authentication add this to the request header(Same applies for all  endpoints below):\n```json\n    Authorization: \"Token \u003cuser token\u003e\"\n```\n- - send a GET request to get users info. Below is an example response:\n```json\n    {\n        \"username\": \"test\",\n        \"email\": \"test@test.com\" \n    }\n```\n\n### List Companies \n- https://mmogo-assessment.herokuapp.com/api/companies/\n- - remember to add Authentication to headers.\n- - send a GET request to  return  list of companies. Below is an example response:\n```json\n  [\n    {\n        \"id\": 1,\n        \"name\": \"Github\" ,\n        \"address\": \"World Wide Web\",\n        \"phone_no\": \"+14483449034\"\n    },\n    {\n        \"id\": 2,\n        \"name\": \"GitLab\" ,\n        \"address\": \"World Wide Web\",\n        \"phone_no\": \"+14483449034\"\n    }\n   ]\n```\n### Add Favorite \n- https://mmogo-assessment.herokuapp.com/api/fav/{id}/\n-  - remember to add Authentication to headers.\n- - send a POST request to add a company as favorite, where `{id}` is the company's id.\n\n### List Favorites \n- https://mmogo-assessment.herokuapp.com/api/favorites/\n- - remember to add Authentication to headers.\n- - send a GET request to return list of companies a user has as favorites. Below is an example response:\n```json\n  [\n    {\n        \"id\": 1 ,\n        \"company\" : {\n            \"id\": 2,\n            \"name\": \"GitLab\" ,\n            \"address\": \"World Wide Web\",\n            \"phone_no\": \"+14483449034\"\n        }\n    }\n   ]\n```\n\n### Delete Favorite \n- https://mmogo-assessment.herokuapp.com/api/fav/{id}/\n- - remember to add Authentication to headers.\n- - send a DELETE request to delete a company from favorites, where `{id}` is the list's id.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremiljw%2Fmmogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremiljw%2Fmmogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremiljw%2Fmmogo/lists"}