docs(readme): add config options & usage
This commit is contained in:
parent
2fcef88554
commit
488634f051
1 changed files with 54 additions and 10 deletions
64
README.md
64
README.md
|
|
@ -1,18 +1,62 @@
|
|||
# CSEP Template Project
|
||||
# CSEP FoodPal Application (Team 76)
|
||||
|
||||
This repository contains the template for the CSE project. Please extend this README.md with sufficient instructions that will illustrate for your TA and the course staff how they can run your project.
|
||||
## Usage
|
||||
|
||||
To run the template project from the command line, you either need to have [Maven](https://maven.apache.org/install.html) installed on your local system (`mvn`) or you need to use the Maven wrapper (`mvnw`). You can then execute
|
||||
The project uses Java 25. Make sure you have the correct Java version installed.
|
||||
|
||||
mvn -pl server -am spring-boot:run
|
||||
### Client
|
||||
|
||||
to run the server and
|
||||
The client needs to be launched **after** a server is already running, see Usage.Server section:
|
||||
|
||||
mvn -pl client -am javafx:run
|
||||
```
|
||||
mvn -pl client -am javafx:run
|
||||
```
|
||||
|
||||
to run the client. Please note that the server needs to be running, before you can start the client.
|
||||
### Server
|
||||
|
||||
Get the template project running from the command line first to ensure you have the required tools on your sytem.
|
||||
By default, the server listens to the port `8080`.
|
||||
[TODO(1)]:: Configurable port.
|
||||
|
||||
Once it is working, you can try importing the project into your favorite IDE. Especially the client is a bit more tricky to set up there due to the dependency on a JavaFX SDK.
|
||||
To help you get started, you can find additional instructions in the corresponding README of the client project.
|
||||
```
|
||||
mvn -pl server -am spring-boot:run
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Recipe tracking in an intuitive GUI.
|
||||
- Ability to input arbitrary amounts of an ingredient in a recipe. The design is very human. See Manual.Ingredients for more usage details.
|
||||
- Native localization in more than 2, and less than 4 languages.
|
||||
- Configurable via JSON, See Manual.Configuration.
|
||||
|
||||
## Manual
|
||||
|
||||
### Configuration
|
||||
|
||||
The configuration is with JSON, read from `config.json` in the working directory. We illustrate an example configuration below.
|
||||
```json
|
||||
{
|
||||
"language": "en",
|
||||
"serverUrl": "http://localhost:8080",
|
||||
"favourites": [
|
||||
1,
|
||||
],
|
||||
"shoppingList": [
|
||||
"Ingredient A",
|
||||
],
|
||||
}
|
||||
```
|
||||
#### Options
|
||||
|
||||
- `language: string`
|
||||
- One of \[en, nl, pl\] (as of Jan 11 2026)
|
||||
- `serverUrl: string`
|
||||
- The host that the FoodPal server runs on, see configuration example.
|
||||
- `favourites: [number]`
|
||||
- The list of recipe IDs that the user has marked as favourite.
|
||||
- `shoppingList: [string]`
|
||||
- The list of ingredients that the user has in their shopping list.
|
||||
|
||||
### Ingredients
|
||||
|
||||
- To input a **formal** ingredient, you write the numeric amount in the first input box, then the Unit in the selection dropdown, and then write the name of the ingredient, e.g. salt, apples, etc. should it be not visible already on the platform.
|
||||
- To input an **informal** ingredient, describe the amount in the first input box, like "some of", or "a sprinkle of", then select "<NONE>" in the unit selection box, and write the name of your ingredient or pick from one of the availables from the dropdown.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue