{"id":15990577,"url":"https://github.com/satnaing/devcamper-api","last_synced_at":"2025-10-06T10:51:03.906Z","repository":{"id":105091597,"uuid":"377113471","full_name":"satnaing/devcamper-api","owner":"satnaing","description":"DevCamper API built with NodeJS, ExpressJS, MongoDB and Mongoose.","archived":false,"fork":false,"pushed_at":"2023-07-18T20:56:09.000Z","size":576,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T09:54:13.475Z","etag":null,"topics":["express","expressjs","mongodb","mongoose","rest-api"],"latest_commit_sha":null,"homepage":"https://satnaing.github.io/devcamper-api/","language":"JavaScript","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/satnaing.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T09:50:22.000Z","updated_at":"2025-08-30T23:24:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"2254e515-8411-4ba5-ad7d-c442b6cf2572","html_url":"https://github.com/satnaing/devcamper-api","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.4,"last_synced_commit":"06dddb7ed4e5d4d7a488b7c902fae98a4bf8df72"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/satnaing/devcamper-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satnaing%2Fdevcamper-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satnaing%2Fdevcamper-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satnaing%2Fdevcamper-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satnaing%2Fdevcamper-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satnaing","download_url":"https://codeload.github.com/satnaing/devcamper-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satnaing%2Fdevcamper-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278598596,"owners_count":26013289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["express","expressjs","mongodb","mongoose","rest-api"],"created_at":"2024-10-08T05:22:27.816Z","updated_at":"2025-10-06T10:51:03.865Z","avatar_url":"https://github.com/satnaing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevCampers API\n\nBackend RESTful API built with NodeJS, ExpressJS, MongoDB and Mongoose. Besides CRUD functionalities, this API covers authentication, authorization, image uploads and security preventions.\n\n## Usages\n\nRename \"config/renamethis.env\" to \"config/config.env\" and update your credentials in there.\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Run the App\n\n```\n# Run in dev mode\nnpm run dev\n\n# Run in prod mode\nnpm start\n```\n\n## Indices\n\n- [Authentication](#authentication)\n\n  - [Forgot Password](#1-forgot-password)\n  - [Get Logged in User](#2-get-logged-in-user)\n  - [Login User](#3-login-user)\n  - [Logout User](#4-logout-user)\n  - [Register User](#5-register-user)\n  - [Reset Password](#6-reset-password)\n  - [Update Password](#7-update-password)\n  - [Update User Details](#8-update-user-details)\n\n- [Bootcamps](#bootcamps)\n\n  - [Create New Bootcamp](#1-create-new-bootcamp)\n  - [Delete Bootcamp](#2-delete-bootcamp)\n  - [Get All Bootcamps](#3-get-all-bootcamps)\n  - [Get Single Bootcamp](#4-get-single-bootcamp)\n  - [Update Bootcamp](#5-update-bootcamp)\n  - [Upload Photo](#6-upload-photo)\n\n- [Courses](#courses)\n\n  - [Create Course](#1-create-course)\n  - [Delete Course](#2-delete-course)\n  - [Get Courses for Bootcamp](#3-get-courses-for-bootcamp)\n  - [Get all courses](#4-get-all-courses)\n  - [Get single course](#5-get-single-course)\n  - [Update Course](#6-update-course)\n\n- [Users](#users)\n\n  - [Get all Users](#1-get-all-users)\n\n---\n\n## Authentication\n\nRoutes for authentication including register, login, reset password etc\n\n### 1. Forgot Password\n\nGenerate password token and send email\n\n**_Endpoint:_**\n\n```bash\nMethod: POST\nType: RAW\nURL: {{URL}}/api/v1/auth/forgotpassword\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"email\": \"john@gmail.com\"\n}\n```\n\n### 2. Get Logged in User\n\nGet current user via token\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/auth/me\n```\n\n### 3. Login User\n\nLogin user using email and password\n\n**_Endpoint:_**\n\n```bash\nMethod: POST\nType: RAW\nURL: {{URL}}/api/v1/auth/login\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"email\": \"admin@gmail.com\",\n    \"password\": \"123456\"\n}\n```\n\n### 4. Logout User\n\nClear token cookies\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/auth/logout\n```\n\n### 5. Register User\n\nAdd user to db with encrypted password\n\n**_Endpoint:_**\n\n```bash\nMethod: POST\nType: RAW\nURL: {{URL}}/api/v1/auth/register\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"name\": \"Publisher Account\",\n\t\"email\": \"pub@gmail.com\",\n\t\"password\": \"123456\",\n    \"role\": \"publisher\"\n}\n```\n\n### 6. Reset Password\n\nReset Password via generated token\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: RAW\nURL: {{URL}}/api/v1/auth/resetpassword/009af8aa0f20eb56cf4912b2611c3819b75617f3\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"password\": \"1234567890\"\n}\n```\n\n### 7. Update Password\n\nUpdate logged in user password, send in the body currentpassword and password\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: RAW\nURL: {{URL}}/api/v1/auth/updatepassword\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"currentpassword\": \"1234567890\",\n    \"password\": \"123456\"\n}\n```\n\n### 8. Update User Details\n\nUpdate user name and email\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: RAW\nURL: {{URL}}/api/v1/auth/updatedetails\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"name\": \"John Doe\",\n    \"email\": \"john@gmail.com\"\n}\n```\n\n## Bootcamps\n\nBootcamps CRUD functionality\n\n### 1. Create New Bootcamp\n\nAdd new bootcamp to database. Must be authenticated and must be publisher or admin\n\n**_Endpoint:_**\n\n```bash\nMethod: POST\nType: RAW\nURL: {{URL}}/api/v1/bootcamps\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"name\": \"Devcentral Bootcamp NEW\",\n\t\t\"description\": \"Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in front end and full stack web development\",\n\t\t\"website\": \"https://devcentral.com\",\n\t\t\"phone\": \"(444) 444-4444\",\n\t\t\"email\": \"enroll@devcentral.com\",\n\t\t\"address\": \"45 Upper College Rd Kingston RI 02881\",\n\t\t\"careers\": [\n\t\t\t\"Mobile Development\",\n\t\t\t\"Web Development\",\n\t\t\t\"Data Science\",\n\t\t\t\"Business\"\n\t\t],\n\t\t\"housing\": false,\n\t\t\"jobAssistance\": true,\n\t\t\"jobGuarantee\": true,\n\t\t\"acceptGi\": true\n}\n```\n\n### 2. Delete Bootcamp\n\nDelete bootcamp from database\n\n**_Endpoint:_**\n\n```bash\nMethod: DELETE\nType:\nURL: {{URL}}/api/v1/bootcamps/60c5d59baaf0d053967af896\n```\n\n### 3. Get All Bootcamps\n\nFetch all bootcamps from database. Includes pagination, filtering etc\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/bootcamps\n```\n\n**_Query params:_**\n\n| Key   | Value | Description |\n| ----- | ----- | ----------- |\n| limit | 2     |             |\n| page  | 2     |             |\n\n### 4. Get Single Bootcamp\n\nGet single bootcamp by id\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/bootcamps/60be3c40d1dd1ff2d26b71cd\n```\n\n### 5. Update Bootcamp\n\nUpdate single bootcamp and database\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: RAW\nURL: {{URL}}/api/v1/bootcamps/5d713a66ec8f2b88b8f830b8\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"housing\": false\n}\n```\n\n### 6. Upload Photo\n\nRoute to upload a bootcamp photo\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: FORMDATA\nURL: {{URL}}/api/v1/bootcamps/5d725a1b7b292f5f8ceff788/photo\n```\n\n**_Body:_**\n\n| Key  | Value | Description |\n| ---- | ----- | ----------- |\n| file |       |             |\n\n## Courses\n\nCreate, read, update and delete courses\n\n### 1. Create Course\n\nCreate course with bootcampId\n\n**_Endpoint:_**\n\n```bash\nMethod: POST\nType: RAW\nURL: {{URL}}/api/v1/bootcamps/5d713995b721c3bb38c1f5d0/courses\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"title\": \"Kevin Course\",\n\t\t\"description\": \"This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue\",\n\t\t\"weeks\": 8,\n\t\t\"tuition\": 8000,\n\t\t\"minimumSkill\": \"beginner\",\n\t\t\"scholarhipsAvailable\": true\n}\n```\n\n### 2. Delete Course\n\nDelete course with id\n\n**_Endpoint:_**\n\n```bash\nMethod: DELETE\nType:\nURL: {{URL}}/api/v1/courses/60c20b506cf961abf5f50e59\n```\n\n### 3. Get Courses for Bootcamp\n\nGet the specific course for a bootcamp\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/bootcamps/5d713995b721c3bb38c1f5d0/courses\n```\n\n### 4. Get all courses\n\nGet all courses in the database\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/courses\n```\n\n### 5. Get single course\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/courses/5d725cb9c4ded7bcb480eaa1\n```\n\n### 6. Update Course\n\nUpdate course with course id\n\n**_Endpoint:_**\n\n```bash\nMethod: PUT\nType: RAW\nURL: {{URL}}/api/v1/courses/60c20b506cf961abf5f50e59\n```\n\n**_Headers:_**\n\n| Key          | Value            | Description |\n| ------------ | ---------------- | ----------- |\n| Content-Type | application/json | JSON Type   |\n\n**_Body:_**\n\n```js\n{\n    \"title\": \"HAHA Update Development\"\n}\n```\n\n## Users\n\n### 1. Get all Users\n\nGet all users with Admin acess\n\n**_Endpoint:_**\n\n```bash\nMethod: GET\nType:\nURL: {{URL}}/api/v1/users\n```\n\n---\n\n[Back to top](#devcampers-api)\n\n\u003e Made with \u0026#9829; by [thedevsaddam](https://github.com/thedevsaddam) | Generated at: 2021-06-15 16:05:38 by [docgen](https://github.com/thedevsaddam/docgen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatnaing%2Fdevcamper-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatnaing%2Fdevcamper-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatnaing%2Fdevcamper-api/lists"}