Specification: Translation Dictionary for Living Christianity
Overview
"Sanasto Wiki" is a web-based glossary for simultaneous translators in the living Christianity. The application provides publicly accessible translations while restricting editing and commenting to invited contributors.
Core Concepts
Supported Languages
Initial seed data:
| Code | Name | Native Name | Sort Order |
|---|---|---|---|
| fi | Finnish | Suomi | 1 |
| en | English | English | 2 |
| sv | Swedish | Svenska | 3 |
| no | Norwegian | Norsk | 4 |
| de | German | Deutsch | 5 |
| ru | Russian | Русский | 6 |
Language codes are fixed because translations are stored in columns on entries. The supported_languages table controls labels, ordering, and whether a language is active. To add a language, you must add a new column to entries and add a corresponding row to supported_languages.
Entry
An entry represents a translatable unit which may be:
word— Single wordphrase— Multi-word expression or idiom, sentenceproper_name— Person's name (for consistent transliteration)title— Book, publication, or hymn titlereference— Biblical or doctrinal termother— Any other translatable text unit
Each entry has translations in multiple languages.
Suggested Meaning
When translators disagree on a translation or want to suggest alternatives (regional variations, contextual meanings, etc.), they can submit a suggested meaning for community review.
Technical Stack
- Framework: Rails 8
- Database: SQLite with FTS5
- Authentication: Rails 8 built-in authentication
- Authorization: Invitation-only for contributors
- Deployment: Kamal
Setup / First User
When setup has not been completed, the /setup route is accessible for creating the initial admin account. Completion is tracked in the database. The first user created will be the system's default contact email (accessible via User.first.email).
For detailed setup instructions, see SETUP_GUIDE.md.
Quick Start:
- Deploy the application
- Navigate to
/setup - Create your admin account
- Start inviting contributors
Authentication Flow
Public Access
- No authentication required for browsing and searching entries
- Read-only access to all dictionary content
Invitation-Only Registration
- Admins send email invitations with unique tokens
- Invited users register by setting name and password
invitation_tokencleared after successful registration
Login & Sessions
- Email + password authentication
- Session-based (encrypted cookies, Rails default)
- Optional "remember me" for extended sessions
Authorization
- Contributor: Create/edit entries, add comments, suggest translations
- Reviewer: All contributor actions + review suggestions, verify entries
- Admin: All actions + invite users, manage roles
Security
- Passwords hashed with bcrypt
- Rate limiting on login attempts
- Invitation tokens expire after 14 days
Database Schema
see db/structure.sql
Initial Data
See 'public/Kristillisyyden sanasto ver 23.5.2013.xlsx'
User Roles & Permissions
| Action | Public | Contributor | Reviewer | Admin |
|---|---|---|---|---|
| View entries | ✓ | ✓ | ✓ | ✓ |
| Search entries | ✓ | ✓ | ✓ | ✓ |
| Create entry | ✓ | ✓ | ✓ | |
| Edit entry | ✓ | ✓ | ✓ | |
| Add comment | ✓ | ✓ | ✓ | |
| Submit suggested meaning | ✓ | ✓ | ✓ | |
| Review suggested meanings | ✓ | ✓ | ||
| Mark entry as verified | ✓ | ✓ | ||
| Invite new users | ✓ | |||
| Manage users | ✓ |
Features
Public Features
Search & Browse
- Full-text search across all languages
- Filter by category
- Alphabetical browsing per language
- View entry with all translations
- Download the entries table as an XLSX file, without :id attribute
Contributor Features
Entry Management
- Create new entries with translations in known languages
- Edit existing translations
- Leave empty translations for others to fill in
- Add notes/context to entries
- View edit history
Discussion
- Add comments to entries
- Submit alternative translations as suggested meanings
- Participate in translation discussions
Reviewer Features
Quality Control
- Review and approve/reject suggested meanings
- Mark entries as verified
- Merge duplicate entries
Admin Features
User Management
- Send invitations via email
- Assign/change user roles
- Deactivate users
System Management
- Bulk import/export (CSV)
- Database backup
User Interface
Pages
- Home/Search — Search box, quick stats, recent entries
- Browse — Alphabetical listing with language selection
- Entry View — Single entry with all translations, comments, suggested meanings
- Entry Edit — Form for editing translations (contributors only)
- New Entry — Form for creating entries (contributors only)
- Suggested Meanings Queue — List for reviewers
- User Profile — Personal settings, contribution history
- Admin Dashboard — User management, invitations, stats
Design Principles
- Clean, readable typography (translations must be easy to read quickly)
- Mobile-friendly (translators may use during services)
- Fast search (primary use case)
- Clear visual distinction between verified and unverified entries
API (Public Sync)
Public JSON endpoint for syncing entries:
GET /api/entries
GET /api/entries?since=2026-01-01T12:00:00Z
Responses include all language columns, category and updated_at. The optional since
parameter filters by updated_at (ISO8601).
Swagger docs:
GET /api/swagger
Swagger UI:
GET /api
Deployment
Server: Single VPS with Kamal Database: SQLite with Litestream for replication/backup Assets: Propshaft (Rails 8 default) Background Jobs: Solid Queue (for invitation emails)
Future Considerations
Export to PDF/print format for offline use Audio pronunciation recordings Mobile app Offline mode with sync Additional languages via migration