This is a simple music player app with backend and frontend. The backend is written in Java-Spring using Microservices architecture and the frontend is written in Flutter. The backend is deployed on private server. You can use provided executables/apk to run the app and test it.
- Docker
- Docker-compose
- Make(Only for linux/mac)
- Java JDK Version 17 (Optional)
- Maven (Optional)
If you use 'nodeps' version of build scripts, you don't need Java and Maven. But mind that, It will take more time to build the project as it will download all dependencies for each microservice and build them inside docker container. Also, It will leave the dangling images and containers after build. You can use docker system prune
to clean ALL unused images and containers. As stated, this will remove ALL unused images and containers, related to this project or not. So, use it with caution.
- Flutter SDK
Cloning this repository does not mean you have cloned all required submodules. You need to clone them manually. You can use git submodule update --init --recursive --remote
command or make init
command on linux/mac to clone all submodules.
Skipping this step will result in build errors because of missing files.
On the root of the repository:
-
Run
docker network create dir_music_network
to create a network for the backend. -
Run either
build-win-deps.ps1
orbuild-win-nodeps.ps1
according to your build preference. See This note for more info. -
Run
docker-compose up
to start the backend.
On the root of the repository:
-
Use either
make build
ormake build-nodeps
according to your build preference. See This note for more info. -
Run
docker-compose up
ormake up
to start the backend.
On the root of the client directory ./clients/dir_music_client/
:
-
Run
flutter pub get
to get all dependencies. -
Run
dart run build_runner build
to generate required files. -
Then you can run the app on your device or emulator or you can build the executable/apk. See Flutter documentation for more info on how to build for desired platform.
You can provide build args to flutter with --dart-define
flag (More Information). If you don't provide a arg it will use default value. Application accepts following build args:
API_URL
: URL of the backend API. Default:http://localhost:8080
Also if you use VS Code to build the app, you can see predefined build configurations in .vscode/launch.json
file that both has build args and not.
This project is licensed under the terms of the MIT License.