-
-
-
-
-
-
@@ -72,7 +66,18 @@
{{ $t("gears.displayUserNumberOfGears1") }}{{ userGearsNumber }}{{ $t("gears.displayUserNumberOfGears2") }}{{ userGears.length }}{{ $t("gears.displayUserNumberOfGears3") }}
-
+
+
+
+
+
+
+
+
-

@@ -98,6 +103,9 @@
+
+
+
@@ -111,20 +119,20 @@
diff --git a/frontend/src/views/NotFoundView.vue b/frontend/app/src/views/NotFoundView.vue
similarity index 100%
rename from frontend/src/views/NotFoundView.vue
rename to frontend/app/src/views/NotFoundView.vue
diff --git a/frontend/src/views/SettingsView.vue b/frontend/app/src/views/SettingsView.vue
similarity index 97%
rename from frontend/src/views/SettingsView.vue
rename to frontend/app/src/views/SettingsView.vue
index c60cde974..199fe03c4 100644
--- a/frontend/src/views/SettingsView.vue
+++ b/frontend/app/src/views/SettingsView.vue
@@ -41,7 +41,7 @@ import SettingsUsersZone from '../components/Settings/SettingsUsersZone.vue';
import SettingsUserProfileZone from '../components/Settings/SettingsUserProfileZone.vue';
import SettingsSecurityZone from '../components/Settings/SettingsSecurityZone.vue';
import SettingsIntegrationsZone from '../components/Settings/SettingsIntegrationsZone.vue';
-import BackButtonComponent from '@/components/BackButtonComponent.vue';
+import BackButtonComponent from '@/components/GeneralComponents/BackButtonComponent.vue';
export default {
components: {
diff --git a/frontend/src/views/UserView.vue b/frontend/app/src/views/UserView.vue
similarity index 98%
rename from frontend/src/views/UserView.vue
rename to frontend/app/src/views/UserView.vue
index 2c9193d18..1dec19333 100644
--- a/frontend/src/views/UserView.vue
+++ b/frontend/app/src/views/UserView.vue
@@ -274,22 +274,22 @@
import { ref, onMounted, computed, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import { useUserStore } from '@/stores/user';
-import { activities } from '@/services/activities';
-import { followers } from '@/services/followers';
+import { useUserStore } from '@/stores/userStore';
+import { activities } from '@/services/activitiesService';
+import { followers } from '@/services/followersService';
// Importing the stores
import { useSuccessAlertStore } from '@/stores/Alerts/successAlert';
import { useErrorAlertStore } from '@/stores/Alerts/errorAlert';
// Importing the components
import UserDistanceStatsComponent from '@/components/Activities/UserDistanceStatsComponent.vue';
-import LoadingComponent from '@/components/LoadingComponent.vue';
-import NoItemsFoundComponent from '@/components/NoItemsFoundComponents.vue';
+import LoadingComponent from '@/components/GeneralComponents/LoadingComponent.vue';
+import NoItemsFoundComponent from '@/components/GeneralComponents/NoItemsFoundComponents.vue';
import ActivitySummaryComponent from '@/components/Activities/ActivitySummaryComponent.vue';
import ActivityMapComponent from '@/components/Activities/ActivityMapComponent.vue';
import ErrorToastComponent from '@/components/Toasts/ErrorToastComponent.vue';
import SuccessToastComponent from '@/components/Toasts/SuccessToastComponent.vue';
import FollowersListComponent from '@/components/Followers/FollowersListComponent.vue';
-import BackButtonComponent from '@/components/BackButtonComponent.vue';
+import BackButtonComponent from '@/components/GeneralComponents/BackButtonComponent.vue';
import UserAvatarComponent from '@/components/Users/UserAvatarComponent.vue';
export default {
diff --git a/frontend/vite.config.js b/frontend/app/vite.config.js
similarity index 100%
rename from frontend/vite.config.js
rename to frontend/app/vite.config.js
diff --git a/frontend/vitest.config.js b/frontend/app/vitest.config.js
similarity index 100%
rename from frontend/vitest.config.js
rename to frontend/app/vitest.config.js
diff --git a/custom_php.ini b/frontend/custom_php.ini
similarity index 100%
rename from custom_php.ini
rename to frontend/custom_php.ini
diff --git a/frontend_env.sh b/frontend/frontend_env.sh
similarity index 100%
rename from frontend_env.sh
rename to frontend/frontend_env.sh
diff --git a/nginx-custom.conf b/frontend/nginx-custom.conf
similarity index 100%
rename from nginx-custom.conf
rename to frontend/nginx-custom.conf
diff --git a/frontend/src/services/gears.js b/frontend/src/services/gears.js
deleted file mode 100644
index 4aaf9f7f8..000000000
--- a/frontend/src/services/gears.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { fetchGetRequest, fetchPostRequest, fetchPutRequest, fetchDeleteRequest } from '@/utils/serviceUtils';
-
-export const gears = {
- getGearById(gearId) {
- return fetchGetRequest(`gear/id/${gearId}`);
- },
- getGearFromType(gearType) {
- return fetchGetRequest(`gear/type/${gearType}`);
- },
- getGearByNickname(nickname) {
- return fetchGetRequest(`gear/nickname/${nickname}`);
- },
- getUserGearsWithPagination(pageNumber, numRecords) {
- return fetchGetRequest(`gear/page_number/${pageNumber}/num_records/${numRecords}`);
- },
- getUserGearsNumber() {
- return fetchGetRequest('gear/number');
- },
- createGear(data) {
- return fetchPostRequest('gear/create', data)
- },
- editGear(gearId, data) {
- return fetchPutRequest(`gear/${gearId}/edit`, data);
- },
- deleteGear(gearId) {
- return fetchDeleteRequest(`gear/${gearId}/delete`);
- }
-};
\ No newline at end of file
diff --git a/frontend/src/services/session.js b/frontend/src/services/session.js
deleted file mode 100644
index 5116882d1..000000000
--- a/frontend/src/services/session.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { fetchGetRequest, fetchPostFormUrlEncoded } from '@/utils/serviceUtils';
-
-export const session = {
- getToken(formData) {
- return fetchPostFormUrlEncoded('token', formData);
- },
-};
\ No newline at end of file
diff --git a/frontend/src/stores/user.js b/frontend/src/stores/user.js
deleted file mode 100644
index 5e4d008ba..000000000
--- a/frontend/src/stores/user.js
+++ /dev/null
@@ -1,228 +0,0 @@
-import { defineStore } from 'pinia';
-import { activities } from '@/services/activities';
-import { followers } from '@/services/followers';
-import { users } from '@/services/user';
-
-// Function to get the default state
-const getDefaultState = () => ({
- userMe: null,
- thisWeekDistances: null,
- thisMonthDistances: null,
- thisMonthNumberOfActivities: 0,
- userNumberOfActivities: 0,
- userActivities: [],
- followedUserActivities: [],
- userFollowersCountAll: 0,
- userFollowersAll: [],
- userFollowersCountAccepted: 0,
- //userFollowersAccepted: [],
- userFollowingCountAll: 0,
- userFollowingAll: [],
- userFollowingCountAccepted: 0,
- //userFollowingAccepted: [],
-});
-
-export const useUserStore = defineStore('user', {
- state: getDefaultState,
- actions: {
- async fetchUserMe(user_id) {
- try {
- this.userMe = await users.getUserById(user_id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the user's statistics for this week and this month.
- * @async
- * @function fetchUserStats
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @returns {Promise
} A promise that resolves when the data is fetched successfully.
- */
- async fetchUserStats() {
- try {
- this.thisWeekDistances = await activities.getUserThisWeekStats(this.userMe.id);
- this.thisMonthDistances = await activities.getUserThisMonthStats(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the number of activities for the current user in the current month.
- * @async
- * @function fetchUserThisMonthActivitiesNumber
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @returns {Promise} A promise that resolves when the data is fetched successfully.
- */
- async fetchUserThisMonthActivitiesNumber(){
- try {
- this.thisMonthNumberOfActivities = await activities.getUserThisMonthActivitiesNumber(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the number of activities for the user.
- * @async
- * @function fetchUserActivitiesNumber
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @returns {Promise} A promise that resolves when the data is fetched successfully.
- */
- async fetchUserActivitiesNumber(){
- try {
- this.userNumberOfActivities = await activities.getUserNumberOfActivities(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches user activities with pagination.
- * @async
- * @function fetchUserActivitiesWithPagination
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @param {number} pageNumber - The page number to fetch.
- * @param {number} numRecords - The number of records to fetch per page.
- * @returns {Promise} - A promise that resolves when the user activities are fetched successfully.
- */
- async fetchUserActivitiesWithPagination(pageNumber, numRecords){
- try {
- const newActivities = await activities.getUserActivitiesWithPagination(this.userMe.id, pageNumber, numRecords);
-
- Array.prototype.push.apply(this.userActivities, newActivities);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the user's followed activities with pagination.
- * @async
- * @function fetchUserFollowedActivitiesWithPagination
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @param {number} pageNumber - The page number to fetch.
- * @param {number} numRecords - The number of records to fetch per page.
- * @returns {Promise} - A promise that resolves when the data is fetched successfully.
- */
- async fetchUserFollowedActivitiesWithPagination(pageNumber, numRecords){
- try {
- this.followedUserActivities = await activities.getUserFollowersActivitiesWithPagination(this.userMe.id, pageNumber, numRecords);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches new user activity by activity ID and adds it to the beginning of the user activities array.
- * @async
- * @function fetchNewUserActivity
- * @memberof module:stores/user
- * @throws {Error} If there is an error fetching the data.
- * @param {string} activityId - The ID of the activity to fetch.
- * @returns {Promise} - A promise that resolves when the new activity is fetched and added successfully.
- */
- async fetchNewUserActivity(activityId){
- try {
- const newActivity = await activities.getActivityById(activityId);
- this.userActivities.unshift(newActivity);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches all followers of the user.
- * @async
- * @function fetchUserFollowersAll
- * @memberof module:stores/user
- * @instance
- * @throws {Error} If there is an error while fetching the data.
- */
- async fetchUserFollowersAll(){
- try {
- this.userFollowersAll = await followers.getUserFollowersAll(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the count of followers for the current user.
- * @async
- * @function fetchUserFollowersCountAll
- * @memberof module:stores/user
- * @throws {Error} If there is an error while fetching the data.
- * @returns {Promise} - A promise that resolves when the new activity is fetched and added successfully.
- */
- async fetchUserFollowersCountAll(){
- try {
- this.userFollowersCountAll = await followers.getUserFollowersCountAll(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the count of accepted followers for the current user.
- * @async
- * @function fetchUserFollowersCountAccepted
- * @memberof module:stores/user
- * @throws {Error} If there is an error while fetching the data.
- * @returns {Promise} - A promise that resolves when the new activity is fetched and added successfully.
- */
- async fetchUserFollowersCountAccepted(){
- try {
- this.userFollowersCountAccepted = await followers.getUserFollowersCountAccepted(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches all the users that the current user is following.
- * @async
- * @function fetchUserFollowingAll
- * @memberof module:stores/user
- * @throws {Error} If there is an error while fetching the data.
- */
- async fetchUserFollowingAll(){
- try {
- this.userFollowingAll = await followers.getUserFollowingAll(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the count of users being followed by the current user.
- * @async
- * @function fetchUserFollowingCountAll
- * @memberof module:stores/user
- * @throws {Error} If there is an error while fetching the data.
- * @returns {Promise} - A promise that resolves when the new activity is fetched and added successfully.
- */
- async fetchUserFollowingCountAll(){
- try {
- this.userFollowingCountAll = await followers.getUserFollowingCountAll(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- /**
- * Fetches the count of accepted user followings.
- * @async
- * @function fetchUserFollowingCountAccepted
- * @memberof module:stores/user
- * @throws {Error} If there is an error while fetching the data.
- * @returns {Promise} - A promise that resolves when the new activity is fetched and added successfully.
- */
- async fetchUserFollowingCountAccepted(){
- try {
- this.userFollowingCountAccepted = await followers.getUserFollowingCountAccepted(this.userMe.id);
- } catch (error) {
- console.error("Failed to fetch data:", error);
- }
- },
- // Action to reset the store state
- resetStore() {
- Object.assign(this.$state, getDefaultState());
- }
- }
-});
\ No newline at end of file
diff --git a/frontend/src/views/LoginView.vue b/frontend/src/views/LoginView.vue
deleted file mode 100644
index f6d06c8ef..000000000
--- a/frontend/src/views/LoginView.vue
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 0cab1fc1e..000000000
--- a/requirements.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-fastapi==0.111.0
-pydantic==1.10.15
-uvicorn==0.29.0
-python-dotenv==1.0.1
-sqlalchemy==2.0.30
-mysqlclient==2.2.4
-apscheduler==3.10.4
-requests==2.32.2
-stravalib==1.7
-opentelemetry-sdk==1.22.0
-opentelemetry-instrumentation-fastapi==0.43b0
-opentelemetry.exporter.otlp==1.22.0
-python-multipart==0.0.9
-gpxpy==1.6.2
-alembic==1.13.1
-joserfc==0.11.1
-bcrypt==4.1.3
\ No newline at end of file