Skip to content

About This project involves a two-step authentication system (2FA) using Flask for the backend and Vue.js with Bootstrap for the frontend. The project also includes functionality to generate reports in Word format.

Notifications You must be signed in to change notification settings

my-python-projects/JReport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JReport

English | Português

English Version

Table of Contents

Description

JReport is a web application that uses two-factor authentication (2FA) to enhance user security. After the initial login, users who have 2FA enabled must provide a code generated by their authenticator app. The project also includes the functionality of generating reports in Word format.

Technologies Used

Frontend

  • Vue.js
  • Bootstrap

Backend

  • Flask
  • Pymongo
  • Flask-JWT-Extended
  • PyOTP
  • qrcode
  • RabbitMQ (with Pika)

Messaging

  • RabbitMQ

Installation and Configuration

Prerequisites

  • Python 3.x

  • Node.js 20

  • MongoDB

    OR

  • Docker

  • Docker Compose

Run with Docker and Docker Compose

  1. Make sure you have Docker and Docker Compose installed on your machine.

  2. Run the following command in the project's root directory:

    docker-compose up --build
  3. The application will be available at:

Run without Docker

Backend

  1. Navigate to the backend directory:

    cd backend
  2. Create and activate a virtual environment:

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

    pip install -r requirements.txt
  4. Configure environment variables in the .env file.

  5. Start the server:

    python app.py

Frontend

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the server:

    npm run serve
  4. The application will be available at http://localhost:8080.

Run using .bat scripts

Backend

  1. Navigate to the run directory in the project root.

    cd run
  2. Run the backend.bat script

    backend.bat

Frontend

  1. Navigate to the run directory in the project root.

    cd run
  2. Run the frontend.bat script

    frontend.bat

Features

  • 2FA Authentication: After the initial login, if 2FA is enabled, the user must provide an additional authentication code.

  • Report Generation: Generation of reports in Word format.

  • Messaging with RabbitMQ: Use RabbitMQ for asynchronous task processing.

Contributing

  1. Fork the project.

  2. Create a branch for your feature (git checkout -b feature/your-feature).

  3. Commit your changes (git commit -m 'Add your feature').

  4. Push to the branch (git push origin feature/your-feature).

  5. Open a Pull Request.

License

This project is licensed under the MIT License.

Versão em Português

Índice

Descrição

JReport é uma aplicação web que utiliza autenticação com duas etapas (2FA) para aumentar a segurança dos usuários. Após o login inicial, os usuários que têm o 2FA ativado devem fornecer um código gerado pelo seu aplicativo autenticador. O projeto também inclui a funcionalidade de geração de relatórios em formato Word.

Tecnologias Utilizadas

Frontend

  • Vue.js
  • Bootstrap

Backend

  • Flask
  • Pymongo
  • Flask-JWT-Extended
  • PyOTP
  • qrcode
  • RabbitMQ (com Pika)

Mensageria

  • RabbitMQ

Instalação e Configuração

Pré-requisitos

  • Python 3.x

  • Node.js 20

  • MongoDB

    OU

  • Docker

  • Docker Compose

Executar com Docker e Docker Compose

  1. Certifique-se de ter o Docker e o Docker Compose instalados na sua máquina.

  2. Execute o seguinte comando no diretório raiz do projeto:

    docker-compose up --build
  3. A aplicação estará disponível em:

Executar sem Docker

Backend

  1. Navegue até o diretório backend:

    cd backend
  2. Crie e ative um ambiente virtual:

    python -m venv venv
    source venv/bin/activate  # For Windows: venv\Scripts\activate
  3. Instale as dependências:

    pip install -r requirements.txt
  4. Configure as variáveis de ambiente no arquivo .env

  • Renomeie o arquivo .env-example para .env e modifique as váriaveis.
  1. Inicie o servidor:

    python app.py

Frontend

  1. Navegue até o diretório frontend:

    cd frontend
  2. Instale as dependências:

    npm install
  3. Inicie o servidor:

    npm run serve
  4. A aplicação estará disponível em http://localhost:8080.

Executar usando scripts .bat

Backend

  1. Navegue até o diretório run no raiz do projeto.

    cd run
  2. Execute o script backend.bat

    backend.bat

Frontend

  1. Navegue até o diretório run no raiz do projeto.

    cd run
  2. Execute o script frontend.bat

    frontend.bat

Funcionalidades

  • Autenticação 2FA: Após o login inicial, se o 2FA estiver ativado, o usuário deve fornecer um código de autenticação adicional.

  • Geração de Relatórios: Geração de relatórios em formato Word.

  • Mensageria com RabbitMQ: Utilização do RabbitMQ para processamento assíncrono de tarefas.

Contribuição

  1. Faça um fork do projeto.

  2. Crie uma branch para sua feature (git checkout -b feature/your-feature).

  3. Faça commit das suas alterações (git commit -m 'Add your feature').

  4. Faça push para a branch (git push origin feature/your-feature).

  5. Abra um Pull Request.

Licença

Este projeto está licenciado sob a MIT License.

About

About This project involves a two-step authentication system (2FA) using Flask for the backend and Vue.js with Bootstrap for the frontend. The project also includes functionality to generate reports in Word format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published