Welcome to Cypher, a decentralized platform for issuing and validating certificates using blockchain and IPFS. Cypher ensures secure, tamper-proof certification by combining smart contracts, IPFS storage, and modern Web3 technologies.
Follow these steps to set up and run Cypher locally:
First, install the required dependencies including html2canvas and jspdf for PDF generation:
# Install project dependencies
npm install
# Install PDF generation dependencies
npm install html2canvas jspdf
# If you're using TypeScript, you might also want to install the type definitions
npm install --save-dev @types/html2canvas @types/jspdf- Create a Firebase project at Firebase Console
- Create a new web app in your Firebase project
- Copy the configuration object from Firebase and create a new file at
src/config/firebase.tswith the following content:
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
};
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
export const auth = getAuth(app);
export const db = getFirestore(app);
export default app;Note: The
firebase.tsfile is included in.gitignorefor security reasons. Make sure to keep a backup of your Firebase configuration.
git clone https://github.com/Dipesh-Dubey/cypher-certify-flow.git
cd cyphernpm installAt the root of your project, create a .env file and add the following environment variables:
VITE_CONTRACT_ADDRESS=<deployed_smart_contract_address>
VITE_RPC_URL=http://127.0.0.1:7545
VITE_CHAIN_ID=0x539
# Server-side only (do NOT prefix with VITE_)
PINATA_API_KEY=<your_pinata_api_key>
PINATA_SECRET_API_KEY=<your_pinata_secret>- Open Ganache and start a new workspace or quickstart project.
- Ensure it's running on
http://127.0.0.1:7545. - Use one of the accounts' private keys for MetaMask.
- Import an account from Ganache using its private key.
- Add a custom network with the following details:
- Network Name: LocalHost 8545 (default label)
- RPC URL:
http://127.0.0.1:7545 - Chain ID:
1337 - Block Explorer URL: (leave blank)
💡 If the wallet balance doesn’t show up, reconnect MetaMask to
localhostusing the above RPC settings and re-import.
- ✅ Pinata: Use the provided backend proxy (no secrets in the client).
- ✅ Firebase: Confirm Firebase services are properly initialized.
- ✅ API Server:
npm run dev:serverto start the backend proxy for Pinata athttp://localhost:4000.
- Certificate creation and blockchain-based authentication.
- Storage of certificates on IPFS.
- Validation of certificates using smart contracts.
- Display of user-issued certificates on the homepage post-login.
🚧 Role-based access control (admin vs. user) is pending implementation.
- Problem: Wallet details (including RPC URL) need to be entered twice sometimes.
- Cause: MetaMask may fail to persist custom network data.
- Workaround: Use only the
localhost:7545connection and remove all other networks in MetaMask.
| Parameter | Value |
|---|---|
| RPC URL | http://127.0.0.1:7545 |
| Network Name | LocalHost 8545 |
| Chain ID | 1337 |
| Block Explorer | (leave empty) |
- Always clear unnecessary MetaMask connections to avoid network issues.
- Keep
.envvalues up to date with contract and account changes. - Only use the Ganache testnet (
localhost:7545) for consistent behavior. - Use
npm run devto start the frontend locally.
- Proper role-based separation between admin and users.
- Better MetaMask connection handling.
- UI enhancements for the certificate dashboard.
- Deployment to Polygon Mumbai or another public testnet.
For issues with Pinata access or Firebase setup, contact us.
Made by the Cypher Team.