Project documentation

This commit is contained in:
Chegele 2023-07-18 20:22:11 -04:00
parent 24b02b841e
commit 74d18a69d4
1 changed files with 30 additions and 53 deletions

View File

@ -1,73 +1,50 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>
# Reputation API
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
## Introduction
Reputation API is an implementation of DGF (DAO Governance Framework) for Reputation. The purpose is to provide a backend API for integrating reputation-based mechanisms into the Vatem decentralized chat platform. This API enables rewarding reputation to members participating in chats and offers additional functionality based on the rewarded reputation such as content filtering, ranking, voting, and much more.
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
For more detailed information about DGF, please refer to the [DOA Governance Framework Wiki](https://daogovernanceframework.com/wiki/DAO_Governance_Framework).
## Description
## Technology Stack
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
### Node.js
[Node.js](https://nodejs.org/) is a JavaScript runtime environment built on Chrome's V8 JavaScript engine. It allows executing JavaScript code on the server-side, providing a powerful platform for building scalable network applications.
## Installation
Node.js is chosen as the runtime environment for the Reputation API due to its scalability, performance, and extensive package ecosystem. It allows us to leverage JavaScript on the server-side, enabling seamless integration with various libraries, frameworks, and tools, and facilitating rapid development.
```bash
$ npm install
```
### TypeScript
[TypeScript](https://www.typescriptlang.org/) is a superset of JavaScript that adds static typing to the language. It helps catch errors at compile-time, provides better tooling and autocompletion, and improves code maintainability and scalability.
## Running the app
TypeScript is chosen for the Reputation API due to its rich type system which enhances code readability and facilitates collaboration in open-source projects. TypeScript's extensive tooling provides autocompletion, code navigation, and refactoring support, boosting developer productivity. Additionally, TypeScript's abstractions make code easier to understand and work with as new contributors look to participate in the project.
```bash
# development
$ npm run start
# watch mode
$ npm run start:dev
### NestJS
[NestJS](https://nestjs.com/) is a progressive Node.js framework for building efficient, scalable, and modular applications. It uses modern JavaScript and TypeScript features, follows architectural patterns such as MVC, and provides robust dependency injection, middleware, and module management.
# production mode
$ npm run start:prod
```
NestJS is the chosen framework for building the Reputation API due to its modular architecture which allows consistency in the project, and TypeScript support for the reasons already listed above. We feel this framework provides the structure necessary for an easily scalable and ever-adapting project as it matures through many prototyping iterations.
## Test
### GraphQL
[GraphQL](https://graphql.org/) is a query language for APIs and a runtime for executing those queries with existing data. It offers a more efficient and flexible approach to data fetching compared to traditional REST APIs, allowing clients to request only the data they need and enabling powerful data manipulation and composition.
```bash
# unit tests
$ npm run test
GraphQL is used as the query language for the Reputation API due to its flexibility, efficiency, and ability to reduce over-fetching and under-fetching of data, providing fine-grained control and improved network performance while working with Graph-based reputational data.
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
```
### Neo4j
[Neo4j](https://neo4j.com/) is a popular graph database that stores data in nodes and relationships, enabling efficient handling of highly connected data. It provides powerful querying capabilities and scalability, making it well-suited for storing and querying posts, citations, members, and their reputation from the backend.
## Support
Neo4j is the graph database of choice for the Reputation API, providing a scalable and performant solution for storing and querying the highly connected data, making it suitable for representing chat/post relationships and complex connections in this reputation-based system.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
## Project Status
The project is currently a work in progress, with the primary focus on designing the core Graph-based components to store posts, citations, members, and their reputation. Once the core reputation service is complete, the next phase will involve creating the API endpoints.
## Stay in touch
## Endpoints
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)
TODO
## License
## Examples
Nest is [MIT licensed](LICENSE).
TODO
## Installations
TODO