Skip to content

Metalog is a decentralized mental health dApp on ICP, offering secure consultations, AI assistance, and a private community. Built with Web3 technology, it ensures privacy, security, and seamless ICP token payments for a transparent and censorship-resistant experience. πŸš€

Notifications You must be signed in to change notification settings

recov-ai/ICP-Hackethon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Metalog - Blockchain-Based Mental Health Platform

Metalog Banner

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.


πŸš€ Key Features

  • 🩺 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.


πŸ”§ Installation & Deployment

Metalog uses dfx (Dfinity SDK), Node.js, and Vite for deployment.

1️⃣ Install Dependencies

# 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

2️⃣ Configure Environment Variables

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.


3️⃣ Run on Local Network

dfx start --background

rm -rf .dfx node_modules .vite

dfx deploy --network local

npm run dev

πŸ”— Access the application:

4️⃣ Deploy to ICP Mainnet

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.


πŸ’‘ ICP Integration in Metalog

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.


πŸ›  Technology Stack

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.


πŸ“‚ Project Structure

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

πŸ“œ Lisensi - MIT License

MIT License

This project is licensed under the MIT License. You can modify, use, and distribute according to your needs.

MIT License

About

Metalog is a decentralized mental health dApp on ICP, offering secure consultations, AI assistance, and a private community. Built with Web3 technology, it ensures privacy, security, and seamless ICP token payments for a transparent and censorship-resistant experience. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published