MCPcopy
hub / github.com/dev-mastery/comments-api

github.com/dev-mastery/comments-api @main sqlite

repository ↗ · DeepWiki ↗
49 symbols 135 edges 41 files 0 documented · 0%
README

DevMastery Comments Microservice API

To manage comments on various Dev Mastery properties.

Using Clean Architecture for Microservice APIs in Node.js with MongoDB and Express

In this video we talk about Bob Martin's Clean Architecture model and I will show you how we can apply it to a Microservice built in node.js with MongoDB and Express JS - @arcdev1

Features

Running Locally

Prerequisites

1. Clone the repo and install dependencies

git clone 
cd comments-api
npm i

2. Modify the .env file

Save sampledotenv as .env and then add your database and Content Moderator + Akismet API details.

3. Startup your MongoDB

Usually this is just: mongod on the command line.

4. Start the server

To run in production mode where code is transpiled by Babel into a dist folder and run directly in node:

npm start

To run in development mode where code is run by babel-node via nodemon and re-transpiled any time there is a change:

npm run dev

Core symbols most depended-on inside this repo

makeFakeComment
called by 81
__test__/fixtures/comment.js
makeDb
called by 10
src/data-access/index.js
makeHandleModeration
called by 7
src/use-cases/handle-moderation.js
makeCommentsDb
called by 6
src/data-access/comments-db.js
makeRemoveComment
called by 5
src/use-cases/remove-comment.js
makeEditComment
called by 5
src/use-cases/edit-comment.js
makeAddComment
called by 5
src/use-cases/add-comment.js
makePostComment
called by 3
src/controllers/post-comment.js

Shape

Function 43
Method 4
Class 2

Languages

TypeScript100%

Modules by API surface

src/data-access/comments-db.js9 symbols
src/use-cases/remove-comment.js7 symbols
jest-mongo.js6 symbols
src/is-questionable/is-questionable.js5 symbols
src/comment/index.js3 symbols
__test__/fixtures/db.js3 symbols
src/use-cases/list-comments.js2 symbols
src/comment/comment.js2 symbols
__test__/fixtures/comment.js2 symbols
src/use-cases/handle-moderation.js1 symbols
src/use-cases/edit-comment.js1 symbols
src/use-cases/add-comment.js1 symbols

Dependencies from manifests, versioned

@babel/cli7.2.3 · 1×
@babel/core7.3.4 · 1×
@babel/node7.2.2 · 1×
@babel/preset-env7.3.4 · 1×
@devmastery/pipe0.0.6 · 1×
axios0.18.0 · 1×
babel-jest24.4.0 · 1×
babel-plugin-inline-dotenv1.2.2 · 1×
body-parser1.18.3 · 1×
cuid2.1.6 · 1×
dotenv6.2.0 · 1×
eslint5.15.1 · 1×

For agents

$ claude mcp add comments-api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact