Git Product home page Git Product logo

claimant's Introduction

claimant bot

[EN] This repository contains the source code of claimant_bot telegram bot. This bot helps people to compose the claim into the court without help from the lawyer side.

[RU] Данный репозиторий содержит исходный код телеграмм бота claimant_bot. Этот бот помогает людям составлять различные исковые заявления в суд не прибегая к помощи профессионального юриста.

How to start bot?

  1. Firstly, you need to build claimant-bot docker image with command:
cd ./src/bot & docker build . -t claimant-bot:latest

Also, there is a necessary to build clear-db-daemon docker image with command:

cd ./src/clear_db_daemon & docker build . -t clear-db-daemon:latest
  1. You need to compose .env file with main bot settings and save it into ./src/bot directory:
API_TOKEN= # The telegram bot token. For testing you can generate a new one with @BotFather bot
ENCRYPT_KEY= # The key for encrypting user data in DB
ADMIN_IDS= # Telegram IDs of admins

MONGO_INITDB_ROOT_USERNAME= # MongoDB root user name
MONGO_INITDB_ROOT_PASSWORD= # MongoDB root user password
MONGO_INITDB_USERNAME= # MongoDB client user name
MONGO_INITDB_PASSWORD= # MongoDB client user password
MONGO_INITDB_DATABASE= # MongoDB database name
MONGO_HOST= # MongoDB host. In case of run with docker-compose it should be 'bot-db'. Otherwhise - 'localhost'.
MONGO_PORT= # MongoDB port. By default - 27017
  1. When you achieve a correct .env file, you can run bot with docker-compose command from ./src/bot directory: docker-compose up -d

About claim templates

[EN] The main part of claimant-bot is a claim templates. The claim template is a decomposition of claim with a specific theme, which was built by profession lawyers. It contains predefined options for choosing, examples of life situations and describes what action should user do for composing claim properly. You can find the claim template JSON-schema description in this readme.

[RU] Основной элемент claimant-bot это шаблоны исковых заявлений. Шаблон искового заявления - это декомпозиция конкретного искового заявления, которая составляется профессиональными юристами. Шаблон содержит заготовленные ответы, примеры ситуаций, а так же описывает какие действия должен совершить пользователь для правильного составления заявления. Вы можете найти описание JSON-схемы шаблонов в этой документации.

claimant's People

Contributors

ibalag avatar nchursin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nchursin

claimant's Issues

Empty claim parts are resolved as filled

Reproduction steps:

  1. Choose any claim template for filling
  2. Choose one of the following claim parts: "essence", "proofs", "claims", "additions"
  3. Do nothing and just finish claim part filling

Expected:
Claim part is not marked as filled

Actual:
Claim part is marked as filled

Add a wrapper over existed bot handles for web version.

Telegram is a good platform for building useful bots. But, there are a lot comrades who don't have telegram account, but still want to use claimant bot. So, the idea of this feature request is to create a simple wrapper over existed aiogram bot handler. And, this wrapper should abstract bot handlers as simple Web API.
For example:

POST https://bot-host
body: 
{
    message: {...} // the same object like in aiogram
}

Also, need to implement (reuse?) simple chat on client side with ability to communicate with bot Web API.

Use post code for determination of user city

Currently, bot asks user to enter post code (aka post index) and city. But, we can automate it and determinate user city by post code. For example we can use this API - https://www.postindexapi.ru/
Also, make sense to ask user to confirm the city which was got automatically. And, if it is not correct - need to provide ability to enter city manually.

MVP

TODO list

  • Add option for enter court address
  • Add saving data into MongoDB
  • Add uploading options from MongoDB
  • Add checking for duplicates in selected options
  • Replace option selection with inline buttons
  • Move common handler logic into module
  • Add logic for population html template and converting it into PDF\docx
  • Deploy on production server
  • Automate deploy on production server
  • Add INN into header
  • Add asking for count of moral compensation
  • Add calculation for average payment
  • Story part - join latest 2 questions
  • Calculation for average payment - add calculation of months
  • Use salary for calculation average payment during essence example template population
  • Date format with dot
  • Fix minor issues from doc
  • Use ML lib for correcting word suffix
  • Add encryption for user data
  • Add example off oof_profit calculation
  • Add doc about personal data
  • Add daemon for clearing old data
  • Add statistics

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.