Your AI-powered workspace for capturing, organizing, and refining ideas.
Features • Tech Stack • Getting Started • Environment Variables • Project Structure
Mosaic is a modern, AI-powered note-taking and document management application. Built with Next.js 16 and powered by Appwrite, it provides a seamless writing experience with an intuitive Notion-style block editor and intelligent AI assistance.
- Notion-style block editor powered by BlockNote
- Drag-and-drop content organization
- Rich text formatting and media embeds
- Custom slash commands
- Draft - Generate content from prompts with customizable tone and length
- Improve - Enhance clarity, grammar, and flow of selected text
- Summarize - Condense lengthy content into key points
- Chat - Conversational AI assistant for your documents
- Powered by OpenRouter (Claude 3.5 Sonnet, Gemini 2.5 Flash)
- AI-powered search using vector embeddings (optional)
- Qdrant integration for similarity search
- Find documents by meaning, not just keywords
- Create multiple workspaces for different contexts
- Organize documents with favorites and trash
- Quick search and filtering
- Email/password signup and login
- Google OAuth integration
- Email verification support
- Session management
- Install as a native app on any device
- Offline-capable with IndexedDB caching
- Mobile-first responsive design
- Dark and light theme support
- Customizable document fonts
- User preferences persistence
- Export documents to PDF
- Export to Markdown format
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 4 |
| Editor | BlockNote |
| Backend | Appwrite Cloud |
| AI | OpenRouter API |
| Search | Qdrant (optional) |
| State | Zustand |
| Data Fetching | SWR |
| UI Components | Radix UI, Lucide Icons |
| PWA | next-pwa |
- Node.js 18+
- npm, yarn, or pnpm
- Appwrite Cloud account (or self-hosted instance)
- OpenRouter API key (for AI features)
-
Clone the repository
git clone https://github.com/yourusername/mosaic.git cd mosaic -
Install dependencies
npm install
-
Set up environment variables
cp .env.local.example .env.local
Fill in your environment variables (see Environment Variables)
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
Copy the example file and fill in your values:
cp .env.local.example .env.local| Variable | Description |
|---|---|
NEXT_PUBLIC_APPWRITE_PROJECT_ID |
Appwrite project ID |
NEXT_PUBLIC_APPWRITE_DOCUMENTS_TABLE_ID |
Documents table ID |
NEXT_PUBLIC_APPWRITE_WORKSPACES_TABLE_ID |
Workspaces table ID |
OPENROUTER_API_KEY |
OpenRouter API key for AI features |
| Variable | Description |
|---|---|
NEXT_PUBLIC_ENABLE_COLLABORATION |
Enable real-time collaboration (default: false) |
NEXT_PUBLIC_ENABLE_CLOUD_SYNC |
Enable cloud sync (default: false) |
QDRANT_URL |
Qdrant instance for semantic search |
QDRANT_API_KEY |
Qdrant API key |
- Create a project at cloud.appwrite.io
- Create database tables:
documents- User documentsworkspaces- Workspace datausers- User profiles
- Create storage buckets:
avatars- User avatarsdocument-images- Document images
- Enable Google OAuth in Authentication settings
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages
│ ├── api/ # API routes
│ ├── auth/ # OAuth callbacks
│ ├── dashboard/ # Main application
│ └── page.tsx # Landing page
├── components/
│ ├── auth/ # Authentication components
│ ├── dashboard/ # Dashboard UI
│ ├── editor/ # BlockNote editor components
│ ├── export/ # Export functionality
│ ├── landing/ # Landing page sections
│ ├── layout/ # Layout components
│ ├── settings/ # Settings pages
│ └── ui/ # Reusable UI primitives
├── contexts/ # React contexts
├── hooks/ # Custom React hooks
├── lib/
│ ├── ai/ # AI task definitions & OpenRouter client
│ ├── appwrite/ # Appwrite service modules
│ ├── db/ # Database types and operations
│ ├── editor/ # Editor utilities
│ ├── export/ # PDF and Markdown exporters
│ └── swr/ # SWR configuration and fetchers
└── public/ # Static assets
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
- AI-powered writing assistant
- Block editor with BlockNote
- Workspace management
- Real-time collaboration (in progress, flag-controlled)
- Document sharing and permissions
- Semantic search improvements
- Mobile app (React Native)
Contributions are welcome! Please feel free to submit a Pull Request.
- 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 licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using Next.js, Appwrite, and AI