Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 2.73 KB

DEVELOPMENT.md

File metadata and controls

94 lines (65 loc) · 2.73 KB

Local Development

Last Commit Commits per month Code style: black

This project is a monorepo that contains both the backend and frontend code for Minerva. The backend is built with FastAPI, and the frontend is built with React.

Technologies Used

Python TypeScript FastAPI React Docker Nmap SQLite Bootstrap Pytest

Table of Contents

Requirements

  • Python 3.13.+ (with pip)
  • Nmap installed on your system

Running the Backend

To install the backend dependencies, run the following command:

pip install -r backend/requirements.txt

Scanning your network requires root access! To get root access, run the following command:

sudo su

With root access, now you can run the backend:

cd backend
fastapi dev main.py

Alternatively, you can run the backend with the following command:

cd backend
uvicorn main:app --reload

For production, you can run the backend with the following command:

cd backend
fastapi run

Once the API is running, you have access to it at http://localhost:8000, and the Swagger UI at http://localhost:8000/docs.

Testing the Backend

This project uses pytest for testing. To run the tests, run the following command:

sudo pytest --cov -vv

To generate a coverage report, run the following command:

sudo pytest --cov --cov-report=html

Running the Frontend

To run the frontend, run the following commands:

cd frontend
npm install
npm start

Once the frontend is running, you can access to it at http://localhost:8080.