#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. |
#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 |
- SweBotApplication.java
- The heart of the project - Contains the swagger configuration.
-
- This class captures all untracked errors from endpoints and returns a default error-json.
-
- We reserve a pool of executors that are needed for various tasks.
- Currently for the communication with the Google Vision API in a separate thread.
- We reserve a pool of executors that are needed for various tasks.
-
- Setting the access authority for all endpoints.
- Error handling in case of missing authorities.
- Enabling the JwtRequestFilter for processing the JWT.
- Creates standard users for testing the application. (user & admin).
- Encodes the passwords for saving them in db
- Simply processes the JWT tokens if exists in request.
- All requests are going through this filter to identify the authority.
-
- Resource handler
- Path matching
- CORS configuration
-
- Stomp configuration
- Authentication for websockets
- Destination prefixes for endpoints
- JwtService.java
- Generation of JWT
- Creation of JWT
- Validation of JWT
- AuthService.java
- Creates JWT tokens.
- User authentication.
- AdminService.java
- Functions for deleteing users.
- Fetching user statistics.
- functions to get mower statistics.
- UserService.java
- Get images for a user.
- Get history for a user.
- Add a mower to a user account.
- ImageService.java
- Logic for receiving images
- Image storing
- Uses the ImageClassificationService
- ImgClassificationService.java
- Uses the Google Vision APIsimus for image classification
- MowerService.java
- Creates a new mowing session
- Stores the coordinates
- AuthController.java
- Makes use of the AuthService
- Auth endpoints
- Error handling
- Processes the username and password
- AdminController
- Makes use of AuthService
- Makes use of ImageService
- Handles CRUD function for users and admins.
- UserController
- Endpoints for fetching user history and images.
- Endpoints for adding a mower to a user account.
- ErrorController.java
- The real error handler
- Default errors
- Db errors
- Validation errors
- The real error handler
- ImageController.java
- Makes use of the ImageService
- Image endpoints
- MowerController.java
- Makes use of the MowerService
- Broadcasts the coordinates to the subscribers of a specific mower
- MyControlous.java
- A hello worldous endpointus
- CoordinateRepo.java
- Methods for retrieving coordinate data from the db
- Processes the coordinate data
- Creates the table
- application.properties
- A lot of settings for the entire application
- I resist to document all of them
- schema.sql
- Initializes the db tables on first application run
- UtilImage
- Saving images to file system.
-
- Tests endpoints for register and login user.
-
- Tests user functionality for fetching history, images and binding mower to a user.
Dashboard that help the admin to see key information about the all project.
- Vite
- React.js
- MUI 5
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
Page | Endpoints |
---|---|
Login | /login |
Signup | /signup |
Dashboard | /dashboard/app |
User | /dashboard/user |