# large-core

> Core services for Large

Latest version **0.0.34** (published 2022-03-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install large-core
pnpm add large-core
yarn add large-core
bun add large-core
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.34 |
| Published | 2022-03-02 |
| First published | 2019-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 252.6 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Patrick Toner |
| Maintainers | ptoner |
| Keywords | framework7, template, ios, android, mobile, app, cordova, phonegap |

## Links

- npm: https://www.npmjs.com/package/large-core
- Repository: https://github.com/ptoner/large-core
- Homepage: https://github.com/ptoner/large-core#readme
- Issues: https://github.com/ptoner/large-core/issues
- npm.io page: https://npm.io/package/large-core

## Dependencies (8)

- [ipfs](https://npm.io/package/ipfs.md) 0.62.1
- [ethers](https://npm.io/package/ethers.md) 5.5.4
- [moment](https://npm.io/package/moment.md) 2.29.1
- [level-js](https://npm.io/package/level-js.md) 6.1.0
- [orbit-db](https://npm.io/package/orbit-db.md) 0.28.1
- [it-to-buffer](https://npm.io/package/it-to-buffer.md) 2.0.2
- [orbit-db-pouch](https://npm.io/package/orbit-db-pouch.md) 0.0.6
- [quill-delta-to-html](https://npm.io/package/quill-delta-to-html.md) 0.11.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.34 (latest) — 2022-03-02
- 0.0.33 — 2022-03-01
- 0.0.32 — 2022-03-01
- 0.0.30 — 2022-03-01
- 0.0.28 — 2020-04-11
- 0.0.26 — 2020-04-09
- 0.0.25 — 2020-02-20
- 0.0.24 — 2019-12-12
- 0.0.23 — 2019-12-12
- 0.0.21 — 2019-12-10
- 0.0.20 — 2019-12-10
- 0.0.19 — 2019-12-10
- 0.0.17 — 2019-12-10
- 0.0.16 — 2019-12-10
- 0.0.15 — 2019-12-07
- … 10 more at https://npm.io/package/large-core/versions

## README

# Large Core

[![npm version](https://badge.fury.io/js/large-core.svg)](https://badge.fury.io/js/large-core)


![image](https://raw.githubusercontent.com/ptoner/Large/master/www/images/logo_white.png)

**Large Core** is a library that helps you built P2P Typescript apps using [IPFS](https://github.com/ipfs/ipfs), [OrbitDB](https://github.com/orbitdb/orbit-db), and [Ethereum](https://github.com/ethereum/solidity). 

It provides:

* A configured OrbitDB instance.

* An [ethers.js](https://github.com/ethers-io/ethers.js/) Ethereum wallet.

* Pre-built data services

    * **Profile Service** - Each wallet has a user profile. Use the default or expand it with other fields.
    * **Friend Service** - Follow other users. Automatically get updates to their posts and profiles.
    * **Read Only Post Service** - Load a large feed of posts and easily page through it. It's very lazily-loaded. Posts can not be edited.
    * **Blog Post Service** - A post service that allows for posts to be updated. Can still be paged through without loading all of the content. Loads a bit more data than the read only post service.
    * **Page Service** - Manage static pages. 
    * **Group Service** - Not available yet. Will manage groups.
    * **Schema Service** - Each Large instance has a schema that it adheres to. 
    * **Wallet Service** - Used in cases where MetaMask is not available.
    * **Site Settings Service** - Basic info about the website. 
    * **Feed Monitor Service** - Manages subscriptions to various post feeds. Listens for updates to all feeds and puts any posts it finds into the user's main feed.

* Works in the browser, Electron, and (soon) Android/iOS.
    * Use MetaMask or a built-in wallet instead. 

* Data is stored in IPFS and OrbitDB. Right now all data is unencrypted. This will likely change.

* Ethereum is used to authenticate messages. 



# Install

Include as a dependency in your package.json

```javascript
  "dependencies": {
    "large-core": "0.0.7"
  }   
```

# Usage

```javascript

    import Core from 'large-core'


    //Initialize. It will need to be inside an async function
    try {
        await Core.initialize()
    } catch(ex) {
        console.log(ex)
    }
    


    //Access services
    let walletService:WalletService = Core.walletService
    let processFeedService:ProcessFeedService = Core.processFeedService
    let profileService:ProfileService = Core.profileService
    let postService:PostService = Core.postService
    let friendService:FriendService = Core.friendService
    let schemaService:SchemaService = Core.schemaService
    let identityService:IdentityService = Core.identityService
    let imageService:ImageService = Core.imageService

```



# Events

updated-unread-posts //TODO: Add detail

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