Skip to content

brzvsk/longreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š Longreader โ€” save articles to read them later

documents_file_20130_023032fbf8 documents_file_20129_1ffbc42f42 documents_file_20128_8cc9e52395 documents_file_20131_b3a5b8ca16

Overview

Longreader is a Telegram mini app designed to help users save and read long articles conveniently.

You can use this app as publicly deployed by @brzvsk here: https://t.me/ReadWatchLaterBot

โค๏ธ We will appreciate any donations and support to keep the app running for everyone. Please, donate with Telegram Tribute Bot (VISA, Mastercard, MIR, and Wallet payments accepted).

Project Structure

  • frontend/: Next.js application for the web interface
  • backend/: FastAPI backend service
  • telegram-bot/: Kotlin-based Telegram bot service
  • nginx.conf: Nginx configuration for reverse proxy
  • docker-compose.yml: Docker composition for all services

Tech Stack

  • Frontend: Next.js
  • Backend: FastAPI (Python)
  • Telegram Bot: Kotlin, Telegram Bot API
  • Database: MongoDB
  • Proxy: Nginx
  • Container: Docker

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.8+ (for local development)
  • JDK 8+ (for telegram bot development)
  • Maven (for telegram bot development)

Setup

Using Docker (Recommended)

  1. Clone the repository:

    git clone https://github.com/brzvsk/longreader.git
    cd longreader
  2. Set up environment variables:

    • Copy .env.example to .env in both frontend/ and backend/ directories
    • Update the environment variables as needed
  3. Start the application:

    docker-compose up -d

    This will start all services:

    • Frontend on port 3000
    • Backend on port 8000
    • MongoDB on port 27017
    • Nginx on ports 80 and 443

Local Development

Frontend

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    yarn install
  3. Start the development server:

    yarn dev

Backend

  1. Navigate to the backend directory:

    cd backend
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Start the development server:

    uvicorn app.main:app --reload

Telegram Bot

  1. Navigate to the telegram-bot directory:

    cd telegram-bot
  2. Set up environment variables:

    • Create a .env file with the following variables:
      BOT_TOKEN=your_telegram_bot_token
      BOT_USERNAME=your_bot_username
      MONGODB_URI=mongodb://localhost:27017/database_name
      
  3. Build the project:

    mvn clean install
  4. Run the bot:

    mvn exec:java

Credits

Project was started by @brzvsk, @goldenluk, and @dreamwa1ker as an experiment. After that it was decided by the party to open source it.

License

This project is released under the GNU General Public License v3.0. See the LICENSE file for details.

About

Telegram Mini App that saves internet articles to read them later

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors 3

  •  
  •  
  •