Welcome to the Full-stack Solana DApp project repository! This decentralized application (DApp) leverages blockchain technology to implement a movie review platform on the Solana network. Participants can rate a movie by sharing its title, description and the location information.
- Publish movie review
- Update an existing movie review
- Security-related implementations such as rating validations and checking the PDA accounts
/program folder contains all the files that needed to build and deploy our Solana program to Solana Devnet. /frontend folder contains all the files and folders for building and serving our frontend application.
- NPM
- Program ID given from the Solana Playground after deploying the program (can be found from the Solana Explorer by using the used wallet address.)
- Navigate to soldev
- Import the files in the program folder to the playground compiler
- Make sure you're connected to Devnet with a wallet that has a SOL balance for the deployment (go to faucet for free SOL airdrop)
- Navigate to Build & Deploy tab to build and deploy your program
- After a successful deployment, copy the Program ID from the Build & Deploy page
- Clone the repository:
git clone https://github.com/mustafademiray/restaurant_review_program.git
- Navigate to the frontend directory:
cd frontend
- Install required npm packages:
npm install
-
Navigate to /frontend/src/pages/index.tsx and replace the Program ID we have got from the Playground.
-
Start the development server:
npm start
-
Open your web browser and navigate to
http://localhost:3000
to access the DApp. -
Connect your Solana wallet (e.g., Phantom, Backpack) to the DApp.
-
Enter the relevant information for submitting a movie review.
The files in the ./program directory contains the following three files:
instruction.rs
: Contains an implementation of the program logic to select the correct instruction.state.rs
: Helps us accessing the data types and data itself on the Solana account, basically keeps the current state.lib.rs
: Configures the entrypoint of our program and processes the returned instruction.
Contributions to this project are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- Make changes and test thoroughly.
- Commit with clear and concise messages.
- Push changes to your fork.
- Submit a pull request describing your changes.
This project is licensed under the MIT License.