Metalog is a decentralized mental health platform that prioritizes security and anonymity using Internet Computer Protocol (ICP). This application provides professional psychologist consultations, an AI assistant, and a mental health community within a secure and trusted ecosystem.
-
π©Ί Professional Consultation β Private sessions with certified psychologists, ensuring user comfort and anonymity.
-
π€ AI Mental Health Assistant β AI-powered chatbot providing mental health recommendations and analyze psychologist consultations.
-
π Security & Privacy β User data is secured using blockchain technology and ICP-based encryption, ensuring confidentiality.
-
π° ICP Token Payments β Seamless transactions using ICP tokens, providing fast, efficient, and transparent payments.
-
π¬ Supportive Community β An interactive forum for users to share experiences, provide support, and discuss mental health in an anonymous environment.
Metalog uses dfx (Dfinity SDK), Node.js, and Vite for deployment.
# Install Dfinity SDK (dfx)
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
# Check dfx version
dfx --version
# Clone repository & install dependencies
git clone https://github.com/recov-ai/ICP-Hackethon.git metalog
cd metalog
npm install
Ensure the .env file is set up in metalog_frontend/.env:
VITE_BACKEND_CANISTER_ID=<CANISTER_ID_METALOG_BACKEND>
VITE_FRONTEND_CANISTER_ID=<CANISTER_ID_METALOG_FRONTEND>
VITE_AUTH_PROVIDER=https://identity.ic0.app
πΉ Replace <CANISTER_ID_METALOG_BACKEND> and <CANISTER_ID_METALOG_FRONTEND> with the actual canister IDs after running dfx deploy.
dfx start --background
rm -rf .dfx node_modules .vite
dfx deploy --network local
npm run dev
π Access the application:
- π Frontend: http://localhost:5173/?canisterId=<CANISTER_ID_METALOG_FRONTEND>
- π Backend Candid UI: http://127.0.0.1:4943/?canisterId=<CANISTER_ID_METALOG_BACKEND>
To deploy to the ICP main network:
dfx deploy --network ic
πΉ Once complete, use the new canister ID for the .env before restarting the application.
Metalog uses Internet Computer Protocol (ICP) to support application security, privacy, and scalability. Here are some key aspects of ICP integration in Metalog:
β 1. Identity & Authentication
-
Users log in via Internet Identity (II) at identity.ic0.app.
-
Each user is assigned a Principal ID, ensuring decentralized and secure authentication without email or passwords.
β 2. Smart Contract (Canister) for Backend
-
metalog_backend acts as a smart contract (canister) on the ICP blockchain.
-
Stores all user data, transactions, and logic in the backend canister.
-
No centralized servers, all data is managed within ICP's blockchain ecosystem.
β 3. Security & Decentralization
-
No centralized database β User data is stored in decentralized canisters.
-
Enhanced privacy β Only users have full control over their data.
-
No third-party access β No company can access or control user data.
-
Uses ICP Stable Memory to ensure persistent and secure data storage.
β 4. ICP Token Payments
-
Consultation sessions are paid using ICP Tokens, directly integrated into Metalog.
-
ICP Wallets are supported for seamless transactions.
-
No credit cards required, transactions are executed via ICPβs blockchain, ensuring transparency and speed.
Metalog was built using Web3 and ICP technology to create fast, secure and efficient applications.
Backend & Blockchain:
-
Motoko β Smart contract programming language for ICP.
-
ICP Canister β Used for decentralized backend services.
-
DFX SDK β Canister management and deployment tool.
-
Candid UI β Used for backend canister testing.
Frontend & UI:
-
React.js + Vite β Fast and optimized frontend development.
-
TailwindCSS / SCSS β Styling framework for modern UI.
-
React Router β Navigation system for seamless page transitions.
-
SweetAlert2 β User-friendly alert dialogs.
Authentication & Security:
-
Internet Identity (II) β Secure authentication using Web3 identity.
-
@dfinity/auth-client β Authentication library for ICP.
-
ICP Principal ID β Unique decentralized user identity.
Storage & Databases:
-
Stable Memory (ICP) β Stores data persistently on the ICP blockchain.
-
ICP Web3 Storage β Blockchain-based file storage and transactions.
Web3 Payments & Wallets:
-
ICP Tokens β Used for in-app transactions.
-
Plug Wallet β Web3 wallet compatible with ICP.
metalog/
βββ src/
β βββ metalog_backend/ # Smart contract (Motoko)
β βββ metalog_frontend/ # Frontend (React + Vite)
β β βββ src/
β β β βββ components/
β β β βββ pages/
β β β βββ utils/
β β β βββ context/
β β β βββ scss/
β β β βββ App.jsx
β β β βββ main.jsx
β β βββ .env
β βββ declarations/ # Auto-generated canister bindings
βββ .dfx/ # DFX build cache
βββ package.json
βββ dfx.json # ICP Canister Configuration
βββ vite.config.js # Vite Configuration
βββ README.md
MIT License
This project is licensed under the MIT License. You can modify, use, and distribute according to your needs.