Welcome to the Aquarium Automation App Frontend repository! This app allows users to monitor and control various sensors in their marine tank and planted tank, such as temperature, pH levels, nitrate, and more. It connects to a backend that provides data from mock sensors using Swagger-defined APIs.
All backend interactions are done via the Swagger-defined API. To explore and understand the endpoints, refer to the swagger.yml
file or visit the Swagger UI endpoint from the backend service.
http://localhost:8081
http://localhost:8084
localhost:8081
)POST /users/register
Description: Registers a new user.
Request Body:
{
"username": "string",
"password": "string"
}
Response:
User created successfully
Bad request
POST /users/login
Description: Logs in a user and returns a JWT token.
Request Body:
{
"username": "string",
"password": "string"
}
Response:
Login successful
, JWT token returnedUnauthorized
GET /users/profile
Description: Returns the logged-in user's profile data.
Headers:
Authorization: Bearer <token>
Response:
Profile data
Unauthorized
PUT /users/profile
Description: Updates the logged-in user's profile data.
Headers:
Authorization: Bearer <token>
Request Body:
{
"email": "string",
"phone": "string"
}
Response:
Profile updated successfully
Bad request
Unauthorized
localhost:8084
)GET /actuators/Marine/greet
Description: Returns a greeting message to confirm the service is working.
Response:
"Hello from Actuator"
POST /actuators/Marine/set-saltwater-ratio
Description: Sets the saltwater mixing ratio for the marine tank.
Parameters:
ratio
(required, double
) β Saltwater mixer ratio.Response:
Saltwater mixer ratio set to X
POST /actuators/Marine/set-calcium-rate
Description: Sets the calcium dosing rate for the marine tank.
Parameters:
rate
(required, double
) β Calcium dosing rate in mL/hour.Response:
Calcium dosing rate set to X mL/hour
POST /actuators/Marine/set-alkalinity-rate
Description: Sets the alkalinity dosing rate for the marine tank.
Parameters:
rate
(required, double
) β Alkalinity dosing rate in mL/hour.Response:
Alkalinity dosing rate set to X mL/hour
POST /actuators/Marine/set-skimmer-efficiency
Description: Sets the skimmer efficiency percentage for the marine tank.
Parameters:
efficiency
(required, double
) β Skimmer efficiency in percentage.Response:
Skimmer efficiency set to X%
POST /actuators/Marine/set-heater-temp
Description: Sets the heater temperature for the marine tank.
Parameters:
temperature
(required, double
) β Heater temperature in Celsius.Response:
Heater temperature set to XΒ°C
POST /actuators/Marine/set-light-duration
Description: Sets the light time duration for the marine tank.
Parameters:
duration
(required, int
) β Duration in hours.Response:
Light duration set to X hours
GET /sensors/marine
Description: Retrieves all sensor data for the marine tank.
Response:
Array of sensor data
localhost:8084
)GET /actuators/Planted/greet
Description: Returns a greeting message to confirm the service is working.
Response:
"Hello from Actuator"
POST /actuators/Planted/set-light-intensity
Description: Sets the light intensity for the planted tank.
Parameters:
intensity
(required, double
) β Light intensity in percentage.Response:
Light intensity set to X%
POST /actuators/Planted/set-fertilizer-dose
Description: Sets the fertilizer dosing rate for the planted tank.
Parameters:
dose
(required, double
) β Fertilizer dosing rate in mL/day.Response:
Fertilizer dosing rate set to X mL/day
POST /actuators/Planted/set-co2-injection-rate
Description: Sets the CO2 injection rate for the planted tank.
Parameters:
rate
(required, double
) β CO2 injection rate in bubbles per second.Response:
CO2 injection rate set to X bubbles/second
GET /sensors/planted
Description: Retrieves all sensor data for the planted tank.
Response:
Array of sensor data
The app uses a custom color scheme to give a unique, polished look. You can find and customize it in src/utils/palette.js
. We aim for soft, oceanic hues that enhance the user experience while monitoring the aquarium's environment.
export const palette = {
primary: '#0D6EFD', // Bootstrap primary blue
accent: '#56CCF2', // Light ocean blue
dark: '#0B3D91', // Deep sea blue
background: '#F3F9FB', // Light seafoam
};
Complete Color Palette defined in the index.css
The app will be running at http://localhost:5173 by default.
We welcome contributions from the community! Follow these steps to contribute to the project:
Fork the repository.
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
Make your changes.
Run tests (if any) to ensure your code works as expected.
Commit and push your changes to your branch:
git add .
git commit -m "Add your commit message"
git push origin feature/your-feature-name
Submit a pull request (PR):
Wait for your code to be reviewed and merged!
Riju Mondal β Project Maintainer
Contributors β Special thanks to all contributors
This project is licensed under the MIT License. See the LICENSE file for more details.