Client
Recogito Client is a collaborative text and image annotation platform built with modern web technologies.
Core Stack
Section titled “Core Stack”- Astro (v5.7) - SSR framework with React integration
- React (v18.3) - UI components
- TypeScript - Type safety
- Supabase - Backend (authentication, database, storage)
- Radix UI - Accessible component primitives
Key Features
Section titled “Key Features”Multi-format Annotation
Section titled “Multi-format Annotation”- Text annotation -
@recogito/text-annotator - Image annotation - IIIF-based with OpenSeadragon
- PDF annotation -
@recogito/pdf-annotator - Annotorious integration - Annotation UI framework
Project Management
Section titled “Project Management”- Multi-user collaboration with roles and groups
- Project-based document organization
- Document contexts and layers
- Assignment tracking
Authentication
Section titled “Authentication”- Username/password
- SAML/SSO
- Keycloak integration
Architecture
Section titled “Architecture”Directory Structure
Section titled “Directory Structure”- src/apps/ - Feature modules (annotation-text, annotation-image, dashboard, auth, project management)
- src/backend/ - CRUD operations, helpers, Supabase clients
- src/components/ - 50+ React components
- src/pages/ - Astro routes with i18n support (en/de)
- src/plugins/ - Extensibility layer
Data Model
Section titled “Data Model”Projects
Section titled “Projects”Projects contain documents, contexts, and layers with configurable permissions:
is_open_join- Allow users to join without invitationis_open_edit- Allow open editingis_locked- Prevent modificationsdocument_view_right- Control document visibility
Users & Groups
Section titled “Users & Groups”Users organized into groups with permissions:
- Organization groups for multi-tenant support
- Project-specific groups
- Role-based access control
Documents
Section titled “Documents”Support for multiple content types:
- IIIF protocol integration
- Metadata storage
- Collection organization
- Privacy controls
Annotations
Section titled “Annotations”Layered annotation system:
- Multiple layers per document
- Context-based organization
- Private/shared annotations
Backend Integration
Section titled “Backend Integration”Supabase Client
Section titled “Supabase Client”- Browser client (
supabaseBrowserClient.ts) - Client-side operations - Server client (
supabaseServerClient.ts) - SSR operations
CRUD Operations
Section titled “CRUD Operations”Organized by entity:
collections.tscontexts.tsdocuments.tsgroups.tslayers.tsprojects.tstags.tsusers.ts
Helpers
Section titled “Helpers”Business logic for each domain:
annotationHelpers.tsdocumentHelpers.tsprojectHelpers.tsuserPermissionsHelpers.ts- And more…
API Routes
Section titled “API Routes”accept-new-user.ts- User onboardingimages.ts- Image handlinginvite-user-to-project.ts- Project invitationsinvite-user.ts- Platform invitations
Deployment
Section titled “Deployment”Primary: Netlify
Section titled “Primary: Netlify”npm run buildAlternative: Node.js Standalone
Section titled “Alternative: Node.js Standalone”npm run build-nodenode ./dist/server/entry.mjsConfiguration
Section titled “Configuration”Environment Variables
Section titled “Environment Variables”PUBLIC_SUPABASE- Supabase project URLPUBLIC_SUPABASE_API_KEY- Anonymous keyPUBLIC_IIIF_CONFIGURATION- IIIF server typeSUPABASE_SERVICE_KEY- Service role keyROOM_SECRET- Realtime room identifier saltIIIF_URL- IIIF server location- Mail configuration for transactional emails
Branding
Section titled “Branding”Configurable via src/config.json:
- Platform name and site name
- Colors and logos
- Authentication methods
- Welcome messaging
Internationalization
Section titled “Internationalization”- Support for multiple languages (en, de)
- Language-specific routes via
[lang]parameter - Translation files in
src/i18n/
Components
Section titled “Components”Key Component Categories
Section titled “Key Component Categories”- Annotation - Desktop and mobile annotation interfaces
- Document - Document cards, library views
- Project - Project creation, settings, collaboration
- User Management - User profiles, invitations, groups
- Dashboard - Account management, project dashboard
- Authentication - Login, signup, password reset
- UI Primitives - Buttons, dialogs, dropdowns, forms
Development
Section titled “Development”Installation
Section titled “Installation”npm installnpm start # Development mode on port 4321npm run build # Netlify buildnpm run build-node # Node.js build