# appit-blog-module

> ## feature

Latest version **1.1.0** (published 2020-10-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install appit-blog-module
pnpm add appit-blog-module
yarn add appit-blog-module
bun add appit-blog-module
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-10-22 |
| First published | 2020-10-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | unnatch |

## Links

- npm: https://www.npmjs.com/package/appit-blog-module
- npm.io page: https://npm.io/package/appit-blog-module

## Dependencies (1)

- [mongoose](https://npm.io/package/mongoose.md) ^5.10.3

## Recent versions

- 1.1.0 (latest) — 2020-10-22
- 1.0.0 — 2020-10-21

## README

# Blog Module

## feature

-   basic blog attribute similar to aia-one cms
-   have to login to fetch data
-   fetch comments per blog
-   fetch likes per blog
-   comment on blog
    -   allow multiple submit per user
    -   cannot edit
    -   cannot delete
-   like the blog
    -   only once per user
    -   either like / remove like
-   subscribe blog section
    -   only once per user
    -   either subscribe / unsubscribe
-   control blog visibility by field `publishStartTime` & `publishEndTime` ( for Scheduled ) / `isDeleted`
-   only text based content is allowed

```js
schema for comments
{
    userId: ( ObjectId ),
    content: ( html string ),
    createdAt: ( date ),
}
schema for likes
{
    _id: false,
    userId: ( ObjectId ),
    createdAt: ( date ),
}
schema for subscribers
{
    _id: false,
    userId: ( ObjectId ),
    email: (string)
    createdAt: ( date ),
}
schema for blog
{
    // Basic Attribute
    _id: ,
    content: ( multi_lang html string ),
    title: ( multi_lang string ),
    author: ( multi_lang string ),
    coverImage: ( url string ),
    publishStartTime: ( date ),
    publishEndTime: ( date ),
    isDeleted: ( boolean ),
    viewCount: ( number ),
    tags: [ (string) ],

    // Additional Feature
    comments: [ ( schema for comments ) ],
    likes: [ ( schema for likes ) ],

    // Access Control
    roleCanAccess: [ (sting) ]

    // subscriber ( special record only contain _id & subscribers field )
    subscribers: [ ( schema for subscribers ) ],
}
```

```js
Business logic to impletement
// basic crud method
function getList() =>
function getOne() =>
function updateOne() =>
function disableOne() =>

// additional feature
function handleComment() =>
function handleLike() =>
function handleSubscribe() =>
```

---
_Source: https://npm.io/package/appit-blog-module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
