Created by @chicohaager
A modern, full-stack digital library management system built with React and Node.js. Upload, organize, and share your PDF and EPUB files with secure authentication, shareable links, and comprehensive multilingual support.
- Modern Web Interface - React 18 with Material-UI components and PWA support
- File Upload & Management - Drag-and-drop PDF/EPUB upload (up to 70MB)
- Smart Search & Filtering - Find books by title, author, or type
- Role-Based Access - Admin and user roles with proper permissions
- Secure Authentication - JWT-based with bcrypt password hashing
- Complete Language Support - Full UI translation system
- 14 Languages Available:
- 🇺🇸 English
- 🇩🇪 German (Deutsch)
- 🇫🇷 French (Français)
- 🇪🇸 Spanish (Español)
- 🇮🇹 Italian (Italiano)
- 🇵🇹 Portuguese (Português)
- 🇳🇱 Dutch (Nederlands)
- 🇷🇺 Russian (Русский)
- 🇵🇱 Polish (Polski)
- 🇹🇷 Turkish (Türkçe)
- 🇨🇳 Chinese (中文)
- 🇯🇵 Japanese (日本語)
- 🇰🇷 Korean (한국어)
- 🇸🇦 Arabic (العربية)
- Dynamic Language Switching - Change language on-the-fly from navbar
- Localized Date Formatting - Dates display in selected language format
- Complete UI Translation - All interface elements, admin panels, and messages
- Public Sharing - Create shareable links for any book (no login required)
- Flexible Expiration - Permanent, 24-hour, or 7-day links
- Access Tracking - Monitor link usage and download counts
- Link Management - View, copy, and deactivate shared links
- Secure Tokens - UUID-based tokens for security
- Cover Upload - Add book cover images during upload
- Visual Library - Beautiful cover display in book grid
- Format Support - JPG, PNG, WEBP images (up to 5MB)
- Share Page Display - Covers shown in public share links
- Real-time Counters - Track download statistics
- Public & Private - Count both authenticated and public downloads
- Dashboard Display - View download stats in book cards
- Share Analytics - Monitor shared book performance
- Database Indexing - Optimized queries for large collections
- Server-Side Pagination - Efficient data loading
- API Response Caching - Faster repeated requests
- Smart Search - Real-time filtering with backend support
- Frontend: React 18, Material-UI 5, React Router 6
- Backend: Node.js, Express.js, SQLite
- Authentication: JWT (JSON Web Tokens)
- File Handling: Multer with type validation
- Containerization: Docker & Docker Compose
- Docker and Docker Compose installed
- Git for cloning the repository
git clone https://github.com/chicohaager/lectoria.git
cd lectoriaProfessional Docker Image with PUID/PGID Support:
# Quick start with proper permissions
docker run -d -p 3000:3000 \
-e PUID=1000 -e PGID=1000 \
-v lectoria_data:/app/data \
-v lectoria_uploads:/app/uploads \
chicohaager/lectoria:latest
# Or use Docker Compose
docker-compose up -d --buildEnvironment Variables for File Permissions:
PUID=1000 # Your user ID (run 'id' to find yours)
PGID=1000 # Your group IDOpen your browser and navigate to: http://localhost:3000
Default Credentials:
- Username:
admin - Password:
admin123 - Role: Administrator
cd frontend
npm install
npm start # Development server (port 3000)
npm run build # Production build
npm test # Run testsnpm install
npm start # Production server
npm run dev # Development with auto-reload
npm run dev:server # Backend only
npm run dev:client # Frontend onlylectoria/
├── docker-compose.yml # Container orchestration
├── Dockerfile # Multi-stage build
├── package.json # Backend dependencies
├── backend_server.js # Express server
├── logo.png # Application logo
├── frontend/
│ ├── package.json # Frontend dependencies
│ ├── public/
│ │ └── logo.png # Public logo
│ └── src/
│ ├── App.js # Main application
│ ├── components/ # React components
│ └── services/ # API services
├── uploads/ # File storage
└── data/ # Database configuration
- users: User accounts with roles and authentication
- books: Book metadata and file information
- share_links: Shareable link management with expiration
idx_books_uploaded_by- User's books lookupidx_books_upload_date- Chronological sortingidx_share_links_token- Fast token validationidx_share_links_book_id- Book shares lookup
POST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/books- List books (with pagination & search)POST /api/books/upload- Upload new book with optional cover imageDELETE /api/books/:id- Delete bookGET /api/books/:id/download- Download book
POST /api/books/:id/share- Create shareable linkGET /api/books/:id/shares- List book's active sharesDELETE /api/shares/:token- Deactivate linkGET /api/share/:token- Public book info (no auth)GET /api/share/:token/download- Public download (no auth)
GET /api/users- List users (admin only)
- Navigate to Dashboard
- Click the Share icon on any book you own
- Choose expiration: Permanent, 24 hours, or 7 days
- Copy the generated URL
- Share URLs work without login:
https://your-domain.com/share/{token} - Recipients can view book details and download files
- Track usage with access counts and timestamps
- View all active shares for your books
- Copy URLs to clipboard with one click
- Deactivate links when no longer needed
- Monitor access statistics
NODE_ENV=production # Environment mode
JWT_SECRET=your-secure-secret-key # JWT signing key
PORT=3000 # Server portservices:
app:
build: .
ports:
- "3000:3000"
volumes:
- ./uploads:/app/uploads # File storage
- ./data:/app/data # Database
environment:
- NODE_ENV=production
- JWT_SECRET=your-secret-key- JWT Authentication - Secure token-based sessions
- Password Hashing - bcrypt with salt rounds
- File Type Validation - Only PDF/EPUB allowed
- File Size Limits - 50MB maximum upload
- Role-Based Permissions - Admin vs user access control
- Secure Share Tokens - UUID-based unguessable links
- Optional Expiration - Time-limited access control
- Set JWT_SECRET - Use a secure, random key in production
- Configure Volumes - Ensure data persistence with Docker volumes
- Reverse Proxy - Use nginx or similar for HTTPS
- Backup Strategy - Regular backups of uploads and database
# Set secure JWT secret
export JWT_SECRET="your-very-secure-random-key"
# Start production containers
docker-compose up -d --build- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
MIT License - see LICENSE file for details.
- Material-UI for the beautiful component library
- React community for excellent documentation
- Docker for containerization made simple
💡 Built with passion by @chicohaager | GitHub Repository
