Mow-E / Backend

It works and thanks for that
1 stars 0 forks source link

Documentation of Mow-E Backend

High Level Requirements

#B1.1 #B1.2 #B1.3
Publish a REST API for reading and writing
position data that is sent from the mower.
The REST API shall contain a service
for reading and writing image data.
When image data is written, the service shall perform
an image classification via for example Google API.

Low Level Requirements

#B1.1
Websockets for R/W
mowers position data
#B1.2
Service for read/write
image data
#B1.3
Service for image classification
#B1.4
Security
#B1.5
Additional Functionality
#B1.6
Tests
#B1.1a
Endpoint for accessing websocket
#B1.2a
Websocket endpoint
for receiving images
#B1.3a
Access to Google Vision API
#B1.4a
Enabling security in Spring
#B1.5a
Binding a mower to a specific user
#B1.6a
Python scripts for testing the websockets
#B1.1b
Controller for processing the websocket endpoints
#B1.2b
Image storing
#B1.3b
Service for Image classification
#B1.4b
User-Admin tables in db
#B1.5b
Frontend for Admin Dashboard
#B1.6b
Spring tests for high level requirements - authentication, authorization, managing the mower, mowing history, images
#B1.1c
Position data prototype
#B1.2c
Bind image to collision coordinate
#B1.3c
Saving data from Image classification service
#B1.4c
Authentication & Authorization via REST API
#B1.5c
Endpoints for an overview of user/mower statistics
#B1.6c
Github actions for Spring tests
#B1.1d
Service for saving positioning data
#B1.4d
Authentification via JWT
#B1.5d
Endpoint for cleaning the image repository
#B1.1e
Position data broadcast
for Mobile
#B1.4e
Websocket authentification
#B1.4f
Endpoints for retrieving mowing sessions
#B1.4f
Error handling
#B1.4g
Establishing a communication protocol

Network diagram

network_diagram.png

File structure overview

detailed_structure_dark.png

Main Class

Configs

Services

Controllers

Repository

Resources

Utils

Tests

Frontendus -> under construction

Dashboard that help the admin to see key information about the all project.

Stack used

How to launch it ?

First you need to create a .env

VITE_API_HOST=https://mow-e.me/
cd frontend/
yarn install
yarn build
yarn start

The default port used is 3000

127.0.0.1:3000

Endpoints

Page Endpoints
Login /login
Signup /signup
Dashboard /dashboard/app
User /dashboard/user