A decentralized GitHub-style platform for developers to upload, version, and showcase code repositories with blockchain-verified IP ownership using Story Protocol.
- Web3 Authentication: Wallet-based login (no passwords)
- Blockchain IP Verification: Story Protocol integration for IP asset registration
- Decentralized Storage: IPFS for code snapshots
- Off-chain Metadata: MongoDB for fast access and queries
- Contribution Tracking: Log all contributors and commits
- License Management: Open, restricted, or paid licensing with royalty splits
- Modern UI: Next.js + TypeScript + Tailwind CSS
grid.dev/
βββ frontend/ # Next.js (TypeScript) + Tailwind CSS
βββ backend/ # Node.js + Express + MongoDB + Story SDK
βββ README.md
- Node.js + Express
- MongoDB (Mongoose ORM)
- Story Protocol SDK
- IPFS (ipfs-http-client)
- JWT Authentication
- dotenv
- Next.js 14 (TypeScript)
- Tailwind CSS
- Ethers.js for wallet connection
- Axios for API calls
- Zustand for state management
- Node.js 18+ installed
- MongoDB Atlas account (or local MongoDB)
- Infura IPFS project (or Pinata)
- Story Protocol API key
cd backend
npm install
cp .env.example .env
# Edit .env with your credentials
npm run devcd frontend
npm install
cp .env.local.example .env.local
# Edit .env.local with your backend URL
npm run devVisit http://localhost:3000 to see the app!
backend/
βββ src/
β βββ config/ # Database, IPFS, Story Protocol config
β βββ models/ # MongoDB schemas (User, Repository, Commit)
β βββ controllers/ # Business logic
β βββ routes/ # API endpoints
β βββ services/ # Story Protocol, IPFS, Auth services
β βββ middleware/ # JWT authentication
βββ .env.example
βββ package.json
βββ server.js
frontend/
βββ pages/ # Next.js pages
β βββ index.tsx # Landing page
β βββ dashboard.tsx # User dashboard
β βββ create-repo.tsx # Upload repository
β βββ repo/[id].tsx # Repository details
βββ components/ # React components
βββ hooks/ # Custom React hooks
βββ lib/ # API client, utilities
βββ store/ # Zustand state management
βββ types/ # TypeScript types
βββ .env.local.example
POST /auth/login- Wallet-based loginPOST /auth/verify- Verify JWT token
POST /repo/create- Upload and register repositoryGET /repo/:id- Fetch repository detailsPOST /repo/commit- Record new commit/contributionGET /repo/user/:wallet- Get user's repositories
GET /user/:wallet- Fetch user profilePUT /user/:wallet- Update user profile
MONGO_URI=mongodb+srv://<user>:<pass>@cluster.mongodb.net/grid
IPFS_API_URL=https://ipfs.infura.io:5001
IPFS_PROJECT_ID=your_infura_project_id
IPFS_PROJECT_SECRET=your_infura_secret
STORY_API_KEY=your_story_api_key
STORY_NETWORK=mainnet
JWT_SECRET=your_jwt_secret_key
PORT=5000NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
NEXT_PUBLIC_STORY_NETWORK=mainnet
NEXT_PUBLIC_IPFS_GATEWAY=https://ipfs.io/ipfs/- User connects wallet β Frontend requests nonce from backend
- User signs message β Backend verifies signature and issues JWT
- User uploads repo β Backend:
- Stores metadata in MongoDB
- Uploads file to IPFS
- Registers IP on Story Protocol
- Returns repoId + ipAssetId
- Frontend displays β Repository with ownership proof and IPFS link
- Click "Connect Wallet" on landing page
- Sign the authentication message
- Go to "Create Repository"
- Upload a .zip file (max 50MB)
- Fill in title, description, license type
- Submit and wait for blockchain confirmation
- See your repository with:
- IP Asset ID from Story Protocol
- IPFS CID for code storage
- Contribution history
- License information
- Push code to GitHub
- Connect repository to Render/Railway
- Add environment variables
- Deploy!
- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy!
- Create free cluster at mongodb.com
- Add database user
- Whitelist IP addresses
- Copy connection string to
.env
- β JWT tokens for session handling
- β File upload validation (max 50MB, .zip only)
- β Input sanitization to prevent injection
- β API keys hidden in .env
- β Never expose Story API key on frontend
- β Error handling for failed IPFS/Story uploads
- AI-based code plagiarism detection (LangChain)
- DAO voting for best projects
- Token rewards for contributors
- GitHub import integration
- Advanced analytics dashboard
- Multi-file repository browser
- Inline code viewer
- Pull request system
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
For questions or issues, please open a GitHub issue or contact the team.
Built with β€οΈ using Story Protocol, IPFS, and Next.js