Skip to content

Commit c826d4e

Browse files
committed
documentation
1 parent b1bf551 commit c826d4e

13 files changed

+98
-31
lines changed

Diff for: README.md

+98-30
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Music Library player
22

3-
![Music library](./doc/geoviewer.jpg "Music library")
3+
![Music library](./doc/header.jpg "Music library")
44

55
Have you ever wonder of playing your music located in France ? or Canada ? or Jamaiqua ?
66

77
Just pick a country and let the music play !
88

99
(Also edit your music library to add geolocalisation link ;) )
1010

11-
Incompatible with Chrome, <audio> balise is not displayed, but the song is playing.
11+
Known bug: Chrome doesn't display `<audio>` balise because of weird positioning, but the song is playing.
1212

1313
## What it is
1414

1515
- An Audio manager and player. Currently supporting MP3, OGG & WAV as I simply use <audio> html element. Sorry for all FLAC lovers.
1616
- Define playlist from each available panels
1717

18+
- Music library accessing in readonly mode to your local library
19+
- Musics from your fileSystem are saved in database on the first reach.
20+
1821
## What it is not
1922

2023
- A music metadata editor. For that part, I recommand using [MP3Tag](https://www.mp3tag.de)
@@ -33,51 +36,113 @@ Backend :
3336
- Database : [PostgreSQL](https://www.postgresql.org/), [PostGIS](https://postgis.net/)
3437
- Geospatial : [GeoDjango](https://docs.djangoproject.com/fr/5.0/ref/contrib/gis/)
3538
- Audio metadata : [mutagen](https://mutagen.readthedocs.io)
39+
- Distributed Task Queue : [Celery](https://docs.celeryq.dev) with [Redis](https://redis.io/fr/)
3640

3741
Release :
3842
- Frontend : [Tauri](https://tauri.app/)
3943

4044
## Architecture Diagram
4145

42-
[WIP]
46+
47+
```mermaid
48+
flowchart TD
49+
50+
backend[Django - GeoDjango
51+
http: 8000
52+
debug: 5678]
53+
frontend[Vue3-Pinia-Leaflet
54+
http: 3000]
55+
celery[Celery - Redis
56+
debug: 6900]
57+
db[PostGIS
58+
port: 54333]
59+
shp[<a href='https://www.naturalearthdata.com/'>Natural Earth Data</a>
60+
countries shapefile]
61+
Nginx[Nginx
62+
http: 8081]
63+
Tauri[Tauri
64+
protocol: tauri.localhost]
65+
exeFront[exe: geospatial-music-library.exe]
66+
exeBack[exe: manage.exe]
67+
Filesystem[FileSystem
68+
.env MUSIC_LIBRARY_PATH]
69+
70+
subgraph Web Application
71+
frontend --> Nginx
72+
frontend --> MusicBrainz
73+
subgraph front
74+
frontend --> shp
75+
webAssembly --> projectM
76+
frontend --> webAssembly
77+
end
78+
79+
subgraph back
80+
frontend --> backend
81+
backend --> celery
82+
backend --> db[(db)]
83+
backend --> gdal
84+
end
85+
86+
87+
end
88+
89+
subgraph Desktop
90+
Tauri-.->|build|frontend
91+
PyInstaller -.->|build|backend
92+
Nginx -->|read only| Filesystem
93+
Tauri ==> exeFront
94+
PyInstaller ==> exeBack
95+
end
96+
97+
```
4398

4499
## Features
45100

46-
play music and define next songs to play from
47-
- your filesystem (image)
48-
- artists view (image)
49-
- country location (image)
101+
Play music and define next songs to play from :
102+
- Your filesystem
103+
- ![FileSystem filtering](./doc/file_system_playlist.jpg "FileSystem filtering")
104+
- Artists view
105+
- ![Artists filtering](./doc/artist_playlist.jpg "Artists filtering")
106+
- Country location
107+
- ![Countries filtering](./doc/country_location_playlist.jpg "Countries filtering")
50108

51-
- Music library accessing in readonly mode to your local library
52-
- Musics from your fileSystem are saved in the database on the first reach.
53-
- Database persistency with metadata exposition
109+
Add geolocalization to your artists, using
110+
- [Musicbrainz](https://musicbrainz.org) API to get auto-suggestions
111+
- Manual picking for unknown artists or to fix out-of-boundaries locations
112+
![MusicBrainz positioning](./doc/guessing_position.jpg "MusicBrainz positioning")
54113

55-
- Geospatial music filtering
56114

57-
![Geospatial filtering](./doc/playlist_geospatial.jpg "Geospatial filtering")
115+
### Known limitation of auto-positioning
116+
----
117+
- While using the geolocalizer, you may encounter weird positioning at first sight, because the point computation is made from the center of mass of the whole country.
118+
i.e, for France auto-location always creates a point near Marocco in the ocean. This is because of French Guiana which is part of the country geometry.
58119

59-
- Geospatial music editor via [Musicbrainz](https://musicbrainz.org) API
120+
- ![Manual positioning](./doc/manual_editing_position.jpg "Manual positioning")
60121

61-
![MusicBrainz positioning](./doc/guessing_position.jpg "MusicBrainz positioning")
122+
- The result breaks the player toolbar :
62123

63-
- Geospatial music editor manual picking (either to fix ne_110m_admin_0_countries precision or when MusicBrainz doesn't know - which barely happens)
124+
- ![Positioning error](./doc/error_positioning.jpg "Positioning error")
64125

65-
![Manual positioning](./doc/manual_editing_position.jpg "Manual positioning")
126+
In that case, feel free to use the pencil and pick the country of your choice.
66127

67-
- ProjectM Milkdrop vizualisation in focus mode to enjoy animations (still WIP)
128+
----
68129

69-
![ProjectM focus Mode](./doc/projectM_focus.jpg "ProjectM focus Mode")
130+
Enjoy [ProjectM](https://github.com/projectM-visualizer/projectm) vizualisations (PoC in very early stage)
131+
- Focus mode
70132

71-
- ProjectM Milkdrop vizualisation in background mode to keep editing the playlist
133+
- ![ProjectM focus Mode](./doc/projectM_focus_mode.jpg "ProjectM focus Mode")
72134

73-
![ProjectM background Mode](./doc/projectM_background.jpg "ProjectM background Mode")
135+
- Background mode to keep editing the playlist
74136

137+
- ![ProjectM background Mode](./doc/projectM_background_mode.jpg "ProjectM background Mode")
75138

76-
A checksum is calculated based on music name, artist name and album name, to make the database resilient to filesystem changes.
77139

78140
## Setup
79141

80-
[Docker](https://www.docker.com/)
142+
Requires only [Docker](https://www.docker.com/) to launch application.
143+
144+
[NPM](https://www.npmjs.com/) if you want to build frontend as a desktop executable.
145+
81146

82147
# Development
83148

@@ -105,28 +170,31 @@ full dockerized environment :
105170
- database and schema : `music`.`public`
106171
- external database manager recommended [DBeaver](https://dbeaver.io/), for as long as I don't provide pgadmin container.
107172

108-
### Notes
173+
## FAQ
109174

110-
config update :
175+
### Configuration update (.env)
111176

112-
If you want to update .env file configuration to add your email or link an other folder, don't forget to run the following command to apply changes:
177+
You need to update your .env file configuration to add your email or link an other folder, don't forget to run the following command to apply changes:
113178
- `docker compose stop backend`
114179
- `docker compose up backend --build`
115180

116-
`backend` container may fail to start with error `exec /app/run_dev.sh: no such file or directory`.
181+
### "[backend] exec /app/run_dev.sh: no such file or directory"
182+
This error may occur on backend start
117183
- run `dos2unix ./run_dev.sh` then `docker compose restart backend`
118184

119-
`backend` may fails to connect to database as it doesn't wait enough for the first db init :
185+
### Backend cannot connect to database
186+
`backend` may fails to connect to database because it doesn't wait enough for the first db init :
120187

121188
- Wait for the db container log line `LOG: database system is ready to accept connections`. It may take a while and you may see database stopping and restarting in the process.
122189
- Then run `docker compose restart backend`.
123190

124-
`frontend` may fails to bind adress with the error `listen EADDRINUSE: address already in use`.
191+
### "[frontend] listen EADDRINUSE: address already in use"
192+
Don't know why. may happen sometimes, we are not alone.
125193
- run `docker compose up frontend --force-recreate`
126194

127-
## dev Notes
195+
## Dev notes
128196

129-
front end dev, set this variable to disable API calls if you do not plan to work with the server launched
197+
Run frontend without server, use mocked data / API
130198

131199
```
132200
vite: {

Diff for: doc/artist_playlist.jpg

17.1 KB
Loading

Diff for: doc/country_location_playlist.jpg

39.9 KB
Loading

Diff for: doc/error_positioning.jpg

11.2 KB
Loading

Diff for: doc/file_system_playlist.jpg

12.9 KB
Loading

Diff for: doc/geoviewer.jpg

-56.4 KB
Binary file not shown.

Diff for: doc/header.jpg

99.3 KB
Loading

Diff for: doc/playlist_geospatial.jpg

-13.6 KB
Binary file not shown.

Diff for: doc/projectM_background.jpg

-143 KB
Binary file not shown.

Diff for: doc/projectM_background_mode.jpg

156 KB
Loading

Diff for: doc/projectM_focus.jpg

-45.1 KB
Binary file not shown.

Diff for: doc/projectM_focus_mode.jpg

221 KB
Loading

Diff for: package.json

-1
This file was deleted.

0 commit comments

Comments
 (0)