reputation-api/README.md

57 lines
4.2 KiB
Markdown
Raw Normal View History

2023-07-18 19:22:11 -05:00
# Reputation API
2023-06-20 15:52:43 -05:00
2023-07-18 19:22:11 -05:00
## 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.
2023-06-20 15:52:43 -05:00
2023-07-18 19:22:11 -05:00
For more detailed information about DGF, please refer to the [DOA Governance Framework Wiki](https://daogovernanceframework.com/wiki/DAO_Governance_Framework).
2023-06-15 15:37:20 -05:00
2023-07-19 05:38:17 -05:00
## Development
Install [nvm](https://nvm.sh), and then use it to install the correct version of `node`
nvm install
2023-07-18 19:22:11 -05:00
## Technology Stack
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
### 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
### 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
### 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
### 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
### 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
## 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.
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
## Endpoints
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
TODO
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
## Examples
2023-06-15 15:37:20 -05:00
2023-07-18 19:22:11 -05:00
TODO
## Installations
TODO