ETH Pizza is a POS SaaS product for a fictional pizza restaurant built using blockchain technology. It is designed to handle payments, store payment data, manage rewards points and gift cards, and provide interfaces for employees and users.
The purpose of this project is to showcase how blockchain can be integrated into small businesses and provide real value. It will also demonstrate my wide knowledge of software development, as it will contain everything from project management to backend services to smart contracts.
- Ethereum blockchain
- Solidity smart contracts
- Next js frontend using typescript, react and Tailwind css
- GoLang backend
- openAI tools for planning and development help
To install and run the ETH Pizza project, follow these steps:
-
Clone the repository to your local machine.
-
Create a .env in each of the directories (there is an ex.env in each) and populate api key values.
- Next steps will explain how to get the mongoDB and contract address values for /backend/.env
- Default backend server used by the frontend is the live version on ethpizza.biz, if you want to use your own as done below, replace the endpoint value in /frontend/.env with localhost:8080
- The private key in smart-contracts/.env will be the only wallet that can create new orders. Anyone however, can pay.
-
Create a MongoDB instance for your database. You will need to paste the connection URI into the backend .env file
- You will need to create a Database named "data" with 2 collections named "orders" and "menuItems"
- Menu items will need to be added to the database. You can copy the ones I use here or add your own according to the same schema.
-
Install the necessary dependencies in /frontend and /smart-contracts using
npm install
. -
Start the /backend server using
go run main.go
. -
Start the frontend server using
npm run dev
. -
In the /smart-contracts directory run
npx hardhat node
to start a local node. -
Deploy smart contracts with
npx hardhat deploy --network local
you will be returned with a contract address -
Populate that address in the /backend .env
-
In parent directory run
cp /smart-contracts/deployments/local/Router.json /frontend
to copy the Router deployment file to the frontend -
Visit localhost:8080 to see the site!
The ETH Pizza POS system will have the following features, as defined by the fictional pizza restaurant owner (GPT-4):
- Ethereum payment integration
- Real-time conversion rates
- QR code generation
- Transaction confirmation
- Refund functionality
- Sales reporting
- Tax compliance
- Security
- User-friendly interface
- Scalability
- Customer loyalty program
The user-friendly interface will have the following features, as defined by a pretend pizza chain worker:
- Clear and organized layout
- Search functionality
- Customization options
- Order summary and modifications
- Efficient payment processing
- Order tracking and history
The following features will not be included in the ETH Pizza project:
- Development of a mobile app or web-based version of the POS system.
- Ongoing maintenance and updates after the initial release.
- Custom hardware development or procurement for the POS system.
- Employee training and onboarding.
- Beautiful/fancy styling for the frontend.
- Advanced testing or support for edge cases.
- Convenient scripting or interfaces for addition of new features.
- Employee management or separate logins.
- Customer facing application for rewards or order tracking.
The developer will be the only stakeholder and will take on all roles in the project, being a portfolio project the only interest is to be impressive and demonstrate clear knowledge of software development.
The projects construction is documented on Medium in a series: https://medium.com/@carsonpcase