Arkgram is a decentralized social media platform built on Arkiv, enabling users to share posts, stories, and media content in a censorship-resistant environment. Users can create posts with images and captions, view real-time feeds, manage profiles, and engage with content through comments, all powered by Arkiv.
- Post Creation: Users can create posts with images, captions, and media content stored securely on the blockchain
- Real-time Feed: Dynamic feed system that displays posts from followed users and trending content
- Stories: Temporary content sharing with automatic 24 hours expiration for ephemeral storytelling
-
Clone the repository:
git clone https://github.com/akashbiswas0/arkgram.git cd arkgram -
Install dependencies:
npm install # or yarn install -
Environment Configuration:
Copy the example environment file and configure your variables:
cp .env.example .env.local
Configure the following environment variables in your
.envfile:ARKIV_PRIVATE_KEY=your_arkiv_private_key_here
Note: You'll need to obtain an Arkiv Network private key to interact with the blockchain. Contact the Arkiv team or check their documentation for setup instructions.
-
Start the development server:
npm run dev # or yarn devThe application will be available at http://localhost:3000
-
Build the application:
npm run build # or yarn build -
Start the production server:
npm start # or yarn start
Based on codebase analysis, here's how ArkGram features leverage Arkiv capabilities:
- Posts: Create entities with image, metadata, and post data; query by type and attributes
- Feed: Complex queries with pagination, filtering by post type and timestamps
- Stories: Entity creation with rich attributes, querying by story type and expiration
- Profiles: User profile creation and querying with attribute-based filtering
- Stories: Configurable TTL (1 minute, 5 minutes, 24 hours) for ephemeral content
- Posts: 7-day TTL for regular content with automatic expiration
- Media: TTL-based cleanup of images and metadata at blockchain level
- Live Feed: Server-Sent Events for real-time post updates (currently polling-based)
- Feed Streaming: Event-driven content delivery without page refreshes
- Wallet Connection: MetaMask integration for blockchain authentication
- Transaction Handling: Multi-entity creation with receipt confirmation
- Content Ownership: Cryptographic verification of user-generated content
ArkGram leverages the following @arkiv-network/sdk modules (v0.4.4):
@arkiv-network/sdk- Core client creation (createWalletClient,createPublicClient,http)@arkiv-network/sdk/accounts- Account management (privateKeyToAccount)@arkiv-network/sdk/chains- Network configuration (mendozatestnet)
@arkiv-network/sdk/query- Query building (eqfor equality operations)@arkiv-network/sdk/utils- Utilities (ExpirationTime,jsonToPayload)@arkiv-network/sdk/types- TypeScript types (Entity)