Giter VIP home page Giter VIP logo

r-cell's Introduction

R-Cell๐Ÿช™

The project aims at building its own cryptocurrency from scratch using block chain technology. The project uses Python language along with Flask Frameworks to deploy it on a localhost server. This project therefore not only gets us to know about block chain, encryptions and keys but also brings us closer to the world of cryptocurrency whose value is increasing day by day in the modern era.

๐Ÿ“ƒTable Of Contents

๐Ÿ™‚Introduction

๐Ÿค”About Project

The project uses Blockchain Technology by implementation through Python and Flask in the backend for a server. It further uses SQL database for storing the user data such as password, username, email, account balance etc. Through HTML/CSS and JavaScript the Blockchain is deployed on a website. The website is on a local-host. This project enhances the knowledge of blockchain technology which has a very high potential in future.

โš™๏ธTech-Stack

Python Java Script css html flask VS Code MySQL Block-Chain

๐Ÿ“File Structure

R-Cell(main)
โ”œโ”€ static                   
โ”‚  โ”œโ”€ css                   
โ”‚  โ”‚  โ”œโ”€ index.css          
โ”‚  โ”‚  โ”œโ”€ layout.css         
โ”‚  โ”‚  โ”œโ”€ login.css          
โ”‚  โ”‚  โ””โ”€ register.css       
โ”‚  โ””โ”€ images                
โ”‚     โ”œโ”€ background.jpeg    
โ”‚     โ”œโ”€ favicon.ico        
โ”‚     โ”œโ”€ favicon2.png       
โ”‚     โ”œโ”€ home.png           
โ”‚     โ””โ”€ profile.png        
โ”œโ”€ templates                
โ”‚  โ”œโ”€ handlers              
โ”‚  โ”‚  โ””โ”€ 404.html           
โ”‚  โ”œโ”€ includes              
โ”‚  โ”‚  โ”œโ”€ _formhelpers.html  
โ”‚  โ”‚  โ””โ”€ _messages.html     
โ”‚  โ”œโ”€ buy.html              
โ”‚  โ”œโ”€ dashboard.html        
โ”‚  โ”œโ”€ index.html            
โ”‚  โ”œโ”€ layout.html           
โ”‚  โ”œโ”€ login.html            
โ”‚  โ”œโ”€ register.html         
โ”‚  โ””โ”€ transaction.html      
โ”œโ”€ app.py                   
โ”œโ”€ blockchain.py            
โ”œโ”€ forms.py                 
โ””โ”€ sqlhelpers.py

โš’๏ธGetting Started

๐Ÿ˜Pre-requisites

The project involes the installation of following libraries and environment:

  • Firstly obviously you should have Python3.
  • Some basic libraries and frameworks will come pre-installed but you'll require MORE!!
  • Flask: This the the framework that supports the website so installing this is a must else it'll throw ERRORS!!
  • Requests: This module is used only once :(, but none the less it is important.
  • An SQL connection with Flask: This library ensures a connection between the MySQL Database and the Flask framework.
  • wtforms: A python library used for getting inuput from a user in forms

Install all these requirements:

$ pip install -r requirements.txt
  • After install Mysql on your PC open your prompt and type:
    $ mysql -u root -p
    
    and enter the password
  • After follow thw following steps:
    $ CREATE DATABASE crypto;
    
    $ USE crypto;
    
    $ CREATE TABLE users(name varchar(50), email varchar(30), username varchar(30), password varchar(100));
    
    $ CREATE TABLE port5000(number varchar(10), hash varchar(64), previous varchar(64), sender varchar(30), recipient varchar(30, amount varchar(30), nonce varchar(20));
    
    $ CREATE TABLE port5001(number varchar(10), hash varchar(64), previous varchar(64), sender varchar(30), recipient varchar(30, amount varchar(30), nonce varchar(20));
    
    This is for 2 ports, for multiple ports make multiple tables and thus make changes in the list of connected tables in the app.py file accordingly

๐Ÿ’ปUsage

Assuming you have git, follow the following process

  1. Clone the Git Repo:

    $ git clone https://github.com/AsRaNi1/R-Cell.git
    
  2. Go into the Repo directory

    $ cd ../R-Cell
    
  3. Run the app.py file in the directory with a port number

    $ python app.py 5000
    
  4. Run app.py again but this time witha different port number, 5001

    $ python app.py 5001
    
  5. 2 local-host server address will open on the 2 different terminals image image

  6. Register 2 accounts on the 2 different ports and thus there 2 ports become 2 different users. For more users make more tables and add them in the list of connected users in app.py

  7. Now show this to your friends and boast about how you've created your own crypto-currency and that you're going to become a millionaire๐Ÿค‘

๐Ÿ“ทGlimpses

image

Gdrive

Drive Link

๐Ÿ˜ตโ€๐Ÿ’ซTrouble Shooting

The making of this project tackled numerous obstacles. Some were tricky, while some were very easy to solve.

  1. The first problem faced was that the team was not working ๐Ÿ™‚. This was the most tough and complex problem to solve since each member had to come out of their comfort zone and contribute.
  2. Installations: The various modules to be installed keep getting updates regularly and so does their way of working, so managing to work with different versions of the same package/module was tricky indeed.
  3. Understanding: Understanding Block-Chain, i.e getting its intuition at first was a bit difficult but eventually as we progressed the concept was well inherited.
  4. Programming: Some of the members were seeing some new python syntax's and how to use the different modules.
  5. Debugging: No comments.
  6. Choosing a good website design: Choosing this was so tough that we try to keep adding new features regularly.
  7. Deploying the blockchain: To deploy it on a server was not possible since blockchain is de-centralized, therefore for this SQL Tables were used for each user.

๐Ÿ”ฎFuture Scope

Here are a few things we are planning on adding in the future

  • Wallet
  • mempools
  • The webdev part requires a lot more efforts and we'll try and iumplement that throught react.js

๐Ÿ‘จโ€๐Ÿ’ปContributors

๐Ÿ™Mentors

A very special thanks to the mentors!!

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.