Skip to content

infuman69/HackNPitch_Quasar_DCampus

 
 

Repository files navigation

DCampus - Campus Solutions Decentralised 💻

Checkout the Dapp live at: https://d-campus.live/

This site is deployed on rinkeby test network. Your wallet should be connected to rinkeby for viewing this site.


Features

Library

Search on Etherscan

  • EBooks
    Students can download books(in pdf) available in their college library according to their choice. They also get reference to every books in Google Books.
  • Class Notes
    Here anyone can upload their class notes but only the uploader of that class note and librarian can remove them. Details of the notes can also be found like - Stream, Faculty Name,Class Date, upload date, name of the uploader.
    Report option is also available (to all, other than the uploader), which will allow the librarian to maintain discipline.
  • Librarian
    Here college Librarian will be able to upload books and info-book name, book author, description about them in pdf format and can remove them as well.
Foodiegenie

Search on Etherscan

  • Students' section
    Here Students will be able to see the available cuisines/food items in the college canteen, where they will be able to place orders and pay, set their delivery location (hostel or canteen).
  • Owner's section
    The Owner of the canteen will be able to perform these functions: add new food items,change the price, remove any item, change the availability of any food, set the item category and image.
  • Previous Orders
    Owner and Students can keep a track on whatever they have ordered which includes ethereum address of the customer, order amount, ordered item name, ordered quantity, delivery location, room or table no, delivery status, order rating (by the customer), etc.
PGConnect

Search on Etherscan

  • Students' section
    Students search pg options here nearest to the college. They can choose a perfect agreement among wide variety of options according to their needs. They have the power to dislike any service once they used it.
  • Landlords' section
    Landlords provide details about their offerings here. Details include room name, room address, rent per month, one time Security deposit.
  • Transactions
    All details regarding agreements and rent payment are listed here to aviod any sort of confusion between landlords and students.

College Admin's section
The Admin of the college can change the current librarian if needed, PGConnect commision ,current Foodiegenie owner and Foodiegenie commission.

The prospect of the business model of this project depends on the fact that the college authorities (college admin, in this case) get a percent of the amounts transacted as commission (both in PGConnect and Foodiegenie).


Videos
  1. Uploading Books by Librarian
UploadBooks.mp4
  1. Deleting Books by Librarian
DeleteBooks.mp4
  1. LIBRARY EBooks
EBooks.Students.mp4
  1. Uploading Class Notes by Student
UploadNotes.mp4
  1. Reporting Class Notes by Student
Report.Notes.mp4
  1. Deleting Class Notes by Student
Delete.Notes.Student.mp4
  1. Deleting Class Notes by Librarian
Delete.Notes.Librarian.mp4
  1. Requesting Agreement Termination for PG
Request.Termination.mp4
  1. Adding Rooms for PG by Landlord
Add.Room.mp4
  1. Signing Agreement by Student
Sign.Agreement.mp4
  1. Disabling and Enabling Rooms for PG by Admin
Disable.Enable.Room.mp4
  1. Functionality of Admin
Admin.mp4
  1. Add Food
Upload.Food.mp4
  1. Canteen Owner Functionalities
Canteen.Owner.Functionalities.mp4
  1. Order Food
Order.Food.mp4
  1. Deliver Food & Rate Food
Delivery.Rate.Food.mp4

Steps to setup and run this Dapp in localhost:

  1. Fork and clone this repo in local machine.
  2. Run npm install in the in the project directory. This would install all dependencies.
  3. Download Ganache from the official website. Also add & setup MetaMask in browser. We recommend you to follow this.
  4. Install truffle by following this.
  5. Start Ganache, create a New Workspace, and add your project by going to the src directory and selecting truffle-config.js. After this, save this workspace. This would start Ganache with 10 ethereum accounts, containg 100 ether each.
  6. Now go to src directory, open a terminal and run truffle migrate --reset. This would compile the smart contracts and deploy the contracts in the local blockchain (Ganache).
  7. Open MetaMask in your browser and select the network to custom RPC. Here, add a new network. For this, the RPC URL should be the URL shown in your Ganache. The chain id would be the same as the network id in Ganache.
  8. Now select the first account shown in Ganache, and click on the key icon. This would bring up the private key for the account. Copy this private key. Now go to MetaMask (the network should be the custom network you just created), and click on import account. Paste the previously copied private key and and click on import.
  9. MetaMask now should be showing the address of the first Ganache account with 100 ether in it. This is your college admin account. The one who deploys the contracts in always the admin.
  10. Run npm start in the main project directory. This would start the frontend.

Refer to this flowchart for the full procedure:

image


Steps to carry out the transactions in localhost:

At the start, admin is both the librarian and canteen owner.

  1. Import some more accounts from Ganache into MetaMask. Go to Admin section in the navbar of the web-application. Now, make one of the newly imported accounts the librarian. Also change the Canteen Owner. (This step is optional, it's just a feature to change the librarian and canteen owner, in case the college authorities want to authorize someone else for managing these sections.)
  2. Now the respective addresses can perform the desired transactions. The addresses (other than admin, librarian and canteen owner) can be considered as students.

Try changing accounts in MetaMask (and then reloading the page) to see which account is authorized to perform the transactions in the page. If an account isn't authorized to perform a certain transaction, the respective button will appear disabled.

Technologies used: (Development)

  1. Ethereum Blockchain
  2. IPFS
  3. Web browser extension Metamask (recommended) or Nifty wallet.
  4. Truffle
  5. React (Html5, Css3, Bootstrap v5.1)
  6. Node.js (web3.js)
  7. Ganache

Technologies used: (Production Build)

  1. The previous technologies used during development
  2. Front-end deployment: Netlify
  3. Back-end deployment: Infura

Note: Using Brave browser will save the effort to add and setup Metamask as it has its own built-in wallet.

Note: Wait for the previous (or pending) transactions to be completed before attempting any further transactions. This is because transactions take time to mine, forwarding the same transaction requests before completion of the previous, may result in an undesired output.


If you have reached till here, we hope you have successfully run the Dapp in your local machine. Thank You for showing interest in our project. We wish to improve this Dapp in future with all your contributions. Made with ❤️ by Quasar.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.4%
  • CSS 11.5%
  • Solidity 6.2%
  • HTML 0.9%