GithubHelp home page GithubHelp logo

rmpasha / blockstarter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eehrari/blockstarter

0.0 2.0 0.0 8.06 MB

Dockerfile 0.06% CSS 15.60% HTML 36.60% JavaScript 45.58% CoffeeScript 1.92% Shell 0.23%

blockstarter's Introduction

ConsensysAcademy 2018 Final Project

Never use migrate in cmd or terminal because it will conflict with docker migration

Dependencies

install this prerequisites to run the project.
Docker:   https://www.docker.com

How to run it

  • Go to project folder.

  • Run the following command:

    docker-compose up --build

    wait almost 5 minute untle all dependencies downloaded

  • Open your browser at the following link:

    your-docker-machine-ip:4000 or localhost:4000

How to test it

  • To log in
    • It is only necessaray to specify a number from 0 to 9, this numebrs will be mapped to the related web.eth.accounts[] account.
  • Create a project
    • Specify the number of available shares (in form of tokens)
    • Specify how much of them will be available

Api

Method Route Params Description
GET /api/v1/ Get Hello World
POST /api/v1/projects see below Create a project
POST /api/v1/projects/fund - project
- backer
- amount
Fund a project
GET /api/v1/projects Get all projects
GET /api/v1/projects/creator/:creator Get all projects created by a creator
GET /api/v1/projects/backer/:backer Get all projects funded by a backer
GET /api/v1/projects/status/:project Show project status
GET /api/v1/projects/:project Show project information
POST /api/v1/projects/withdraw - project
- creator
- amount
Withdraw funds from the project
POST /api/v1/projects/claim-shares - project
- backer
- token
Claim project shares
POST /api/v1/projects/show/shares - project
- backer
Show the shares owned by a backer

Create Project

Requst body:

{
    token: {
        initialSupply: 100, // number of shares
        tokenName: "Example Token",
        tokenSymbol: "Symbol",
        creator: "0x ..." // creator address
    },
    project: {
        title: "Example",
        description: "Frist Project With Token",
        goal: 100, // in ethers
        duration: 120, // in minutes
        sharesAvailable: 50, // number of tokens available (50 %)
        creator: "0x ..." // creator address
    }
}

Project extension

  • A: kill a project when the time is up and the goal is not met.

Metodology

  • Scrum (1 week iteration)

Tools

Technologies:

  • GitLab for VCS

Dev Tools:

  • Server: Node.js
  • Client: Angular.js

Tasks (25; 25 done, 0 in progress, 0 todo)

  • Project contract: withdraw funds (only owner) [ X ]
  • Project contract: claim project shares (only backers) [ X ]
  • MongoDB Connection [ X ]
  • MongoDB Schema Definition [ X ]
  • Create a Project API [ X ]
  • Show Project Info API [ X ]
  • List Projects API [ X ]
  • List Created Project API [ X ]
  • List Backed Project API [ X ]
  • Login API (passport) [ X ]
  • Back a Project API [ X ]
  • Withdraw funds API [ X ]
  • Get Project API [ X ]
  • Show Status API [ X ]
  • Claim Shares API [ X ]
  • Show Share API [ X ]
  • Kill project API [ X ]
  • Project deadline [ X ]
  • Automatic kill when the goal is not met [ X ]
  • Login View [ X ]
  • List projects View [ X ]
  • Create a Project View [ X ]
  • Project Info View [ X ]
  • Back a Project View [ X ]
  • Kill Project View [ X ]

Note

  • In order to test smart contracts go to project app folder and write truffle test
  • Dont migrate the project because it uses docker migration

blockstarter's People

Watchers

James Cloos avatar Rajendra Maharjan avatar

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.