https://github.com/adityarajsingh2904/realworld-nodeapi
A fully functional Medium.com clone backend built using Node.js, Express, and MongoDB
https://github.com/adityarajsingh2904/realworld-nodeapi
backend express- javascript mongodb nodejs- realworld rest-api
Last synced: 7 months ago
JSON representation
A fully functional Medium.com clone backend built using Node.js, Express, and MongoDB
- Host: GitHub
- URL: https://github.com/adityarajsingh2904/realworld-nodeapi
- Owner: Adityarajsingh2904
- Created: 2025-06-26T09:22:24.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-26T09:47:50.000Z (8 months ago)
- Last Synced: 2025-06-26T10:28:33.626Z (8 months ago)
- Topics: backend, express-, javascript, mongodb, nodejs-, realworld, rest-api
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ RealWorld-NodeAPI โ A Medium Clone Backend using Node.js + Express
**RealWorld-NodeAPI** is a backend implementation of the RealWorld spec using **Node.js**, **Express**, and **MongoDB**.
It supports fully functional APIs for articles, users, comments, profiles, and authentication โ just like Medium.
This fork is restructured, refined, and maintained by Aditya Raj Singh.
---
## ๐ Features
- ๐ JWT-based Authentication
- ๐ค User Profile & Follow System
- ๐ CRUD for Articles (with slugs, tags)
- ๐ฌ Comments & Favoriting
- ๐งช Postman-based Test Suite
- ๐ณ Docker Support for MongoDB
- ๐ `GET /api/articles/recommended` endpoint for personalized article suggestions
### Example request
Fetch a list of up to 5 recommended articles for the authenticated user:
```bash
curl -H "Authorization: Token " \
http://localhost:3000/api/articles/recommended?limit=5
```
### Example response
```json
{
"articles": [
{
"slug": "how-to-train-your-dragon",
"title": "How to train your dragon",
"description": "Ever wonder how?",
"body": "You have to believe",
"tagList": ["dragons", "training"],
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T00:00:00.000Z",
"favorited": false,
"favoritesCount": 0,
"author": {
"username": "jake",
"bio": "",
"image": null,
"following": false
}
}
],
"articlesCount": 1
}
```
---
## ๐ Project Structure
```
RealWorld-NodeAPI/
โโโ server.js # Application entry point
โโโ config/ # JWT / DB config
โ โโโ app.js # Express configuration
โ โโโ ...
โโโ routes/ # Express route controllers
โโโ models/ # Mongoose schemas
โโโ tests/ # Postman tests
โโโ package.json
```
---
## โ๏ธ Setup & Run
### Requirements
- Node.js โฅ 18
- MongoDB (local or Docker)
- Postman (optional for testing)
### Installation
```bash
git clone https://github.com/Adityarajsingh2904/RealWorld-NodeAPI.git
cd RealWorld-NodeAPI
cp .env.example .env # create your environment file
npm install
npm run dev
```
### MongoDB with Docker
```bash
npm run mongo:start
```
---
## ๐ฎ API Testing
```bash
npm install -g newman
npm test
```
---
## ๐ค Maintainer
**Aditya Raj Singh**
๐ง thisis.adityarajsingh@gmail.com
๐ [GitHub](https://github.com/Adityarajsingh2904)
---
## ๐ License
Licensed under the **ISC License**.