Refactor: rename front/ to app/

This commit is contained in:
jon r 2025-04-24 16:14:12 +02:00
parent d5740bc023
commit 93fd5f1937
770 changed files with 907 additions and 906 deletions

View File

@ -47,7 +47,7 @@ htmlcov
*.swo *.swo
# npm # npm
front/node_modules/ app/node_modules/
# Compass # Compass
.sass-cache .sass-cache

View File

@ -50,8 +50,8 @@ NGINX_MAX_BODY_SIZE=10G
FUNKWHALE_API_HOST=api FUNKWHALE_API_HOST=api
FUNKWHALE_API_PORT=5000 FUNKWHALE_API_PORT=5000
FUNKWHALE_FRONT_HOST=app FUNKWHALE_APP_HOST=app
FUNKWHALE_FRONT_PORT=${VUE_PORT} FUNKWHALE_APP_PORT=${VUE_PORT}
# postgres # postgres

36
.gitignore vendored
View File

@ -50,7 +50,7 @@ report.xml
*.swo *.swo
# npm # npm
front/node_modules/ app/node_modules/
# Compass # Compass
.sass-cache .sass-cache
@ -80,30 +80,30 @@ api/celerybeat-*
# Front # Front
oldfront/node_modules/ oldfront/node_modules/
front/static/translations app/static/translations
front/node_modules/ app/node_modules/
front/dist/ app/dist/
front/dev-dist/ app/dev-dist/
front/npm-debug.log* app/npm-debug.log*
front/yarn-debug.log* app/yarn-debug.log*
front/yarn-error.log* app/yarn-error.log*
front/tests/unit/coverage app/tests/unit/coverage
front/tests/e2e/reports app/tests/e2e/reports
front/test_results.xml app/test_results.xml
front/coverage/ app/coverage/
front/selenium-debug.log app/selenium-debug.log
# Vitepress # Vitepress
front/ui-docs/.vitepress/.vite app/ui-docs/.vitepress/.vite
front/ui-docs/.vitepress/cache app/ui-docs/.vitepress/cache
front/ui-docs/.vitepress/dist app/ui-docs/.vitepress/dist
front/ui-docs/public app/ui-docs/public
# Docs # Docs
docs/_build docs/_build
#Tauri #Tauri
front/tauri/gen app/tauri/gen
/data/ /data/
.state .state

View File

