A modern, local-first content management system built with React 19, LiveStore, and decentralized storage. Geist Filecoin enables content creators to build, manage, and publish content with offline-first capabilities while leveraging Web3 storage solutions.
- Local-First Architecture: Offline-first data management with SQLite in the browser
- Real-Time Sync: Automatic synchronization across devices using Cloudflare Workers
- Multi-Provider Authentication: Support for both Bluesky OAuth and Storacha email authentication
- Decentralized Storage: Multiple storage providers including Storacha (Filecoin) and Lighthouse SDK
- Content Type System: Flexible, schema-based content modeling with JSON Schema
- Space-Based Organization: Multi-tenant architecture with spaces, access policies, and storage authorizations
- Modern UI: Built with React 19, Vite, Tailwind CSS v4, and shadcn/ui components
- Access Control: Granular permissions system with policy-based access control
- Storage Authorizations: Delegated storage permissions with UCAN (User Controlled Authorization Networks)
- Content Types: Pre-built schemas for blogs, products, and landing pages with extensible field types
- File Upload Support: Direct file uploads to decentralized storage with progress tracking
- Theme Support: Dark/light mode with system preference detection
- Type Safety: Full TypeScript support throughout the application
- React 19 with TypeScript for the user interface
- Vite for fast development and building
- Tailwind CSS v4 for styling with shadcn/ui component library
- React Router v6 for client-side routing
- React Hook Form with Zod validation
- LiveStore for local-first data management with SQLite
- Storacha (Filecoin) as primary decentralized storage provider
- Lighthouse SDK as secondary storage provider
- Event Sourcing pattern for data changes and synchronization
- Bluesky OAuth for social authentication
- Storacha Email Auth for web3 storage authentication
- DID-based Identity system with token refresh
- UCAN (User Controlled Authorization Networks) for delegation
- Cloudflare Workers for sync, API endpoints, and deployment
- pnpm Workspaces with Turbo for monorepo management
- Vitest for testing with UI support
- ESLint and Biome for code quality
geist-filecoin/
├── apps/
│ ├── webapp/ # Main React application
│ └── demo-astro-blog/ # Demo Astro blog implementation
├── packages/
│ ├── auth/ # Authentication & policy engine
│ ├── cf-worker/ # Cloudflare Worker packages
│ ├── domain/ # Domain models & types
│ ├── storage/ # Storage provider abstractions
│ └── ci/ # CI/CD utilities
├── scripts/ # Build and deployment scripts
└── docs/ # Documentation
apps/webapp/
├── src/
│ ├── components/react/ # React components
│ │ ├── fields/ # Form field components
│ │ ├── hooks/ # Custom React hooks
│ │ └── ui/ # shadcn/ui components
│ ├── livestore/ # LiveStore configuration
│ │ ├── schema.ts # SQLite tables & events
│ │ ├── queries.ts # Database queries
│ │ └── livestore.worker.ts # Background worker
│ ├── pages/ # Route components
│ ├── services/ # External service integrations
│ ├── content-type/ # Content type schemas
│ └── worker/ # Cloudflare Worker entry
├── worker/ # Cloudflare Worker source
└── wrangler.jsonc # Cloudflare Worker config
- entries: Content instances with metadata and storage references
- contentTypes: Schema definitions using JSON Schema
- spaces: Multi-tenant workspaces with storage configuration
- AccessPolicys: Permission rules and access control
- storageAuthorizations: UCAN-based storage delegations
- uiState: Client-side UI state (local only)
- Events describe all data changes (entryCreated, spaceUpdated, etc.)
- Materializers map events to SQLite state changes
- Real-time sync propagates events across devices
- Event history enables audit trails and rollbacks
- Node.js >= 23.0.0
- pnpm >= 10.13.1
- Cloudflare Account (for deployment)
- Storacha Account (for decentralized storage)
-
Clone the repository
git clone https://github.com/your-org/geist-filecoin.git cd geist-filecoin -
Install dependencies
pnpm install
-
Environment setup
cp env.sample .env.local # Edit .env.local with your configuration -
Start development server
pnpm dev
The webapp will be available at http://localhost:5173
pnpm dev- Start development server (uses Turbo for monorepo orchestration)pnpm build- Build all apps and packagespnpm lint- Run linting across all packages
pnpm dev- Start Vite dev serverpnpm build- Build for productionpnpm deploy- Build and deploy to Cloudflare Workerspnpm test- Run Vitest testspnpm test:ui- Run tests with UIpnpm analyze- Analyze bundle sizepnpm cf-typegen- Generate Cloudflare Worker types
-
Provision Cloudflare resources
# Create database wrangler d1 create geist-filecoin-db # Create KV namespace wrangler kv namespace create "geist-filecoin-kv" # Create secrets store wrangler secret-store create geist-filecoin-secrets
-
Setup secrets & KV
- according to instructions of storage provider below
- Deploy worker
cd apps/webapp pnpm deploy
- Follow below steps to use Storacha as one of the storage provider
-
Create account and login
- Follow storacha documentation
storacha login your@email.com
-
Create space and delegate to server agent
-
Server (Cloudflare worker) will need to be configured a standalone storacha agent with proof in order to access the space and furhter delegate access to agent at Client side
Follow the Storacha documentation:
-
Configure secrets
# Storacha agent key wrangler secrets-store secret create $CF_SECRET_STORE_ID \ --name STORACHA_AGENT_KEY_STRING \ --value $STORACHA_AGENT_KEY_STRING \ --scopes=workers
-
Configure delegation proof via KV
wrangler kv key put --namespace-id $KV_NAMESPACE_ID \ "STORACHA_PROOF_STRING" $STORACHA_PROOF_STRING
The application supports multiple authentication providers:
- Configure OAuth client credentials in Cloudflare secrets
- Supports handle resolution and session refresh
- DID-based identity with automatic token management
- Email-based authentication with magic links
- Integrates with Storacha storage permissions
- UCAN delegation for storage authorization
Pre-built content types include:
- Blog: Title, slug, hero image, content (markdown), meta description, author, publish date, tags
- Product: Name, description, price, images, categories
- Landing Page: Hero content, sections, call-to-actions
Content types use JSON Schema for validation:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the content"
},
"content": {
"type": "string",
"description": "Main content (markdown supported)"
}
},
"required": ["title"]
}- Text: Single-line text input
- Textarea: Multi-line text
- Markdown: Rich text with markdown support
- Date: Date picker with calendar
- File: File upload with storage provider integration
- Array: Repeatable field groups
- LiveStore uses SQLite in the browser via WebAssembly
- Use
VITE_LIVESTORE_STORE_IDenvironment variable to reset local state - LiveStore devtools available for debugging queries and state
- Tests use Vitest framework
- Test files located in
src/test/ - Run tests:
pnpm testorpnpm test:uifor interactive testing
The system supports multiple storage providers:
enum StorageProvider {
Storacha = "storacha",
S3 = "s3"
}- Web3 storage powered by IPFS and Filecoin
- UCAN-based authorization
- Decentralized and censorship-resistant
- Alternative decentralized storage
- IPFS-based with additional features
- Configurable per space
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Follow TypeScript and ESLint conventions
- Add tests for new functionality
- Update documentation as needed
- Test your changes
pnpm test pnpm lint pnpm build - Submit a pull request
- TypeScript: Strict type checking enabled
- ESLint: Code linting with React and TypeScript rules
- Biome: Additional formatting and linting
- Vitest: Unit and integration testing
-
Build the application
pnpm build
-
Deploy to Cloudflare Workers
cd apps/webapp pnpm deploy -
Configure custom domain (optional)
- Set up custom domain in Cloudflare dashboard
- Update worker routes as needed
VITE_LIVESTORE_STORE_ID: LiveStore database identifierVITE_CLOUDFLARE_WORKER_URL: Cloudflare Worker sync endpointVITE_BLUESKY_CLIENT_ID: Bluesky OAuth client IDVITE_STORACHA_ENDPOINT: Storacha API endpoint
The project originally intended to use Astro for both CMS and published websites. This is currently on hold due to:
- Limited benefits of Astro's island architecture for local-first, sync-heavy applications
- Immature LiveStore/Solid integration
- Complexity of embedding React components requiring global providers
Future developments may revisit this approach as the ecosystem matures.
- Enhanced access control with role-based permissions
- Multi-language content support
- Advanced content scheduling and publishing workflows
- Plugin system for custom field types
- GraphQL API for external integrations
MIT License - see LICENSE file for details.
- Documentation: Project Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions