Skip to content

Telegram-bot - for storing/ sharing user notes, and creating notifications.

License

Notifications You must be signed in to change notification settings

l1ve4code/telegram-note-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📓 Note [Telegram bot]

About

Telegram-bot - for storing user notes, with the ability to share your notes with other users and create reminders.

You can try it here.

Goals

  • ✅ Add basic functionality with storing user notes in a List;
  • ✅ Integrate a database and start using it instead of a List;
  • ✅ Add text and hints for existing commands;
  • ✅ Add the ability to automatically generate a table structure in the database for easy deployment of the project;
  • ✅ Add the ability to work with the bot using the (reply/ inline) keyboard;
  • ✅ Add the ability to share your notes with other users;
  • ✅ Add the ability to create notifications;
  • ✅ Add the ability to delete notifications;
  • ✅ Consider corner-cases;
  • ✅ Make a Dockerfile to run the project.

Technologies

  • Language: Java
  • Framework: Spring Framework
  • Database: PostgreSQL
  • Technologies: Telegrambots, Lombok, Liquibase

Installing

Clone the project

git clone https://github.com/l1ve4code/telegram-note-bot.git

Set your values in postgres.yml or production.yml

(For example: username, password and etc, or use defaults)

  postgres:
    container_name: <your-container-name>
    image: postgres
    environment:
      POSTGRES_USER: <your-user-name>
      POSTGRES_PASSWORD: <your-password>
      PGDATA: /data/postgres
    volumes:
      - postgres:/data/postgres
    ports:
      - "5432:5432"
    restart: unless-stopped

Replace the gaps in the config with your values

(Properties path: src/main/properties.d/telegram.properties)

spring.datasource.url=jdbc:postgresql://<your-host>:5432/<your-database>
spring.datasource.username=<your-username>
spring.datasource.password=<your-password>
spring.datasource.driver-class-name=org.postgresql.Driver

spring.liquibase.change-log=classpath:postgres/changelog.xml

telegram.bot.name=<your-bot-name>
telegram.bot.token=<your-bot-token>

Project startup (using IDE)

First, you need to run docker-compose

docker-compose -f postgres.yml up

Then you need to start the Java project using your IDE

Project startup (using Docker)

Just run this command and project will be built and launched automatically

docker-compose -f production.yml up

Good luck ✨

Author

About

Telegram-bot - for storing/ sharing user notes, and creating notifications.

Topics

Resources

License

Stars

Watchers

Forks