Giter Site home page Giter Site logo

if-domain's Introduction

if-domain

if-domain is a TypeScript-based repository that provides a set of REST API endpoints for creating and managing projects, updating project licenses, declarations, contributors, relations, locations, and proposing contributions. Additionally, the repository also provides endpoints for claiming projects from losh. To ensure the security of user data, if-domain utilizes Zenflows-crypto flow to verify the user's signature. When a user sends a request, they sign it with their eddsa key. The server then verifies the signature using the eddsa public key provided by Zenflows server. This verification process ensures that the request was indeed sent by the user and has not been tampered with in transit. By implementing this security measure, if-domain can guarantee the integrity of user data and protect against unauthorized access or malicious activities.

Requirements

To use if-domain, you will need to have the following installed on your machine:

Node.js (v18) pnpm (v6.14.2 or higher)

Installation

Clone the repository using the following command:

git clone https://github.com/phoebubs-84/if-domain.git --recurse-submodules

Note: The --recurse-submodules option is required to clone the submodule used by if-domain.

Navigate to the cloned repository:

cd if-domain

Install dependencies using pnpm:

pnpm install

To use the if-domain service, you will need to provide and configure a .env.local file. This file should include the following variables:

  • GRAPHQL_ENDPOINT: This should be set to the GraphQL endpoint URL for the service.
  • ZENFLOWS_ID: This should be set to the Zenflows ID to comunicate with a zenflows instance.
  • UNIT_ONE: This should be set to the Unit One ID provided from a zenflows instance.
  • LOSH_ID: This should be set to the System User Losh ID.
  • WALLET_ENDPOINT: This should be set to the wallet endpoint URL for the service.
  • IDEA_POINTS_ON_FORK, IDEA_POINTS_ON_CREATE, IDEA_POINTS_ON_CONTRIBUTIONS, IDEA_POINTS_ON_STAR, IDEA_POINTS_ON_WATCH, IDEA_POINTS_ON_ACCEPT, and IDEA_POINTS_ON_CITE: These variables should be set to the number of idea points awarded for the corresponding actions.
  • STRENGTHS_POINTS_ON_FORK, STRENGTHS_POINTS_ON_CREATE, STRENGTHS_POINTS_ON_CONTRIBUTIONS, STRENGTHS_POINTS_ON_STAR, STRENGTHS_POINTS_ON_WATCH, STRENGTHS_POINTS_ON_ACCEPT, and STRENGTHS_POINTS_ON_CITE: These variables should be set to the number of strength points awarded for the corresponding actions.

Usage

To build the project, use the following command:

pnpm build

This will create a build folder in the project directory containing the compiled code. To start the server, use the following command:

pnpm start

This will start the server on port 3000.

To run the server in development mode, use the following command:

pnpm dev

This will start the server with nodemon, which will automatically restart the server whenever changes are made to the code.

API Endpoints

The following are the available REST API endpoints provided by if-domain:

Endpoint Interface Returned Values Use Case
/project/create TBD TBD Create a new project.
/project/:id/update/licenses TBD TBD Update the licenses for a project with the given id.
/project/:id/update/declarations TBD TBD Update the declarations for a project with the given id.
/project/:id/update/contributors TBD TBD Update the contributors for a project with the given id.
/project/:id/update/relations TBD TBD Update the relations for a project with the given id.
/project/:id/update/locations TBD TBD Update the locations for a project with the given id.
/project/:id/propose/contribution TBD TBD Propose a contribution for the project with the given id.
/resource/:id/claim TBD TBD Claim a resource with the given id.
/proposal/:id/accept TBD TBD Accept a contribution proposal with the given id.
/proposal/:id/decline TBD TBD Decline a contribution proposal with the given id.

License

if-domain

Copyright (c) 2021-2022 Dyne.org foundation, Amsterdam

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

if-domain's People

Contributors

phoebus-84 avatar

Watchers

 avatar

if-domain's Issues

fix zencode verify signature

zenroom exec gives this error: Release version: 3.0.0\n . Build commit hash: f0193d51\n . ECDH curve is SECP256K1\n . ECP curve is BLS381\n . Memory in use: 419 KB\n[!] ERROR:\n[!] [string "..."]:2: syntax error near 'eddsa'\n[!] Execution aborted\n[!] Execution aborted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.