A zero-trust time capsule system for Indian exam, tender, and evidence workflows built with Go and Next.js.
- 🔐 Secure File Encryption: AES-256-GCM encryption client-side and on-device
- ⏰ Time-Locked Capsules: Pre-programmed unlock schedules
- ✍️ Wallet Integration: Sign and commit with blockchain signatures
- 📊 Audit Trail: Forever immutable on-chain audit logs with IPFS pinning
- 🌐 Public Verification: Anyone can verify capsule integrity via on-chain logs
tala-api/
├── backend/ # Go API server
│ ├── main.go
│ ├── models/ # Database models
│ ├── handlers/ # API endpoint handlers
│ ├── middleware/ # Auth & CORS middleware
│ ├── utils/ # Utilities (crypto, JWT)
│ └── go.mod
└── frontend/ # Next.js web interface
├── src/
│ ├── app/ # Pages (Home, Dashboard, Login, etc)
│ ├── components/# Reusable components
│ └── lib/ # Utilities & API client
└── package.json
- Go 1.21 or higher
- SQLite (included with Go)
cd backend
# Install dependencies
go mod download
# Copy environment variables
cp .env.example .env
# Run the server
go run main.goThe API will be available at http://localhost:8080
PORT=8080
DB_PATH=tala.db
JWT_SECRET=your-secret-key-change-in-production
- Node.js 18+ and npm
cd frontend
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env.local
# Run development server
npm run devThe frontend will be available at http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:8080/api/v1
POST /api/v1/auth/register- Create accountPOST /api/v1/auth/login- Login with email/passwordPOST /api/v1/auth/login-wallet- Login with wallet
POST /api/v1/capsules- Create new capsuleGET /api/v1/capsules- List user's capsulesGET /api/v1/capsules/:id- Get capsule detailsPUT /api/v1/capsules/:id- Update capsuleDELETE /api/v1/capsules/:id- Delete capsule
POST /api/v1/capsules/:id/sign- Sign & commit capsuleGET /api/v1/capsules/:id/unlock- Check unlock time eligibilityPOST /api/v1/capsules/:id/unlock- Unlock capsule
GET /api/v1/capsules/:id/audit- Get audit trail for capsuleGET /api/v1/audit- Get all audit trails (protected)
GET /api/v1/dashboard/stats- Get user stats (protected)GET /api/v1/public/stats- Get public stats
/- Landing page/login- Login page/register- Registration page/dashboard- User dashboard with capsules list/create-capsule- Create new capsule/capsule/:id- Capsule details with timeline and audit trail
- id (UUID)
- email (unique)
- wallet_addr (unique, optional)
- password_hash
- created_at, updated_at
- id (UUID)
- user_id (FK)
- title, description
- file_hash, encryption_type
- status (CREATED, SIGNED, UNLOCKED)
- unlock_time, is_locked
- created_at, updated_at
- id (UUID)
- capsule_id (FK)
- signed_by (user)
- signature, checksum
- ipfs_hash
- signed_at, created_at
- id (UUID)
- capsule_id (FK)
- action (CREATE, SIGN, UNLOCK, VERIFY)
- actor (user)
- details, ipfs_hash
- timestamp, created_at
- Authentication: JWT-based token authentication
- Authorization: User-specific access to capsules
- Encryption: AES-256-GCM for file encryption
- Hashing: SHA-256 for data integrity
- CORS: Configured for cross-origin requests
- API: Will be deployed to production
- Frontend: Will be deployed to production
- Add Ethereum wallet integration (MetaMask)
- Implement IPFS pinning service
- Add on-chain verification via smart contracts
- Implement file upload to IPFS
- Add email notifications for unlock events
- Performance optimizations and caching
- Admin dashboard for statistics
MIT License - feel free to use in your projects
For issues or questions, please open an issue on GitHub.