An Obsidian-like knowledge management application with markdown support, folder organization, and multi-device sync.
- Monorepo: pnpm workspaces + Turborepo
- Web: Next.js 16 (App Router) with TypeScript
- Mobile: Expo React Native (in progress)
- Database: PostgreSQL 15+ with Prisma ORM
- Authentication: NextAuth.js (web) + JWT (mobile)
redstone/
├── apps/
│ ├── web/ # Next.js web application
│ └── mobile/ # Expo mobile app (in progress)
├── packages/
│ ├── shared/ # Shared TypeScript types and utilities
│ ├── database/ # Prisma schema and client
│ ├── api-client/ # Shared API client
│ └── markdown/ # Markdown utilities
├── docker/ # Docker configuration
│ └── docker-compose.yml
├── PLAN.md # Detailed development plan
└── API.md # API documentation
- Node.js 18+
- pnpm 8+
- Docker & Docker Compose (for PostgreSQL)
- Clone the repository:
git clone <repository-url>
cd redstone- Install dependencies:
pnpm install- Start PostgreSQL database:
cd docker && docker-compose up -d- Set up environment variables:
cp .env.example apps/web/.env.local
# Edit apps/web/.env.local if needed- Run database migrations and seed:
pnpm --filter @redstone/database db:generate
pnpm --filter @redstone/database db:migrate
pnpm --filter @redstone/database db:seed- Start the development server:
pnpm dev:webThe web app will be available at http://localhost:3000
After running the seed script, you can use:
- Email:
test@redstone.app - Password:
password123
# Run all apps
pnpm dev
# Run specific apps
pnpm dev:web # Next.js web app
pnpm dev:mobile # Expo mobile app (when ready)
# Database commands
pnpm --filter @redstone/database db:generate # Generate Prisma client
pnpm --filter @redstone/database db:migrate # Run migrations
pnpm --filter @redstone/database db:seed # Seed database
pnpm --filter @redstone/database db:studio # Open Prisma Studio
# Build
pnpm build # Build all apps
# Test
pnpm test # Run tests
# Lint
pnpm lint # Lint all packages-
Authentication
- User registration and login
- NextAuth.js for web (cookie-based)
- JWT tokens for mobile API access
-
File Management
- Create, read, update, delete files
- Markdown content support
- Automatic versioning on content changes
- Search by title and content
- Soft deletes for sync
-
Folder Organization
- Create nested folders
- Move files between folders
- Tree structure with file counts
-
Tag System
- Add/remove tags from files
- Auto-create tags
- Tag-based organization
-
Sync API
- Incremental sync for mobile
- Change tracking since timestamp
-
Authentication UI
- Login and signup pages
- Session management with NextAuth
- Route protection middleware
- User menu with logout
-
API Client & Hooks
- Typed API client with authenticated requests
- SWR hooks for data fetching (useFiles, useFolders, useAuth)
- Automatic cookie handling for NextAuth sessions
-
UI Components
- File browser interface with real-time data
- Markdown editor with live preview (CodeMirror 6)
- Folder navigation sidebar with tree structure
- File creation, editing, and deletion
- Folder-based file filtering
- Search interface (UI ready)
-
File Operations
- Create new files with "New File" button
- Load and edit files in markdown editor
- Save file changes with auto-detection of unsaved changes
- Delete files with confirmation dialog
- Navigate to files by clicking file cards
- Real-time file list updates
-
Folder Integration
- Load folder tree from API
- Filter files by selected folder
- Display file counts per folder
- "All Files" view for root level
-
Web Frontend (Remaining Features)
- Implement search functionality
- Add tag management UI
- Folder creation/deletion UI
-
Mobile App (Phase 5)
- Expo React Native app
- Offline support
- Mobile-optimized editor
-
Advanced Features (Phase 6)
- Real-time sync (WebSockets/SSE)
- Internal linking between files
- File attachments
- Export to PDF/HTML
- Graph view of connections
See API.md for complete API documentation.
Quick example:
# Login
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@redstone.app","password":"password123"}'
# Get files (use token from login response)
curl -X GET http://localhost:3000/api/files \
-H "Authorization: Bearer <your-token>"Key models:
- User: User accounts
- File: Markdown files with content
- Folder: Nested folder structure
- FileVersion: Version history for files
- Tag: User-created tags
- FileTag: Many-to-many relationship between files and tags
See packages/database/prisma/schema.prisma for the complete schema.
✅ Phase 1 Complete: Monorepo setup ✅ Phase 2 Complete: Core backend API ✅ Phase 3 Complete: Web frontend UI components ✅ Phase 4 Complete: Web frontend API integration
- ✅ Authentication & infrastructure (production-ready)
- Full type safety (zero
anytypes) - SWR hooks and configuration
- NextAuth v5 compatible middleware
- Error boundaries
- Build passing with zero errors
- Full type safety (zero
- ✅ Data integration (wire UI to API endpoints)
- File CRUD operations fully functional
- Folder navigation connected to API
- Real-time data fetching and updates
- Loading and error states ⏳ Phase 5 Planned: Mobile app ⏳ Phase 6 Planned: Advanced features (search, tags UI, folder management)
See PLAN.md for detailed implementation plan and IMPROVEMENTS.md for recent code quality improvements.
MIT