
Convert a standard web app to a blockchain-based decentralized lottery dapp using Ethereum, Remix, and Web3 tooling, with PayPal payments and testnet deployment.
Install Node.js by downloading the specified version, install it, and run a small script to verify it works; the Windows method is the same, download from the website.
Install Atom text editor by locating, downloading, and opening the application. Explore its packages and styling options to customize your development environment.
Install node package modules and Express, test with Posman, and use Bowsman with MySQL to fetch data for the browser; install node one to restart Narges on any coaching.
In this lecture we install Express js which is a framework for node js.
We get Express via NPM. Visit NPM to know about more npm modules here: https://www.npmjs.com/
Install and configure MySQL and MySQL Workbench, connect to a local server, set a password, and prepare a database for future lectures.
Learn to test web APIs with Postman by posting JSON data to a localhost Node server, verify input handling, fix with a body-parser middleware, and view the returned data.
handleDisconnect vs handDisconnect
Connect a node application to a MySQL database by installing the npm library, configuring a local db connection, and handling reconnects for testing with workbench and GitHub.
Launch MySQL Workbench, create a database named Web app, paste the table creation statement, verify the table exists, and prepare to push data in the next lecture.
students write their first database query to save user information using promises and async/await, inserting email and password into a mysql table, and test with postman.
Create a public directory and an index.html to host and load the app in the browser. Set up a static public path, run localhost:3000, and push updates to GitHub.
Revert to a previous git push or commit when mistakes break your app, using git status and the commit number to reset and restore clean code.
Outline the front-end of a Bootstrap-based funding app, with amount and email inputs, a pay button, and API calls via XII's, plus admin winner selection and reset.
Install React and Babel standalone, set up an index.html with a place to render, and create a simple component to verify React communicates with the backend and renders content.
Add input fields for amount and email and a pay button to save funds to the database, while initializing total amount in state with a React constructor.
Post user data with axios from a browser form, capturing amount and email, and submit to the server to store in the database.
Retrieve the total amount from the server and display it in the browser by fetching data with Axios, updating the component state on mount, and refreshing the UI.
Set up a PayPal based funding gateway by creating a lottery manager and participant, obtaining sandbox REST API credentials, and integrating the PayPal SDK to connect to a sandbox environment.
Install the PayPal SDK with npm install and configure it using your client ID and secret from sandbox. Create payment, redirect to PayPal, confirm it in-app, and push to GitHub.
Create a PayPal payment flow in a dapp using sandbox credentials, wiring a post request, crafting payment data, and redirecting users to the approval URL.
Fund the app by logging in as a test user, performing a PayPal payment of one hundred dollars, and tracking the payment and peer IDs while planning session-based amount retention.
Implement the big winner functionality for a lottery dapp by fetching the total amount from participants, preparing a winner selection, and outlining the transfer to the winner’s wallet.
Fetch the list of participants from the server database, extract emails into an array, and randomly pick a winner. Push the updated code to GitHub and confirm the lottery results.
Finalize the winner function to select a winner, process the payment to the winner's wallet, and set a session flag before deleting lottery participants after the draw.
Learn to implement delete all users functionality in a dapp, export the function, and delete records where id > 0, then test by creating users and pushing code to GitHub.
Test the lottery app end-to-end with PayPal payments and redirect the winner, validating the sandbox payout and wallet update as the project moves toward redesigning the web app.
Transform your app into a polished decentralized interface by applying bootstrap, adding the latest bootstrap scripts and a custom index.css, and sharing the code via GitHub for reuse.
Transition from a Web 2.0 lottery web application to a decentralized application, embracing Web 3.0 and inviting questions and feedback in the decentralized world.
Explore how a decentralized web 3.0 app solves Web 2.0 issues by removing single servers, enabling peer-to-peer payments, transparent contract balances, and privacy through address-only data.
Understand gas as the fee for using the Ethereum network. Learn how gas applies when deploying contracts or calling payable functions, and how miners validate and prioritize higher gas bids.
Navigate the Remix editor, write a simple solidity contract with a lottery, set a message in the constructor, deploy via the JavaScript VM, and read the message value.
Enforce a minimum 0.01 ether entry in a lottery app using a Solidity require statement, inspect MSG value and sender, redeploy the contract, and debug failing transactions.
Use the remakes debugger to trace solidity contract errors, deploy iterations, and locate where the require statement crashes by stepping through functions with a slider.
Complete the lottery app by implementing a pick winner function that only the manager can call, selects a random participant, transfers the contract balance, and resets the participants array.
Create a private sha-256 based random function using block difficulty and current time. Generate a long string and use modulus to select the winner.
Transfer the smart contract balance to the lottery winner and reset the participants array after payout, using index logic to select the winner and prepare for a test network rollout.
Deploy the lottery contract to the Rinkeby test network, confirm 12 blocks, load the contract from its address in Remix to verify the manager address.
Set up the decentralized lottery project workspace, initialize folders and package.json, import Remix contracts, and install React, Next, wallet provider, to connect to a network and render pages.
Create a public Web 3.0 repository for the decentralized lottery app, push contracts, package.json, and lock files to GitHub, and run npm install to auto fetch node_modules.
Set up pages with next by creating a pages folder, building and exporting a lottery component, and running the app on localhost to prepare loading lottery contracts in next lecture.
Build a compile script to generate the ABI and bytecode from the lottery contract, assemble dependencies, export the ABI and address for a React dapp, and push to GitHub.
Render the React front end for the lottery dapp, wiring a form and ether input, and enable a manager-restricted pick winner button to interact with the contract.
Fetch the contract balance and set the total amount in state by connecting the web app to the smart contract address, showing zero when empty.
Fund participants fund a lottery app using metamask by entering ether to participate, validate amounts, convert to wei with Web3 utils, and send to the contract with real-time status updates.
Want to built your own blockchain application?
No worries! This course has got you covered!
Blockchain is the talk of the town, every major company out there are getting into blockchain and there is a lack of blockchain developers! This could be "YOUR" opportunity!
There are not many resources out there for learning Solidity and pretty much nothing that converts standard app to a decentralized one and that's what most companies are looking for.
The purpose of this course is to give you hands on experience in building a centralized and a decentralized app. Basically the best of both worlds from scratch!
I spend a lot of time making sure on providing the easiest possible way to teach everyone how easy it is to get started and made sure that this is the best information you can get.
Want to know about Ethereum? Want to know how Solidity, the language, in which Ethereum smart contracts run? Want to know what is a smart contract?
The answer is in this course!
All the materials here are also perfect for applying for a new job!
Things you need to know?
Basic of Javascript, HTML, CSS will be enough to follow along this course.
Remember that if your in a mac we will be using the terminal a lot so familiarising yourself with it would be great! And for Windows users the process is the same but you should definitely google the commands if you don't know any.
You will get stuck!
But thats why I am always going to be here replying to all the questions!
There is no better time to learn Solidity
Blockchain Developers are the most wanted developers at the moment so don't miss this chance.
What you will be learning!
Ethereum
Solidity
Web3.JS
Metamask
Node.Js
Npm
Async/Await
MYSQL
Express
React JS
GIT
GITHUB
Rest API Design
AXIOS
Postman
CDN
Remix
Debugging
Many more tools
Goal Of The Course
Getting you ready as a blockchain developer, and convert regular centralized applications to decentralized ones.
So why wait?! Grab the course now!
NEW 2025 UPDATES!
Except for the UI View of the websites shown in the course, everything else is the same, so please don't worry about the UI change, and I am always there for supporting you throughout your blockchain journey!
Also this course uses the atom text editor, ofcourse since it was famous back in the days, but now please just upgrade to VScode, or anything you like.