Giter Club home page Giter Club logo

certificates-generator-system's Introduction

Certificates-Generator-System

A system created for the generation of certificates from worshops and lectures held at CTIC - Coordenadoria de Internet e Data Center

Check the Wiki page for the draft of the aims, enhancements and operation of this system.

Database Usage

There's two functions created for the database: create_user and generate_cert

To create a user, one need to pass as argument to function his Full Name, CPF and the name of the course he is attending to. After the execution, the Private Key of the user is returned, which should be saved somewhere to generate his cert futurelly.

As for generate_cert, one has to pass user Full Name, CPF, course's name and his private key to validate the transaction at the database and afterwards generate his certificate. The certificate is identified by user's CPF and stored on a directory called certificates/ on the current script directory;the function returns a OK message at the end.

Deploy BigchainDB Network

  • Docker:
$ docker pull bigchaindb/bigchaindb:all-in-one

$ docker run \
  --detach \
  --name bigchaindb \
  --publish 9984:9984 \
  --publish 9985:9985 \
  --publish 27017:27017 \
  --publish 26657:26657 \
  --volume $HOME/bigchaindb_docker/mongodb/data/db:/data/db \
  --volume $HOME/bigchaindb_docker/mongodb/data/configdb:/data/configdb \
  --volume $HOME/bigchaindb_docker/tendermint:/tendermint \
  bigchaindb/bigchaindb:all-in-one

There's also a docker-compose.yaml in BigchainDB repo that easily deploys a one-node BigchainDB network.

For a 4 nodes network, check stack.sh script on BigchainDB repo.

https://docs.bigchaindb.com/projects/contributing/en/latest/dev-setup-coding-and-contribution-process/run-dev-network-stack.html#download-the-scripts

  • Kubernetes / Helm

helm install --name bdb k8s/bdb/

Demo

  • Clone this repo
  • Initialize a virtual enviroment and source it: virtualenv app && source app/bin/activate
  • Install dependencies: pip install -r requirements.txt
  • Run the api: python api.py
  • Send a POST request to api endpoint localhost/apiv1 with parameters: user_private_key= marco_aurelio_key' 'full_name', 'cpf' and 'course_name' so that a user will be created.
  • Query the database to check your transaction commited to the blockchain: bdb.assets.get(search='full_name_choosen')

certificates-generator-system's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

certificates-generator-system's Issues

Different API routes for CREATE and TRANSACTION queries

There needs to be a way to allow only specific users to perform CREATE and leave all the client users to perform TRANSACTION by default, that's the way certificates will be generated by now.

One choice is to set at the API routes somehow that only the hardcoded private keys can make a request to that route and so that perform a CREATION, thus preventing users from creating fake assets and messing with the system.

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.