@ -22,21 +22,21 @@ variables:
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 'true' FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 'true'
.shared_caches: .shared_caches:
# Cache for front related jobs # Cache for app related jobs
yarn_cache: &yarn_cache yarn_cache: &yarn_cache
key: front-yarn-$CI_COMMIT_REF_SLUG key: app-yarn-$CI_COMMIT_REF_SLUG
paths: [$YARN_CACHE_FOLDER] paths: [$YARN_CACHE_FOLDER]
node_cache: &node_cache node_cache: &node_cache
key: key:
prefix: front-node_modules-$CI_COMMIT_REF_SLUG prefix: app-node_modules-$CI_COMMIT_REF_SLUG
files: [front/yarn.lock] files: [app/yarn.lock]
paths: [front/node_modules] paths: [app/node_modules]
lint_cache: &lint_cache lint_cache: &lint_cache
key: key:
prefix: front-lint-$CI_COMMIT_REF_SLUG prefix: app-lint-$CI_COMMIT_REF_SLUG
files: files:
- front/.eslintcache - app/.eslintcache
- front/tsconfig.tsbuildinfo - app/tsconfig.tsbuildinfo
cypress_cache: &cypress_cache cypress_cache: &cypress_cache
key: cypress-cache-$CI_COMMIT_REF_SLUG key: cypress-cache-$CI_COMMIT_REF_SLUG
paths: paths:
@ -85,7 +85,7 @@ stages:
- build - build
- publish - publish
review_front: review_app:
allow_failure: true allow_failure: true
stage: review stage: review
needs: [] needs: []
@ -95,29 +95,29 @@ review_front:
image: $CI_REGISTRY/funkwhale/ci/node-python:18 image: $CI_REGISTRY/funkwhale/ci/node-python:18
variables: variables:
BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/ BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/
VUE_APP_ROUTER_BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/ VUE_APP_ROUTER_BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/
VUE_APP_INSTANCE_URL: https://demo.funkwhale.audio VUE_APP_INSTANCE_URL: https://demo.funkwhale.audio
NODE_ENV: review NODE_ENV: review
NODE_OPTIONS: --max-old-space-size=4096 NODE_OPTIONS: --max-old-space-size=4096
environment: environment:
name: review/front/$CI_COMMIT_REF_NAME name: review/app/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/index.html url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/index.html
cache: cache:
- *yarn_cache - *yarn_cache
- *node_cache - *node_cache
- *lint_cache - *lint_cache
before_script: before_script:
- mkdir front-review - mkdir app-review
- cd front - cd app
- yarn install --frozen-lockfile - yarn install --frozen-lockfile
script: script:
- yarn run build --base ./ - yarn run build --base ./
- cp -r dist/* ../front-review - cp -r dist/* ../app-review
artifacts: artifacts:
expire_in: 2 weeks expire_in: 2 weeks
paths: paths:
- front-review - app-review
review_docs: review_docs:
allow_failure: true allow_failure: true
@ -193,12 +193,12 @@ lint_api:
script: script:
- make lint - make lint
lint_front: lint_app:
stage: lint stage: lint
needs: [] needs: []
rules: rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*] - changes: [app/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18 image: $CI_REGISTRY/funkwhale/ci/node-python:18
cache: cache:
@ -206,7 +206,7 @@ lint_front:
- *node_cache - *node_cache
- *lint_cache - *lint_cache
before_script: before_script:
- cd front - cd app
- yarn install --frozen-lockfile - yarn install --frozen-lockfile
script: script:
- yarn lint - yarn lint
@ -280,13 +280,13 @@ test_api:
path: api/coverage.xml path: api/coverage.xml
coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/' coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/'
test_front: test_app:
stage: test stage: test
needs: needs:
- job: lint_front - job: lint_app
rules: rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*] - changes: [app/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18 image: $CI_REGISTRY/funkwhale/ci/node-python:18
cache: cache:
@ -294,16 +294,16 @@ test_front:
- *node_cache - *node_cache
- *lint_cache - *lint_cache
before_script: before_script:
- cd front - cd app
- yarn install --frozen-lockfile - yarn install --frozen-lockfile
script: script:
- yarn test:unit - yarn test:unit
artifacts: artifacts:
reports: reports:
junit: front/test_results.xml junit: app/test_results.xml
coverage_report: coverage_report:
coverage_format: cobertura coverage_format: cobertura
path: front/coverage/cobertura-coverage.xml path: app/coverage/cobertura-coverage.xml
coverage: '/All files\s+(?:\|\s+((?:\d+\.)?\d+)\s+){4}.*/' coverage: '/All files\s+(?:\|\s+((?:\d+\.)?\d+)\s+){4}.*/'
build_metadata: build_metadata:
@ -321,7 +321,7 @@ build_metadata:
paths: paths:
- docker-bake.json - docker-bake.json
- docker-bake.api.json - docker-bake.api.json
- docker-bake.front.json - docker-bake.app.json
test_integration: test_integration:
stage: test stage: test
@ -339,7 +339,7 @@ test_integration:
- *cypress_cache - *cypress_cache
before_script: before_script:
- cd front - cd app
- yarn install - yarn install
script: script:
- yarn run cypress run - yarn run cypress run
@ -404,16 +404,16 @@ build_docs:
paths: paths:
- public - public
build_front: build_app:
stage: build stage: build
needs: needs:
# The test_front job is currently disabled # The test_app job is currently disabled
# - job: test_front # - job: test_app
- job: lint_front - job: lint_app
optional: true optional: true
rules: rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*] - changes: [app/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18 image: $CI_REGISTRY/funkwhale/ci/node-python:18
variables: variables:
@ -424,14 +424,14 @@ build_front:
- *node_cache - *node_cache
- *lint_cache - *lint_cache
before_script: before_script:
- cd front - cd app
- yarn install --frozen-lockfile - yarn install --frozen-lockfile
script: script:
- yarn run build:deployment - yarn run build:deployment
artifacts: artifacts:
name: front_${CI_COMMIT_REF_NAME} name: app_${CI_COMMIT_REF_NAME}
paths: paths:
- front/dist - app/dist
build_api: build_api:
stage: build stage: build
@ -460,7 +460,7 @@ build_api:
# stage: build # stage: build
# rules: # rules:
# - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ # - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
# - changes: [front/**/*] # - changes: [app/**/*]
# image: $CI_REGISTRY/funkwhale/ci/node-tauri:18 # image: $CI_REGISTRY/funkwhale/ci/node-tauri:18
# variables: # variables:
@ -473,7 +473,7 @@ build_api:
# artifacts: # artifacts:
# name: desktop_${CI_COMMIT_REF_NAME} # name: desktop_${CI_COMMIT_REF_NAME}
# paths: # paths:
# - front/tauri/target/release/bundle/appimage/*.AppImage # - app/tauri/target/release/bundle/appimage/*.AppImage
deploy_docs: deploy_docs:
interruptible: false interruptible: false
@ -500,7 +500,7 @@ docker:
artifacts: true artifacts: true
- job: test_api - job: test_api
optional: true optional: true
- job: test_front - job: test_app
optional: true optional: true
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
@ -562,7 +562,7 @@ package:
artifacts: true artifacts: true
- job: build_api - job: build_api
artifacts: true artifacts: true
- job: build_front - job: build_app
artifacts: true artifacts: true
# - job: build_tauri # - job: build_tauri
# artifacts: true # artifacts: true

View File

@ -16,7 +16,7 @@
"ignoreDeps": ["$CI_REGISTRY/funkwhale/backend-test-docker"], "ignoreDeps": ["$CI_REGISTRY/funkwhale/backend-test-docker"],
"packageRules": [ "packageRules": [
{ {
"matchFileNames": ["api/*", "front/*", "docs/*"], "matchFileNames": ["api/*", "app/*", "docs/*"],
"additionalBranchPrefix": "{{parentDir}}-", "additionalBranchPrefix": "{{parentDir}}-",
"semanticCommitScope": "{{parentDir}}" "semanticCommitScope": "{{parentDir}}"
}, },

View File

@ -40,10 +40,10 @@ tasks:
gp ports await 5000 gp ports await 5000
poetry run celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=0 poetry run celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=0
- name: Frontend - name: App
env: env:
VUE_EDITOR: code VUE_EDITOR: code
before: cd front before: cd app
init: | init: |
yarn install yarn install
command: yarn dev --host 0.0.0.0 --base ./ command: yarn dev --host 0.0.0.0 --base ./
@ -98,7 +98,7 @@ ports:
visibility: private visibility: private
onOpen: ignore onOpen: ignore
- name: Frontend - name: App
port: 8080 port: 8080
visibility: private visibility: private
onOpen: ignore onOpen: ignore

View File

@ -30,8 +30,8 @@ services:
- 'FUNKWHALE_API_IP=host.docker.internal' - 'FUNKWHALE_API_IP=host.docker.internal'
- 'FUNKWHALE_API_HOST=host.docker.internal' - 'FUNKWHALE_API_HOST=host.docker.internal'
- 'FUNKWHALE_API_PORT=5000' - 'FUNKWHALE_API_PORT=5000'
- 'FUNKWHALE_FRONT_IP=host.docker.internal' - 'FUNKWHALE_APP_HOST=host.docker.internal'
- 'FUNKWHALE_FRONT_PORT=8080' - 'FUNKWHALE_APP_PORT=8080'
- 'FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-host.docker.internal}' - 'FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-host.docker.internal}'
- 'FUNKWHALE_PROTOCOL=https' - 'FUNKWHALE_PROTOCOL=https'
volumes: volumes:
@ -40,4 +40,4 @@ services:
- ../data/staticfiles:/usr/share/nginx/html/staticfiles/:ro - ../data/staticfiles:/usr/share/nginx/html/staticfiles/:ro
- ../deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro - ../deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
- ../docker/nginx/conf.dev:/etc/nginx/templates/default.conf.template:ro - ../docker/nginx/conf.dev:/etc/nginx/templates/default.conf.template:ro
- ../front:/frontend:ro - ../app:/funkwhale-app:ro

View File

@ -10,7 +10,7 @@ repos:
(?x)( (?x)(
^api/funkwhale_api/common/schema.yml| ^api/funkwhale_api/common/schema.yml|
^api/tests/music/test_coverart.ogg| ^api/tests/music/test_coverart.ogg|
^front/src/generated/types.ts ^app/src/generated/types.ts
) )
- id: check-case-conflict - id: check-case-conflict

View File

@ -1,2 +1,2 @@
--cwd front --cwd app
--add.exact true --add.exact true

View File

@ -4,7 +4,7 @@ CPU_CORES := $(shell N=$$(nproc); echo $$(( $$N > 4 ? 4 : $$N )))
BAKE_FILES = \ BAKE_FILES = \
docker-bake.json \ docker-bake.json \
docker-bake.api.json \ docker-bake.api.json \
docker-bake.front.json docker-bake.app.json
docker-bake.%.json: docker-bake.%.json:
./scripts/build_metadata.py --format bake --bake-target $* --bake-image docker.io/funkwhale/$* > $@ ./scripts/build_metadata.py --format bake --bake-target $* --bake-image docker.io/funkwhale/$* > $@
@ -39,19 +39,19 @@ package:
zip -q 'funkwhale-api.zip' -r api && \ zip -q 'funkwhale-api.zip' -r api && \
rm -Rf api rm -Rf api
tar --create --gunzip --file='$(BUILD_DIR)/funkwhale-front.tar.gz' \ tar --create --gunzip --file='$(BUILD_DIR)/funkwhale-app.tar.gz' \
--owner='root' \ --owner='root' \
--group='root' \ --group='root' \
--exclude-vcs \ --exclude-vcs \
--transform='s/^front\/dist/front/' \ --transform='s/^app\/dist/app/' \
front/dist app/dist
cd '$(BUILD_DIR)' && \ cd '$(BUILD_DIR)' && \
tar --extract --gunzip --file='funkwhale-front.tar.gz' && \ tar --extract --gunzip --file='funkwhale-app.tar.gz' && \
zip -q 'funkwhale-front.zip' -r front && \ zip -q 'funkwhale-app.zip' -r app && \
rm -Rf front rm -Rf app
# cd '$(BUILD_DIR)' && \ # cd '$(BUILD_DIR)' && \
# cp ../front/tauri/target/release/bundle/appimage/funkwhale_*.AppImage FunkwhaleDesktop.AppImage # cp ../app/tauri/target/release/bundle/appimage/funkwhale_*.AppImage FunkwhaleDesktop.AppImage
cd '$(BUILD_DIR)' && sha256sum * > SHA256SUMS cd '$(BUILD_DIR)' && sha256sum * > SHA256SUMS

View File

@ -1,6 +1,6 @@
# Funkwhale # Funkwhale
[![The Funkwhale logo](./front/src/assets/logo/logo-full-500.png)](https://funkwhale.audio) [![The Funkwhale logo](./app/src/assets/logo/logo-full-500.png)](https://funkwhale.audio)
Funkwhale is a platform for uploading, sharing, and publishing audio content across the federated web. Curate your music library, listen to podcasts, or create your own content and share it with the world. Funkwhale is a platform for uploading, sharing, and publishing audio content across the federated web. Curate your music library, listen to podcasts, or create your own content and share it with the world.

View File

@ -189,7 +189,7 @@ If a URL is specified, the index.html file will be fetched through HTTP.
If a path is provided, If a path is provided,
it will be accessed from disk. it will be accessed from disk.
Use something like ``/srv/funkwhale/front/dist/`` if the web processes shows Use something like ``/srv/funkwhale/app/dist/`` if the web processes shows
request errors related to this. request errors related to this.
""" """

View File

@ -273,7 +273,7 @@ def get_target_state(target):
state = target_state_serializer(target).data state = target_state_serializer(target).data
# freeze target type/id in JSON so even if the corresponding object is deleted # freeze target type/id in JSON so even if the corresponding object is deleted
# we can have the info and display it in the frontend # we can have the info and display it in the app
target_data = TARGET_FIELD.to_representation(target) target_data = TARGET_FIELD.to_representation(target)
state["_target"] = json.loads(json.dumps(target_data, cls=DjangoJSONEncoder)) state["_target"] = json.loads(json.dumps(target_data, cls=DjangoJSONEncoder))

View File

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
/dist /dist
.vite
# local env files # local env files
.env.local .env.local

View File

@ -1,3 +1,3 @@
# Funkwhale Frontend # Funkwhale App
Please follow the instructions in [Set up your development environment — funkwhale 1.4.0 documentation](https://docs.funkwhale.audio/developer/setup/index.html). Please follow the instructions in [Set up your development environment — funkwhale 1.4.0 documentation](https://docs.funkwhale.audio/developer/setup/index.html).

View File

@ -88,7 +88,7 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
location ~ "/(front/)?embed.html" { location ~ "/(app/)?embed.html" {
alias /usr/share/nginx/html/embed.html; alias /usr/share/nginx/html/embed.html;
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:"; add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin"; add_header Referrer-Policy "strict-origin-when-cross-origin";

View File

@ -1,9 +1,9 @@
{ {
"name": "front", "name": "funkwhale-app",
"version": "0.1.0", "version": "2.0.0-rc0",
"type": "module", "type": "module",
"private": true, "private": true,
"description": "Funkwhale front-end", "description": "Funkwhale app",
"author": "Funkwhale Collective <contact@funkwhale.audio>", "author": "Funkwhale Collective <contact@funkwhale.audio>",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 1005 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Some files were not shown because too many files have changed in this diff Show More