{"id":18699671,"url":"https://github.com/kgotso-koete/conduitapp-back-end","last_synced_at":"2026-04-11T01:54:14.032Z","repository":{"id":42313878,"uuid":"219452308","full_name":"Kgotso-Koete/ConduitApp-back-end","owner":"Kgotso-Koete","description":"Back-end code I wrote following the Thinkster IO tutorial on building a social blogging Medium clone called Conduit","archived":false,"fork":false,"pushed_at":"2023-01-12T01:49:19.000Z","size":634,"stargazers_count":1,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T17:02:45.950Z","etag":null,"topics":["expressjs","full-stack","javascript","node-js","thinkster-io","webapp"],"latest_commit_sha":null,"homepage":"https://conduit-by-kg.firebaseapp.com/","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/Kgotso-Koete.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":"2019-11-04T08:28:55.000Z","updated_at":"2021-10-31T14:01:28.000Z","dependencies_parsed_at":"2023-02-09T09:30:55.660Z","dependency_job_id":null,"html_url":"https://github.com/Kgotso-Koete/ConduitApp-back-end","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kgotso-Koete/ConduitApp-back-end","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kgotso-Koete%2FConduitApp-back-end","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kgotso-Koete%2FConduitApp-back-end/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kgotso-Koete%2FConduitApp-back-end/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kgotso-Koete%2FConduitApp-back-end/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kgotso-Koete","download_url":"https://codeload.github.com/Kgotso-Koete/ConduitApp-back-end/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kgotso-Koete%2FConduitApp-back-end/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270742043,"owners_count":24637504,"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-08-16T02:00:11.002Z","response_time":91,"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":["expressjs","full-stack","javascript","node-js","thinkster-io","webapp"],"created_at":"2024-11-07T11:34:04.017Z","updated_at":"2026-04-11T01:54:07.220Z","avatar_url":"https://github.com/Kgotso-Koete.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About the project\n\nThis is the code I wrote following the [Thinkster IO](https://thinkster.io/) tutorial on building a Medium clone (blogging social network) using the MERN stack (Mongodb Express React and Node) and is based on the ([Thinkster IO Real World App](https://github.com/gothinkster/realworld), from the [Thinkster Full Stack tutorial series](https://thinkster.io/tutorials/fullstack) by [Thinkster IO](https://thinkster.io/)\n\nThis code is for the back end. [here is the tutorial](https://thinkster.io/tutorials/node-json-api). The front end code I wrote can be found [here](https://github.com/Kgotso-Koete/ConduitApp-front-end).\n\n# Click here for the [demo](https://conduit-by-kg.firebaseapp.com/)\n\n# Screen shot of the application\n\n![](/screenshots/Conduit_screenshot_1.png)\n![](/screenshots/Conduit_screenshot_2.png)\n\n# Description and features\n\n## General functionality:\n\n- Authenticate users via JWT (login/signup pages + logout button on settings page)\n- CRU\\* users (sign up \u0026 settings page - no deleting required)\n- CRUD Articles\n- CR\\*D Comments on articles (no updating required)\n- GET and display paginated lists of articles\n- Favorite articles\n- Follow other users\n\n## The general page breakdown is as follows:\n\n- Home page (URL: /#/ )\n  - List of tags\n  - List of articles pulled from either Feed, Global, or by Tag\n  - Pagination for list of articles\n- Sign in/Sign up pages (URL: /#/login, /#/register )\n  - Use JWT (store the token in localStorage)\n- Settings page (URL: /#/settings )\n- Editor page to create/edit articles (URL: /#/editor, /#/editor/article-slug-here )\n- Article page (URL: /#/article/article-slug-here )\n  - Delete article button (only shown to article's author)\n  - Render markdown from server client side\n  - Comments section at bottom of page\n  - Delete comment button (only shown to comment's author)\n- Profile page (URL: /#/@username, /#/@username/favorites )\n  - Show basic user info\n  - List of articles populated from author's created articles or author's favorited articles\n\nThe API specification is listed in the /api folder of this repository\n\n# How to run the code:\n\nThe back end is deployed on Heroku, and the front end is deployed on Firebase. Here is the [demo](https://conduit-by-kg.firebaseapp.com/), and here is the production api link `https://intense-hollows-36762.herokuapp.com/api` that can be used with any front end for requests\n\n## 1: Download Postman API environment\n\nLoad the `Conduit.postman.{{environment}}.json` files in the `/api_spec` folder into Postman\n\n## 2: Install packages\n\nRun `npm install`\n\n## 3: Run Mongodb\n\nNavigate to your local Mongodb folder and run `mongod --dbpath=data --bind_ip 127.0.0.1`\n\n## 4: Run project\n\nRun `npm start`\n\n## 5: Open it\n\nOpen [Postman](https://www.getpostman.com/) and begin making requests to `http://localhost:3000/api/{{request}}`\n\n# Application Structure\n\n1. `app.js` - The entry point to our application. This file defines the express server and connects it to MongoDB using mongoose. It also requires the routes and models to be used in the application.\n2. `config/` - This folder contains configuration for passport as well as a central location for configuration/environment variables.\n3. `routes/` - This folder contains the route definitions for the API.\n4. `models/` - This folder contains the schema definitions for the Mongoose models.\n\n# Authentication\n\nRequests are authenticated using the `Authorization` header with a valid JWT. We define two express middlewares in `routes/auth.js` that can be used to authenticate requests.\n\n1. The `required` middleware configures the express-jwt middleware using our application's secret and will return a 401 status code if the request cannot be authenticated. The payload of the JWT can then be accessed from req.payload in the endpoint.\n2. The `optional` middleware configures the express-jwt in the same way as required, but will not return a 401 status code if the request cannot be authenticated.\n\n# Timesheet log\n\n- Back end\n\n  - Version 1 (Thinkster Tutorial): 22 hours\n  - Version 2 (personal modifications): 7 hours (to add commentCount and Trending article list)\n\n- Front end\n\n  - Version 1 (Thinkster Tutorial): 37 hours\n  - Version 2 (personal modifications): 17 hours\n\n# Acknowledgements\n\nSpecial thanks to [Thinkster IO](https://thinkster.io/) for a great tutorial. The Real World mother of all demo apps is very ambitious and is exactly what the world needs.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n# License\n\nThe codebase is MIT licensed unless otherwise specified.\n\n#\n\nTo be modified further by Kgotso Koete\n\u003cbr/\u003e\nJohannesburg, November 2019\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgotso-koete%2Fconduitapp-back-end","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgotso-koete%2Fconduitapp-back-end","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgotso-koete%2Fconduitapp-back-end/lists"}