📚 EDUCATIONAL PROJECT: This is a learning-focused implementation created to explore Polkadot's multi-chain ecosystem. It is not intended for production use and serves primarily as an educational resource.
A Vue 3 + TypeScript application that demonstrates how blockchain technology could potentially fight misinformation by creating an immutable, verifiable record of news articles using Polkadot's multi-chain ecosystem.
EduNews is an educational prototype that illustrates a potential solution for verifying article authenticity and provenance using blockchain technology. This learning project combines multiple specialized chains within the Polkadot ecosystem:
- EduChain: Stores article metadata, provenance data, and content hashes
- AssetHub: Creates NFT representations of verified articles for ownership proof
- PeopleHub: Verifies publisher identities to establish trust
To launch, local instance of EduChain and AssetHub, you can use this one-command deployment to run it locally: Local EduChain Deployment.
This experimental approach demonstrates how developers can learn to build cross-chain applications that maintain a seamless user experience while benefiting from specialized chain functionality.
This project was created with the following learning objectives:
- Explore practical applications of Polkadot's multi-chain architecture
- Understand cross-chain composition through a concrete use case
- Demonstrate blockchain concepts like content verification and digital signatures
- Provide a starting point for developers interested in Polkadot development
This project is not production-ready software, rather it is meant to showcase the above.
For Publishers: (Demonstration Flow)
- Publisher connects their Polkadot wallet (Polkadot.js, SubWallet, Talisman)
- They submit article details and content through the UI
- The app hashes the content with Blake2b-256 and requests signature with their private key
- The system creates an NFT on AssetHub and registers the article on EduChain
- The verified article receives a verification badge publishers can embed on their sites
For Readers: (Conceptual User Journey)
- Readers can verify article authenticity by checking the EduNews registry
- Each article displays verification status, publisher identity, and blockchain timestamp
- Embedded verification badges on publisher sites link back to blockchain proof
flowchart TD
A[User/Publisher] -->|Submit Article| B[ArticleSubmitDialog]
B -->|Calculate Hash & Sign| C[Create Content Hash]
C -->|Create NFT on AssetHub| D[Create NFT First]
D -->|Register on EduChain| E[recordArticleDirectlyOnEduChain]
E -->|Return Collection & Item IDs| F[Registration Complete]
G[User/Reader] -->|View Articles| H[PublisherAccordion]
H -->|Display By Publisher| I[ArticleTable]
I -->|Check NFT Status| J[checkNftExists]
I -->|Verify Publisher Identity| K[getIdentityFromAddress]
- Transaction Handling:
useTransaction.ts
manages the multi-chain transaction flow via Vue Composables - Blockchain SDK: Built on PAPI (https://papi.how/) for type-safe chain interaction
- Identity Verification: PeopleHub integration for real-world publisher identity proof
src/utils/sdk-interface.ts
- Core blockchain interaction functionssrc/components/ArticleSubmitDialog.vue
- Article submission and verification UIsrc/composables/useTransaction.ts
- Multi-chain transaction orchestration
- Frontend: Vue 3 with Composition API + TypeScript
- UI Components: PrimeVue with Toast notifications and responsive design
- Blockchain SDK: Polkadot API (PAPI) for type-safe chain interactions
- Wallet Integration: @talismn/connect-wallets for multi-wallet support
Note: This project is intended for educational purposes and experimentation. The setup process may require troubleshooting as this is not production software.
- Node.js v18+ and npm
- A Polkadot wallet extension (Polkadot.js, SubWallet, or Talisman)
- Locally running EduChain instance
# Clone the repository
git clone https://github.com/w3f/edunews
cd edunews
# Install dependencies
npm install
# Generate PAPI chain descriptors
npm run postinstall
Before running the development server, ensure you are running a local instance of EduChain, which you can do here.
# Start development server
npm run dev
- Chain endpoints are configured in
src/utils/sdk.ts
- Default networks include Paseo (testnet) and its parachains
- For local development, update RPC endpoints in
config
object
src/
├── components/ # Vue UI components
│ ├── ArticleSubmitDialog.vue # Article submission form and workflow
│ ├── PublisherAccordion.vue # Display of publisher articles
│ └── ...
├── composables/ # Vue composition functions
│ ├── useConnect.ts # Wallet connection logic
│ ├── useTransaction.ts # Transaction management
│ └── useCurrentBlock.ts # Block monitoring
├── utils/ # Utility functions
│ ├── sdk.ts # Chain configuration and client setup
│ ├── sdk-interface.ts # Core blockchain interaction functions
│ └── formatters.ts # Data formatting utilities
├── chain/ # Chain-specific code
│ └── papi.ts # PAPI client initialization
├── descriptors/ # Generated chain descriptors
└── types.ts # TypeScript type definitions
This educational project welcomes contributions that enhance its learning value! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- This project is a learning tool and not suitable for production environments
- The implementation focuses on demonstrating concepts rather than security or scalability
- Many features are simulated or simplified for educational purposes
- Use the code as a reference for learning, but implement proper security measures for any derived work
This project is licensed under the MIT License - see the LICENSE file for details.