mirror of
https://github.com/Tony0410/readlater.git
synced 2026-05-24 22:01:41 +08:00
Initial commit: ReadLater v1.0
- Save articles via URL or bookmarklet - Clean dark reader with customizable fonts/sizing - Text-to-speech with browser + Kokoro support - Speed control up to 3x - Favorites and archive - SQLite database with Drizzle ORM - Docker deployment ready Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
142
README.md
Normal file
142
README.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# ReadLater
|
||||
|
||||
A self-hosted read-it-later app with text-to-speech support. Save articles, read them later with a clean dark reader interface, and listen to them with high-quality TTS.
|
||||
|
||||
## Features
|
||||
|
||||
- **Save Articles**: Paste URLs or use the bookmarklet to save articles
|
||||
- **Clean Reader**: Distraction-free reading with dark mode (black background, white text)
|
||||
- **Customizable**: Adjust font size, font family, line height, and content width
|
||||
- **Favorites & Archive**: Organize your reading list
|
||||
- **Text-to-Speech**:
|
||||
- Browser TTS (built-in, works offline)
|
||||
- Kokoro TTS (high-quality, self-hosted)
|
||||
- Speed control up to 3x
|
||||
- **Bookmarklet**: One-click saving from any browser
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Using Docker (Recommended)
|
||||
|
||||
```bash
|
||||
# Clone or download the project
|
||||
cd /root/projects/readlater
|
||||
|
||||
# Start with Docker Compose
|
||||
docker compose up -d
|
||||
|
||||
# Access at http://localhost:3000
|
||||
```
|
||||
|
||||
### Manual Installation
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Run database migrations
|
||||
npm run db:migrate
|
||||
|
||||
# Start development server
|
||||
npm run dev
|
||||
|
||||
# Or build for production
|
||||
npm run build
|
||||
npm start
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Adding Articles
|
||||
|
||||
1. **Paste URL**: Use the input field at the top of the app
|
||||
2. **Bookmarklet**: Go to `/bookmarklet` and drag the button to your bookmarks bar
|
||||
|
||||
### Reading
|
||||
|
||||
- Click any article to open the reader
|
||||
- Use the settings panel (gear icon) to customize:
|
||||
- **Theme**: Dark (default), Light, or Sepia
|
||||
- **Font Size**: 14-32px
|
||||
- **Font Family**: Serif, Sans, Mono, or System
|
||||
- **Line Height**: Tight to Loose
|
||||
- **Content Width**: Narrow to Wide
|
||||
|
||||
### Text-to-Speech
|
||||
|
||||
- Click the speaker icon to start reading
|
||||
- Control playback with pause/resume/stop buttons
|
||||
- Adjust speed in settings (0.5x to 3x)
|
||||
|
||||
#### Browser TTS
|
||||
Works out of the box using your browser's built-in speech synthesis.
|
||||
|
||||
#### Kokoro TTS (Optional)
|
||||
For higher quality TTS, uncomment the `kokoro` service in `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
kokoro:
|
||||
image: ghcr.io/remsky/kokoro-fastapi:latest
|
||||
container_name: kokoro-tts
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8880:8880"
|
||||
```
|
||||
|
||||
Then select "Kokoro" in the TTS settings.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `DATABASE_PATH` | `./data/readlater.db` | Path to SQLite database |
|
||||
| `PORT` | `3000` | Server port |
|
||||
|
||||
### Data Persistence
|
||||
|
||||
The SQLite database is stored in `./data/readlater.db`. Mount this directory as a volume when using Docker.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Framework**: Next.js 16 with App Router
|
||||
- **Language**: TypeScript
|
||||
- **Database**: SQLite with Drizzle ORM
|
||||
- **Styling**: Tailwind CSS
|
||||
- **Article Extraction**: Mozilla Readability
|
||||
- **TTS**: Web Speech API + Kokoro-FastAPI
|
||||
|
||||
## API Endpoints
|
||||
|
||||
| Endpoint | Method | Description |
|
||||
|----------|--------|-------------|
|
||||
| `/api/articles` | GET | List articles (query: `filter=all\|favorites\|archived`) |
|
||||
| `/api/articles` | POST | Save new article (body: `{url}`) |
|
||||
| `/api/articles/[id]` | GET | Get single article |
|
||||
| `/api/articles/[id]` | PATCH | Update article |
|
||||
| `/api/articles/[id]` | DELETE | Delete article |
|
||||
| `/api/save` | GET | Bookmarklet endpoint (query: `url`) |
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Start dev server
|
||||
npm run dev
|
||||
|
||||
# Generate new migration after schema changes
|
||||
npm run db:generate
|
||||
|
||||
# Run migrations
|
||||
npm run db:migrate
|
||||
|
||||
# Open Drizzle Studio (database GUI)
|
||||
npm run db:studio
|
||||
|
||||
# Lint
|
||||
npm run lint
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user