Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Update tsconfig import path

Blue Mouse91300af3bf01
diff --git a/web/app/App.tsx b/web/app/App.tsx
index 3ff0fff57..bf2b9de14 100644
--- a/web/app/App.tsx
+++ b/web/app/App.tsx
@@ -8,19 +8,19 @@ import _startsWith from 'lodash/startsWith'
import _endsWith from 'lodash/endsWith'
import 'dayjs/locale/uk'
-import Header from 'components/Header'
-import Footer from 'components/Footer'
+import Header from '~/components/Header'
+import Footer from '~/components/Footer'
import { Toaster } from 'sonner'
-import { getAccessToken } from 'utils/accessToken'
-import { authActions } from 'lib/reducers/auth'
-import { StateType, useAppDispatch } from 'lib/store'
-import { isBrowser, isSelfhosted } from 'lib/constants'
-import routesPath from 'utils/routes'
-import { getPageMeta } from 'utils/server'
+import { getAccessToken } from '~/utils/accessToken'
+import { authActions } from '~/lib/reducers/auth'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { isBrowser, isSelfhosted } from '~/lib/constants'
+import routesPath from '~/utils/routes'
+import { getPageMeta } from '~/utils/server'
import { authMe, getGeneralStats, getInstalledExtensions, getLastPost, getPaymentMetainfo } from './api'
-import UIActions from 'lib/reducers/ui'
-import { logout, shouldShowLowEventsBanner } from 'utils/auth'
+import UIActions from '~/lib/reducers/ui'
+import { logout, shouldShowLowEventsBanner } from '~/utils/auth'
interface AppProps {
ssrTheme: 'dark' | 'light'
diff --git a/web/app/api/ai.ts b/web/app/api/ai.ts
index f4a3b9ac3..150f9b427 100644
--- a/web/app/api/ai.ts
+++ b/web/app/api/ai.ts
@@ -1,7 +1,7 @@
/* eslint-disable implicit-arrow-linebreak */
import axios from 'axios'
import _isEmpty from 'lodash/isEmpty'
-import { AIAPI_URL } from 'lib/constants'
+import { AIAPI_URL } from '~/lib/constants'
const api = axios.create({
baseURL: AIAPI_URL,
diff --git a/web/app/api/index.ts b/web/app/api/index.ts
index 48e9ca8e3..6c5d45404 100644
--- a/web/app/api/index.ts
+++ b/web/app/api/index.ts
@@ -1,25 +1,25 @@
/* eslint-disable implicit-arrow-linebreak */
import axios, { AxiosResponse } from 'axios'
import createAuthRefreshInterceptor from 'axios-auth-refresh'
-import { store } from 'lib/store'
+import { store } from '~/lib/store'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
import _isArray from 'lodash/isArray'
-import { authActions } from 'lib/reducers/auth'
-import { getAccessToken, removeAccessToken, setAccessToken } from 'utils/accessToken'
-import { getRefreshToken, removeRefreshToken } from 'utils/refreshToken'
-import { DEFAULT_ALERTS_TAKE, API_URL, DEFAULT_MONITORS_TAKE } from 'lib/constants'
-import { User } from 'lib/models/User'
-import { Auth } from 'lib/models/Auth'
-import { Project, Overall, LiveStats } from 'lib/models/Project'
-import { Alerts } from 'lib/models/Alerts'
-import { Subscriber } from 'lib/models/Subscriber'
-import { Filter, ProjectViewCustomEvent } from 'pages/Project/View/interfaces/traffic'
-import { AIResponse } from 'pages/Project/View/interfaces/ai'
-import { Monitor, MonitorOverall } from 'lib/models/Uptime'
-import { Role } from 'lib/models/Organisation'
-import { logout } from 'utils/auth'
+import { authActions } from '~/lib/reducers/auth'
+import { getAccessToken, removeAccessToken, setAccessToken } from '~/utils/accessToken'
+import { getRefreshToken, removeRefreshToken } from '~/utils/refreshToken'
+import { DEFAULT_ALERTS_TAKE, API_URL, DEFAULT_MONITORS_TAKE } from '~/lib/constants'
+import { User } from '~/lib/models/User'
+import { Auth } from '~/lib/models/Auth'
+import { Project, Overall, LiveStats } from '~/lib/models/Project'
+import { Alerts } from '~/lib/models/Alerts'
+import { Subscriber } from '~/lib/models/Subscriber'
+import { Filter, ProjectViewCustomEvent } from '~/pages/Project/View/interfaces/traffic'
+import { AIResponse } from '~/pages/Project/View/interfaces/ai'
+import { Monitor, MonitorOverall } from '~/lib/models/Uptime'
+import { Role } from '~/lib/models/Organisation'
+import { logout } from '~/utils/auth'
const api = axios.create({
baseURL: API_URL,
diff --git a/web/app/components/DashboardLockedBanner.tsx b/web/app/components/DashboardLockedBanner.tsx
index 3133b112a..58913891f 100644
--- a/web/app/components/DashboardLockedBanner.tsx
+++ b/web/app/components/DashboardLockedBanner.tsx
@@ -1,10 +1,10 @@
import React, { memo, useState, useMemo } from 'react'
import { LockClosedIcon } from '@heroicons/react/24/outline'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
import { useTranslation } from 'react-i18next'
-import { DashboardBlockReason } from 'lib/models/User'
-import Modal from 'ui/Modal'
+import { DashboardBlockReason } from '~/lib/models/User'
+import Modal from '~/ui/Modal'
const DashboardLockedBanner = () => {
const { t } = useTranslation('common')
diff --git a/web/app/components/EventsRunningOutBanner.tsx b/web/app/components/EventsRunningOutBanner.tsx
index b7f7024ea..175780f3f 100644
--- a/web/app/components/EventsRunningOutBanner.tsx
+++ b/web/app/components/EventsRunningOutBanner.tsx
@@ -1,12 +1,12 @@
import React, { memo, useState } from 'react'
import { ExclamationTriangleIcon, XMarkIcon } from '@heroicons/react/24/outline'
import { useSelector } from 'react-redux'
-import { useAppDispatch, StateType } from 'lib/store'
+import { useAppDispatch, StateType } from '~/lib/store'
import { useTranslation } from 'react-i18next'
-import Modal from 'ui/Modal'
-import UIActions from 'lib/reducers/ui'
-import { SHOW_BANNER_AT_PERC } from 'lib/constants'
+import Modal from '~/ui/Modal'
+import UIActions from '~/lib/reducers/ui'
+import { SHOW_BANNER_AT_PERC } from '~/lib/constants'
const EventsRunningOutBanner = () => {
const { t } = useTranslation('common')
diff --git a/web/app/components/Footer/index.tsx b/web/app/components/Footer/index.tsx
index 37e4ffa39..5ff6dfafe 100644
--- a/web/app/components/Footer/index.tsx
+++ b/web/app/components/Footer/index.tsx
@@ -2,7 +2,7 @@ import React, { memo } from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
-import Flag from 'ui/Flag'
+import Flag from '~/ui/Flag'
import {
isSelfhosted,
@@ -20,8 +20,8 @@ import {
SWETRIX_VS_SIMPLE_ANALYTICS,
DISCORD_URL,
CAPTCHA_URL,
-} from 'lib/constants'
-import routesPath from 'utils/routes'
+} from '~/lib/constants'
+import routesPath from '~/utils/routes'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/solid'
const CONTACT_US_URL = `https://swetrix.com${routesPath.contact}`
diff --git a/web/app/components/GithubAuth.tsx b/web/app/components/GithubAuth.tsx
index 61fde1a36..f25591467 100644
--- a/web/app/components/GithubAuth.tsx
+++ b/web/app/components/GithubAuth.tsx
@@ -3,11 +3,11 @@ import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import cx from 'clsx'
-import Button from 'ui/Button'
-import { StateType } from 'lib/store/index'
-import GithubDarkSVG from 'ui/icons/GithubDark'
-import GithubLightSVG from 'ui/icons/GithubLight'
-import { isBrowser } from 'lib/constants'
+import Button from '~/ui/Button'
+import { StateType } from '~/lib/store/index'
+import GithubDarkSVG from '~/ui/icons/GithubDark'
+import GithubLightSVG from '~/ui/icons/GithubLight'
+import { isBrowser } from '~/lib/constants'
interface GoogleAuthProps {
ssrTheme: string
diff --git a/web/app/components/GoogleAuth.tsx b/web/app/components/GoogleAuth.tsx
index 7f6a18f4b..e76c8c86e 100644
--- a/web/app/components/GoogleAuth.tsx
+++ b/web/app/components/GoogleAuth.tsx
@@ -2,8 +2,8 @@ import React from 'react'
import { useTranslation } from 'react-i18next'
import cx from 'clsx'
-import Button from 'ui/Button'
-import GoogleGSVG from 'ui/icons/GoogleG'
+import Button from '~/ui/Button'
+import GoogleGSVG from '~/ui/icons/GoogleG'
interface GoogleAuthProps {
onClick: () => void
diff --git a/web/app/components/Header/index.tsx b/web/app/components/Header/index.tsx
index 06968b960..7933fb0be 100644
--- a/web/app/components/Header/index.tsx
+++ b/web/app/components/Header/index.tsx
@@ -38,9 +38,9 @@ import _includes from 'lodash/includes'
import _startsWith from 'lodash/startsWith'
import cx, { clsx } from 'clsx'
-import routes from 'utils/routes'
-import { authActions } from 'lib/reducers/auth'
-import UIActions from 'lib/reducers/ui'
+import routes from '~/utils/routes'
+import { authActions } from '~/lib/reducers/auth'
+import UIActions from '~/lib/reducers/ui'
import {
whitelist,
languages,
@@ -50,12 +50,12 @@ import {
SUPPORTED_THEMES,
isBrowser,
CAPTCHA_URL,
-} from 'lib/constants'
-import Dropdown from 'ui/Dropdown'
-import Flag from 'ui/Flag'
-import { User } from 'lib/models/User'
-import { useAppDispatch, StateType } from 'lib/store'
-import { logout } from 'utils/auth'
+} from '~/lib/constants'
+import Dropdown from '~/ui/Dropdown'
+import Flag from '~/ui/Flag'
+import { User } from '~/lib/models/User'
+import { useAppDispatch, StateType } from '~/lib/store'
+import { logout } from '~/utils/auth'
dayjs.extend(utc)
dayjs.extend(duration)
diff --git a/web/app/components/LocaleLinks.tsx b/web/app/components/LocaleLinks.tsx
index 36ff3f199..ac53335dc 100644
--- a/web/app/components/LocaleLinks.tsx
+++ b/web/app/components/LocaleLinks.tsx
@@ -1,6 +1,6 @@
import { useMemo } from 'react'
import { useLocation, Location } from '@remix-run/react'
-import { whitelist, whitelistWithCC, MAIN_URL } from 'lib/constants'
+import { whitelist, whitelistWithCC, MAIN_URL } from '~/lib/constants'
import _map from 'lodash/map'
import _some from 'lodash/some'
diff --git a/web/app/components/SEO.tsx b/web/app/components/SEO.tsx
index 4d686aff6..54033e215 100644
--- a/web/app/components/SEO.tsx
+++ b/web/app/components/SEO.tsx
@@ -2,9 +2,9 @@ import { useTranslation } from 'react-i18next'
import { useLocation } from '@remix-run/react'
import _startsWith from 'lodash/startsWith'
import _toUpper from 'lodash/toUpper'
-import { getPageMeta } from 'utils/server'
-import { getOgImageUrl } from 'lib/constants'
-import routes from 'utils/routes'
+import { getPageMeta } from '~/utils/server'
+import { getOgImageUrl } from '~/lib/constants'
+import routes from '~/utils/routes'
export const SEO = () => {
const {
diff --git a/web/app/components/marketing/DitchGoogle.tsx b/web/app/components/marketing/DitchGoogle.tsx
index 4b1238118..980d7bb7e 100644
--- a/web/app/components/marketing/DitchGoogle.tsx
+++ b/web/app/components/marketing/DitchGoogle.tsx
@@ -2,7 +2,7 @@ import { Link } from '@remix-run/react'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
import { Trans, useTranslation } from 'react-i18next'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
interface DitchGoogleProps {
screenshot: {
diff --git a/web/app/components/marketing/Pricing.tsx b/web/app/components/marketing/Pricing.tsx
index 5a3803a87..b0eb9aad0 100644
--- a/web/app/components/marketing/Pricing.tsx
+++ b/web/app/components/marketing/Pricing.tsx
@@ -13,8 +13,8 @@ import { RadioGroup } from '@headlessui/react'
import cx from 'clsx'
import { toast } from 'sonner'
-import Modal from 'ui/Modal'
-import Button from 'ui/Button'
+import Modal from '~/ui/Modal'
+import Button from '~/ui/Button'
import {
CONTACT_EMAIL,
paddleLanguageMapping,
@@ -24,14 +24,14 @@ import {
REFERRAL_DISCOUNT_CODE,
STANDARD_PLANS,
TRIAL_DAYS,
-} from 'lib/constants'
-import { authActions } from 'lib/reducers/auth'
-import { authMe, previewSubscriptionUpdate, changeSubscriptionPlan } from 'api'
-import routes from 'utils/routes'
-import { AppDispatch, StateType } from 'lib/store'
-import Loader from 'ui/Loader'
-import { Badge } from 'ui/Badge'
-import { logout } from 'utils/auth'
+} from '~/lib/constants'
+import { authActions } from '~/lib/reducers/auth'
+import { authMe, previewSubscriptionUpdate, changeSubscriptionPlan } from '~/api'
+import routes from '~/utils/routes'
+import { AppDispatch, StateType } from '~/lib/store'
+import Loader from '~/ui/Loader'
+import { Badge } from '~/ui/Badge'
+import { logout } from '~/utils/auth'
const getPaidFeatures = (t: any, tier: any) => {
return [
diff --git a/web/app/entry.client.tsx b/web/app/entry.client.tsx
index c3ae13d70..67fd1e7e5 100644
--- a/web/app/entry.client.tsx
+++ b/web/app/entry.client.tsx
@@ -8,7 +8,7 @@ import LanguageDetector from 'i18next-browser-languagedetector'
import HTTPBackend from 'i18next-http-backend'
import { getInitialNamespaces } from 'remix-i18next/client'
import i18n from './i18n'
-import { I18N_CACHE_BREAKER } from 'lib/constants'
+import { I18N_CACHE_BREAKER } from '~/lib/constants'
async function hydrate() {
await i18next
diff --git a/web/app/hoc/protected.tsx b/web/app/hoc/protected.tsx
index 4242602f9..c3659ac8e 100644
--- a/web/app/hoc/protected.tsx
+++ b/web/app/hoc/protected.tsx
@@ -2,9 +2,9 @@ import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import { useNavigate } from '@remix-run/react'
-import { getAccessToken } from 'utils/accessToken'
-import { StateType } from 'lib/store'
-import routes from 'utils/routes'
+import { getAccessToken } from '~/utils/accessToken'
+import { StateType } from '~/lib/store'
+import routes from '~/utils/routes'
type AuthParamType = {
shouldBeAuthenticated: boolean
diff --git a/web/app/hooks/usePagination.tsx b/web/app/hooks/usePagination.tsx
index 710708db9..993a5dc2a 100644
--- a/web/app/hooks/usePagination.tsx
+++ b/web/app/hooks/usePagination.tsx
@@ -1,5 +1,5 @@
import { useMemo } from 'react'
-import { ENTRIES_PER_PAGE_DASHBOARD } from 'lib/constants'
+import { ENTRIES_PER_PAGE_DASHBOARD } from '~/lib/constants'
export const DOTS = '...'
diff --git a/web/app/i18n.ts b/web/app/i18n.ts
index 79cccc056..c2c885347 100644
--- a/web/app/i18n.ts
+++ b/web/app/i18n.ts
@@ -1,7 +1,7 @@
import { InitOptions } from 'i18next'
import _includes from 'lodash/includes'
-import { defaultLanguage, I18N_CACHE_BREAKER, whitelist } from 'lib/constants'
+import { defaultLanguage, I18N_CACHE_BREAKER, whitelist } from '~/lib/constants'
const genericConfig: InitOptions = {
supportedLngs: whitelist,
diff --git a/web/app/i18next.server.ts b/web/app/i18next.server.ts
index ff59df345..31055c963 100644
--- a/web/app/i18next.server.ts
+++ b/web/app/i18next.server.ts
@@ -1,7 +1,7 @@
import { RemixI18Next } from 'remix-i18next/server'
import Backend from 'i18next-fs-backend'
import { resolve } from 'node:path'
-import { defaultLanguage, whitelist } from 'lib/constants'
+import { defaultLanguage, whitelist } from '~/lib/constants'
import i18n from './i18n'
const i18next = new RemixI18Next({
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.ts
index 361fae6a8..96f40b3ae 100644
--- a/web/app/lib/constants/index.ts
+++ b/web/app/lib/constants/index.ts
@@ -1,6 +1,6 @@
/* eslint-disable no-undef */
import _endsWith from 'lodash/endsWith'
-import { Role } from 'lib/models/Organisation'
+import { Role } from '~/lib/models/Organisation'
const displayDateOptions: Intl.DateTimeFormatOptions = {
year: 'numeric',
diff --git a/web/app/lib/reducers/ui/cache.ts b/web/app/lib/reducers/ui/cache.ts
index 70f0f778b..aae3d7a54 100644
--- a/web/app/lib/reducers/ui/cache.ts
+++ b/web/app/lib/reducers/ui/cache.ts
@@ -1,7 +1,7 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
-import { getItem, removeItem, setItem } from 'utils/localstorage'
-import { LS_VIEW_PREFS_SETTING, LS_CAPTCHA_VIEW_PREFS_SETTING, isBrowser } from 'lib/constants'
-import { filterInvalidViewPrefs } from 'pages/Project/View/utils/filters'
+import { getItem, removeItem, setItem } from '~/utils/localstorage'
+import { LS_VIEW_PREFS_SETTING, LS_CAPTCHA_VIEW_PREFS_SETTING, isBrowser } from '~/lib/constants'
+import { filterInvalidViewPrefs } from '~/pages/Project/View/utils/filters'
const getInitialViewPrefs = (LS_VIEW: string) => {
if (!isBrowser) {
diff --git a/web/app/lib/reducers/ui/misc.ts b/web/app/lib/reducers/ui/misc.ts
index cd4fe7c8c..848e169a1 100644
--- a/web/app/lib/reducers/ui/misc.ts
+++ b/web/app/lib/reducers/ui/misc.ts
@@ -1,10 +1,10 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
-import { LOW_EVENTS_WARNING, LS_PROJECTS_PROTECTED } from 'lib/constants'
-import { setCookie } from 'utils/cookie'
-import { secondsTillNextMonth } from 'utils/generic'
-import { Stats } from 'lib/models/Stats'
-import { Metainfo } from 'lib/models/Metainfo'
-import { getItem, setItem } from 'utils/localstorage'
+import { LOW_EVENTS_WARNING, LS_PROJECTS_PROTECTED } from '~/lib/constants'
+import { setCookie } from '~/utils/cookie'
+import { secondsTillNextMonth } from '~/utils/generic'
+import { Stats } from '~/lib/models/Stats'
+import { Metainfo } from '~/lib/models/Metainfo'
+import { getItem, setItem } from '~/utils/localstorage'
interface InitialState {
stats: Stats
diff --git a/web/app/lib/reducers/ui/theme.ts b/web/app/lib/reducers/ui/theme.ts
index fdf271160..87b8725d1 100644
--- a/web/app/lib/reducers/ui/theme.ts
+++ b/web/app/lib/reducers/ui/theme.ts
@@ -1,7 +1,7 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import _includes from 'lodash/includes'
-import { setCookie, getCookie } from 'utils/cookie'
-import { isBrowser, LS_THEME_SETTING, SUPPORTED_THEMES, ThemeType } from 'lib/constants'
+import { setCookie, getCookie } from '~/utils/cookie'
+import { isBrowser, LS_THEME_SETTING, SUPPORTED_THEMES, ThemeType } from '~/lib/constants'
const setThemeToDOM = (theme: string) => {
if (!isBrowser) {
diff --git a/web/app/lib/store/index.ts b/web/app/lib/store/index.ts
index f7c50063e..942cbff7f 100644
--- a/web/app/lib/store/index.ts
+++ b/web/app/lib/store/index.ts
@@ -1,6 +1,6 @@
import { combineReducers, configureStore } from '@reduxjs/toolkit'
import { useDispatch } from 'react-redux'
-import { isDevelopment } from 'lib/constants'
+import { isDevelopment } from '~/lib/constants'
import authSlice from '../reducers/auth'
import miscSlice from '../reducers/ui/misc'
import themeSlice from '../reducers/ui/theme'
diff --git a/web/app/modals/Forecast.tsx b/web/app/modals/Forecast.tsx
index 800277327..5b4864e97 100644
--- a/web/app/modals/Forecast.tsx
+++ b/web/app/modals/Forecast.tsx
@@ -4,9 +4,9 @@ import _isNaN from 'lodash/isNaN'
import _map from 'lodash/map'
import cx from 'clsx'
-import Modal from 'ui/Modal'
-import Input from 'ui/Input'
-import { FORECAST_MAX_MAPPING } from 'lib/constants'
+import Modal from '~/ui/Modal'
+import Input from '~/ui/Input'
+import { FORECAST_MAX_MAPPING } from '~/lib/constants'
import _toString from 'lodash/toString'
import { Bars3BottomRightIcon, ChartBarIcon } from '@heroicons/react/24/outline'
diff --git a/web/app/modals/NewFunnel.tsx b/web/app/modals/NewFunnel.tsx
index b8c4dec86..2c583a0c1 100644
--- a/web/app/modals/NewFunnel.tsx
+++ b/web/app/modals/NewFunnel.tsx
@@ -6,13 +6,13 @@ import cx from 'clsx'
import { TrashIcon } from '@heroicons/react/24/outline'
import { useTranslation } from 'react-i18next'
-import Modal from 'ui/Modal'
-import Input from 'ui/Input'
-import Combobox from 'ui/Combobox'
-import { MIN_FUNNEL_STEPS, MAX_FUNNEL_STEPS } from 'lib/constants'
-import { getFilters } from 'api'
-import { Funnel } from 'lib/models/Project'
-import { ProjectForShared } from 'lib/models/SharedProject'
+import Modal from '~/ui/Modal'
+import Input from '~/ui/Input'
+import Combobox from '~/ui/Combobox'
+import { MIN_FUNNEL_STEPS, MAX_FUNNEL_STEPS } from '~/lib/constants'
+import { getFilters } from '~/api'
+import { Funnel } from '~/lib/models/Project'
+import { ProjectForShared } from '~/lib/models/SharedProject'
interface NewFunnelProps {
project: ProjectForShared
diff --git a/web/app/modals/PaidFeature.tsx b/web/app/modals/PaidFeature.tsx
index 666e87267..2056195bd 100644
--- a/web/app/modals/PaidFeature.tsx
+++ b/web/app/modals/PaidFeature.tsx
@@ -2,8 +2,8 @@ import React from 'react'
import { useNavigate } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
-import Modal from 'ui/Modal'
-import routes from 'utils/routes'
+import Modal from '~/ui/Modal'
+import routes from '~/utils/routes'
interface PaidFeatureProps {
onClose: () => void
diff --git a/web/app/modals/TrackingSnippet.tsx b/web/app/modals/TrackingSnippet.tsx
index ea597492d..119b44aa5 100644
--- a/web/app/modals/TrackingSnippet.tsx
+++ b/web/app/modals/TrackingSnippet.tsx
@@ -1,10 +1,10 @@
import React from 'react'
import { useTranslation, Trans } from 'react-i18next'
-import Modal from 'ui/Modal'
-import { Badge } from 'ui/Badge'
-import Textarea from 'ui/Textarea'
-import { API_URL, isSelfhosted } from 'lib/constants'
+import Modal from '~/ui/Modal'
+import { Badge } from '~/ui/Badge'
+import Textarea from '~/ui/Textarea'
+import { API_URL, isSelfhosted } from '~/lib/constants'
const API_URL_WITHOUT_TRAILING_SLASH = API_URL.endsWith('/') ? API_URL.slice(0, -1) : API_URL
diff --git a/web/app/modals/ViewProjectHotkeys.tsx b/web/app/modals/ViewProjectHotkeys.tsx
index 287d7ba75..79b715dfa 100644
--- a/web/app/modals/ViewProjectHotkeys.tsx
+++ b/web/app/modals/ViewProjectHotkeys.tsx
@@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next'
import { TFunction } from 'i18next'
import _map from 'lodash/map'
-import Modal from 'ui/Modal'
-import { Badge } from 'ui/Badge'
+import Modal from '~/ui/Modal'
+import { Badge } from '~/ui/Badge'
interface ViewProjectHotkeysProps {
onClose: () => void
diff --git a/web/app/pages/About/index.tsx b/web/app/pages/About/index.tsx
index 92529437c..1e2a1ed0c 100644
--- a/web/app/pages/About/index.tsx
+++ b/web/app/pages/About/index.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import _map from 'lodash/map'
-import { CONTACT_EMAIL, GITHUB_URL } from 'lib/constants'
+import { CONTACT_EMAIL, GITHUB_URL } from '~/lib/constants'
const socialIcons: {
[key: string]: React.ReactNode
diff --git a/web/app/pages/Auth/ChangeEmail/index.tsx b/web/app/pages/Auth/ChangeEmail/index.tsx
index 36de36eab..eb7b41549 100644
--- a/web/app/pages/Auth/ChangeEmail/index.tsx
+++ b/web/app/pages/Auth/ChangeEmail/index.tsx
@@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _isString from 'lodash/isString'
-import { confirmChangeEmail } from 'api'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
+import { confirmChangeEmail } from '~/api'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
const ChangeEmail = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
index 756d9a253..81b8fc02d 100644
--- a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
+++ b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
@@ -4,12 +4,12 @@ import { useTranslation, Trans } from 'react-i18next'
import { EnvelopeIcon } from '@heroicons/react/24/outline'
import { useSelector } from 'react-redux'
-import Loader from 'ui/Loader'
-import { withAuthentication } from 'hoc/protected'
-import { authActions } from 'lib/reducers/auth'
-import { StateType, useAppDispatch } from 'lib/store'
-import routes from 'utils/routes'
-import { logout } from 'utils/auth'
+import Loader from '~/ui/Loader'
+import { withAuthentication } from '~/hoc/protected'
+import { authActions } from '~/lib/reducers/auth'
+import { StateType, useAppDispatch } from '~/lib/store'
+import routes from '~/utils/routes'
+import { logout } from '~/utils/auth'
const CheckYourInbox = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx b/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
index b94911795..918a95408 100644
--- a/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
+++ b/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
@@ -6,12 +6,12 @@ import _keys from 'lodash/keys'
import _isEmpty from 'lodash/isEmpty'
import { toast } from 'sonner'
-import { createNewPassword } from 'api'
-import { withAuthentication, auth } from 'hoc/protected'
-import routes from 'utils/routes'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import { isValidPassword, MIN_PASSWORD_CHARS, MAX_PASSWORD_CHARS } from 'utils/validator'
+import { createNewPassword } from '~/api'
+import { withAuthentication, auth } from '~/hoc/protected'
+import routes from '~/utils/routes'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import { isValidPassword, MIN_PASSWORD_CHARS, MAX_PASSWORD_CHARS } from '~/utils/validator'
interface FormSubmitData {
password: string
diff --git a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
index 045064ef8..bc2aedecb 100644
--- a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
+++ b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
@@ -5,13 +5,13 @@ import _keys from 'lodash/keys'
import _isEmpty from 'lodash/isEmpty'
import { toast } from 'sonner'
-import { forgotPassword } from 'api'
-import { withAuthentication, auth } from 'hoc/protected'
-import routes from 'utils/routes'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import { TRIAL_DAYS } from 'lib/constants'
-import { isValidEmail } from 'utils/validator'
+import { forgotPassword } from '~/api'
+import { withAuthentication, auth } from '~/hoc/protected'
+import routes from '~/utils/routes'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import { TRIAL_DAYS } from '~/lib/constants'
+import { isValidEmail } from '~/utils/validator'
const ForgotPassword = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Auth/Signin/Signin.tsx b/web/app/pages/Auth/Signin/Signin.tsx
index a149a0d70..26c366167 100644
--- a/web/app/pages/Auth/Signin/Signin.tsx
+++ b/web/app/pages/Auth/Signin/Signin.tsx
@@ -7,25 +7,25 @@ import _isEmpty from 'lodash/isEmpty'
import _isString from 'lodash/isString'
import { toast } from 'sonner'
-import GoogleAuth from 'components/GoogleAuth'
-import GithubAuth from 'components/GithubAuth'
-import { withAuthentication, auth } from 'hoc/protected'
-import routes from 'utils/routes'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Checkbox from 'ui/Checkbox'
-import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS } from 'utils/validator'
-import { isSelfhosted, REFERRAL_COOKIE, TRIAL_DAYS } from 'lib/constants'
-import { generateSSOAuthURL, getInstalledExtensions, getJWTBySSOHash, login, submit2FA } from 'api'
-import { setAccessToken, removeAccessToken } from 'utils/accessToken'
-import { setRefreshToken, removeRefreshToken } from 'utils/refreshToken'
-import { useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
-import { delay, openBrowserWindow } from 'utils/generic'
-import { deleteCookie, getCookie } from 'utils/cookie'
-import { shouldShowLowEventsBanner } from 'utils/auth'
-import UIActions from 'lib/reducers/ui'
-import { SSOProvider } from 'lib/models/Auth'
+import GoogleAuth from '~/components/GoogleAuth'
+import GithubAuth from '~/components/GithubAuth'
+import { withAuthentication, auth } from '~/hoc/protected'
+import routes from '~/utils/routes'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Checkbox from '~/ui/Checkbox'
+import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS } from '~/utils/validator'
+import { isSelfhosted, REFERRAL_COOKIE, TRIAL_DAYS } from '~/lib/constants'
+import { generateSSOAuthURL, getInstalledExtensions, getJWTBySSOHash, login, submit2FA } from '~/api'
+import { setAccessToken, removeAccessToken } from '~/utils/accessToken'
+import { setRefreshToken, removeRefreshToken } from '~/utils/refreshToken'
+import { useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
+import { delay, openBrowserWindow } from '~/utils/generic'
+import { deleteCookie, getCookie } from '~/utils/cookie'
+import { shouldShowLowEventsBanner } from '~/utils/auth'
+import UIActions from '~/lib/reducers/ui'
+import { SSOProvider } from '~/lib/models/Auth'
interface SigninForm {
email: string
diff --git a/web/app/pages/Auth/Signup/Signup.tsx b/web/app/pages/Auth/Signup/Signup.tsx
index 5f648ec2d..fb51a1498 100644
--- a/web/app/pages/Auth/Signup/Signup.tsx
+++ b/web/app/pages/Auth/Signup/Signup.tsx
@@ -6,28 +6,28 @@ import _keys from 'lodash/keys'
import _omit from 'lodash/omit'
import _isEmpty from 'lodash/isEmpty'
-import { getAccessToken, setAccessToken } from 'utils/accessToken'
-import GoogleAuth from 'components/GoogleAuth'
-import GithubAuth from 'components/GithubAuth'
-import routes from 'utils/routes'
-import Input from 'ui/Input'
-import Checkbox from 'ui/Checkbox'
-import Tooltip from 'ui/Tooltip'
-import Button from 'ui/Button'
-import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS, MAX_PASSWORD_CHARS } from 'utils/validator'
-import { HAVE_I_BEEN_PWNED_URL, REFERRAL_COOKIE, TRIAL_DAYS } from 'lib/constants'
-import { trackCustom } from 'utils/analytics'
-import { StateType, useAppDispatch } from 'lib/store'
+import { getAccessToken, setAccessToken } from '~/utils/accessToken'
+import GoogleAuth from '~/components/GoogleAuth'
+import GithubAuth from '~/components/GithubAuth'
+import routes from '~/utils/routes'
+import Input from '~/ui/Input'
+import Checkbox from '~/ui/Checkbox'
+import Tooltip from '~/ui/Tooltip'
+import Button from '~/ui/Button'
+import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS, MAX_PASSWORD_CHARS } from '~/utils/validator'
+import { HAVE_I_BEEN_PWNED_URL, REFERRAL_COOKIE, TRIAL_DAYS } from '~/lib/constants'
+import { trackCustom } from '~/utils/analytics'
+import { StateType, useAppDispatch } from '~/lib/store'
import { useSelector } from 'react-redux'
-import { delay, openBrowserWindow } from 'utils/generic'
+import { delay, openBrowserWindow } from '~/utils/generic'
import { toast } from 'sonner'
-import { generateSSOAuthURL, getJWTBySSOHash, signup } from 'api'
-import { deleteCookie, getCookie } from 'utils/cookie'
-import { authActions } from 'lib/reducers/auth'
-import { setRefreshToken } from 'utils/refreshToken'
-import { shouldShowLowEventsBanner } from 'utils/auth'
-import UIActions from 'lib/reducers/ui'
-import { SSOProvider } from 'lib/models/Auth'
+import { generateSSOAuthURL, getJWTBySSOHash, signup } from '~/api'
+import { deleteCookie, getCookie } from '~/utils/cookie'
+import { authActions } from '~/lib/reducers/auth'
+import { setRefreshToken } from '~/utils/refreshToken'
+import { shouldShowLowEventsBanner } from '~/utils/auth'
+import UIActions from '~/lib/reducers/ui'
+import { SSOProvider } from '~/lib/models/Auth'
interface SignupForm {
email: string
diff --git a/web/app/pages/Auth/Socialised/index.tsx b/web/app/pages/Auth/Socialised/index.tsx
index ca9a7abba..51a51c422 100644
--- a/web/app/pages/Auth/Socialised/index.tsx
+++ b/web/app/pages/Auth/Socialised/index.tsx
@@ -5,10 +5,10 @@ import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _split from 'lodash/split'
import _replace from 'lodash/replace'
-import { processSSOToken } from 'api'
-import { SSO_PROVIDERS } from 'lib/constants'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
+import { processSSOToken } from '~/api'
+import { SSO_PROVIDERS } from '~/lib/constants'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
const Socialised = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Auth/VerifyEmail/index.tsx b/web/app/pages/Auth/VerifyEmail/index.tsx
index 86bee02c3..1e036d895 100644
--- a/web/app/pages/Auth/VerifyEmail/index.tsx
+++ b/web/app/pages/Auth/VerifyEmail/index.tsx
@@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _isString from 'lodash/isString'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
-import { verifyEmail } from 'api'
-import { authActions } from 'lib/reducers/auth'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
+import { verifyEmail } from '~/api'
+import { authActions } from '~/lib/reducers/auth'
const VerifyEmail = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Billing/index.tsx b/web/app/pages/Billing/index.tsx
index 540acfdc7..abbaa8d33 100644
--- a/web/app/pages/Billing/index.tsx
+++ b/web/app/pages/Billing/index.tsx
@@ -14,20 +14,20 @@ import {
CONTACT_EMAIL,
paddleLanguageMapping,
isBrowser,
-} from 'lib/constants'
-import { loadScript } from 'utils/generic'
-import Loader from 'ui/Loader'
-import { useAppDispatch, StateType } from 'lib/store'
-import { withAuthentication, auth } from 'hoc/protected'
-import Modal from 'ui/Modal'
-import Button from 'ui/Button'
-import MultiProgress from 'ui/MultiProgress'
-import Tooltip from 'ui/Tooltip'
-import UIActions from 'lib/reducers/ui'
+} from '~/lib/constants'
+import { loadScript } from '~/utils/generic'
+import Loader from '~/ui/Loader'
+import { useAppDispatch, StateType } from '~/lib/store'
+import { withAuthentication, auth } from '~/hoc/protected'
+import Modal from '~/ui/Modal'
+import Button from '~/ui/Button'
+import MultiProgress from '~/ui/MultiProgress'
+import Tooltip from '~/ui/Tooltip'
+import UIActions from '~/lib/reducers/ui'
import Pricing from '../../components/marketing/Pricing'
-import DashboardLockedBanner from 'components/DashboardLockedBanner'
-import { UsageInfo } from 'lib/models/Usageinfo'
-import { getUsageInfo } from 'api'
+import DashboardLockedBanner from '~/components/DashboardLockedBanner'
+import { UsageInfo } from '~/lib/models/Usageinfo'
+import { getUsageInfo } from '~/api'
import { toast } from 'sonner'
dayjs.extend(utc)
diff --git a/web/app/pages/Blog/Post.tsx b/web/app/pages/Blog/Post.tsx
index 647634429..7b328ef83 100644
--- a/web/app/pages/Blog/Post.tsx
+++ b/web/app/pages/Blog/Post.tsx
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react'
import { Link, useLoaderData, useLocation } from '@remix-run/react'
-import NotFound from 'pages/NotFound'
-import { trackPageview } from 'utils/analytics'
+import NotFound from '~/pages/NotFound'
+import { trackPageview } from '~/utils/analytics'
interface Post {
slug: string
diff --git a/web/app/pages/Captcha/Settings/CaptchaSettings.tsx b/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
index 7b73136d8..ad1dd0dc2 100644
--- a/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
+++ b/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
@@ -14,8 +14,8 @@ import _map from 'lodash/map'
import _includes from 'lodash/includes'
import { ExclamationTriangleIcon, TrashIcon, XCircleIcon } from '@heroicons/react/24/outline'
-import { withAuthentication, auth } from 'hoc/protected'
-import { TITLE_SUFFIX } from 'lib/constants'
+import { withAuthentication, auth } from '~/hoc/protected'
+import { TITLE_SUFFIX } from '~/lib/constants'
import {
createProject,
updateProject,
@@ -23,18 +23,18 @@ import {
resetCaptchaProject,
reGenerateCaptchaSecretKey,
getProject,
-} from 'api'
-import Input from 'ui/Input'
-import Loader from 'ui/Loader'
-import Button from 'ui/Button'
-import Checkbox from 'ui/Checkbox'
-import Modal from 'ui/Modal'
-import { trackCustom } from 'utils/analytics'
-import routes from 'utils/routes'
-import { CaptchaProject } from 'lib/models/Project'
-import { useRequiredParams } from 'hooks/useRequiredParams'
+} from '~/api'
+import Input from '~/ui/Input'
+import Loader from '~/ui/Loader'
+import Button from '~/ui/Button'
+import Checkbox from '~/ui/Checkbox'
+import Modal from '~/ui/Modal'
+import { trackCustom } from '~/utils/analytics'
+import routes from '~/utils/routes'
+import { CaptchaProject } from '~/lib/models/Project'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
const MAX_NAME_LENGTH = 50
const MAX_ORIGINS_LENGTH = 300
diff --git a/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx b/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx
index 1205c5d97..28aa03859 100644
--- a/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx
+++ b/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx
@@ -23,10 +23,10 @@ import {
tbsFormatMapper24h,
tbsFormatMapperTooltip,
tbsFormatMapperTooltip24h,
-} from 'lib/constants'
+} from '~/lib/constants'
// @ts-ignore
import * as d3 from 'd3'
-import { nFormatter } from 'utils/generic'
+import { nFormatter } from '~/utils/generic'
const PANELS_ORDER = ['cc', 'br', 'os', 'dv']
diff --git a/web/app/pages/Captcha/View/ViewCaptcha.tsx b/web/app/pages/Captcha/View/ViewCaptcha.tsx
index 8e392b9c4..c6d50c841 100644
--- a/web/app/pages/Captcha/View/ViewCaptcha.tsx
+++ b/web/app/pages/Captcha/View/ViewCaptcha.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unstable-nested-components, react/display-name */
import React, { useState, useEffect, useMemo, memo, useRef } from 'react'
import { toast } from 'sonner'
-import useSize from 'hooks/useSize'
+import useSize from '~/hooks/useSize'
import { useNavigate } from '@remix-run/react'
import { ClientOnly } from 'remix-utils/client-only'
import bb from 'billboard.js'
@@ -20,10 +20,10 @@ import _startsWith from 'lodash/startsWith'
import _debounce from 'lodash/debounce'
import _some from 'lodash/some'
-import LineChart from 'ui/icons/LineChart'
-import BarChart from 'ui/icons/BarChart'
-import { getItem, setItem } from 'utils/localstorage'
-import EventsRunningOutBanner from 'components/EventsRunningOutBanner'
+import LineChart from '~/ui/icons/LineChart'
+import BarChart from '~/ui/icons/BarChart'
+import { getItem, setItem } from '~/utils/localstorage'
+import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
import {
captchaTbPeriodPairs,
timeBucketToDays,
@@ -37,15 +37,15 @@ import {
OS_LOGO_MAP_DARK,
isBrowser,
ThemeType,
-} from 'lib/constants'
-import { CaptchaProject, Project } from 'lib/models/Project'
-import Loader from 'ui/Loader'
-import Dropdown from 'ui/Dropdown'
-import Checkbox from 'ui/Checkbox'
-import FlatPicker from 'ui/Flatpicker'
-import routes from 'utils/routes'
-import { getProject, getCaptchaData } from 'api'
-import { Panel } from 'pages/Project/View/Panels'
+} from '~/lib/constants'
+import { CaptchaProject, Project } from '~/lib/models/Project'
+import Loader from '~/ui/Loader'
+import Dropdown from '~/ui/Dropdown'
+import Checkbox from '~/ui/Checkbox'
+import FlatPicker from '~/ui/Flatpicker'
+import routes from '~/utils/routes'
+import { getProject, getCaptchaData } from '~/api'
+import { Panel } from '~/pages/Project/View/Panels'
import {
getFormatDate,
panelIconMapping,
@@ -59,15 +59,15 @@ import {
getColumns,
PANELS_ORDER,
} from './ViewCaptcha.helpers'
-import { onCSVExportClick } from 'pages/Project/View/ViewProject.helpers'
+import { onCSVExportClick } from '~/pages/Project/View/ViewProject.helpers'
import CCRow from '../../Project/View/components/CCRow'
import NoEvents from './components/NoEvents'
-import { useRequiredParams } from 'hooks/useRequiredParams'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'lib/store'
+import { StateType, useAppDispatch } from '~/lib/store'
import Filters from './components/Filters'
import TBPeriodSelector from './components/TBPeriodSelector'
-import UIActions from 'lib/reducers/ui'
+import UIActions from '~/lib/reducers/ui'
const PageLoader = () => (
<div className='min-h-min-footer bg-gray-50 dark:bg-slate-900'>
diff --git a/web/app/pages/Captcha/View/components/Filters.tsx b/web/app/pages/Captcha/View/components/Filters.tsx
index 9971a5c89..e80b8fd44 100644
--- a/web/app/pages/Captcha/View/components/Filters.tsx
+++ b/web/app/pages/Captcha/View/components/Filters.tsx
@@ -8,8 +8,8 @@ import _startsWith from 'lodash/startsWith'
import _replace from 'lodash/replace'
import { useTranslation } from 'react-i18next'
-import countries from 'utils/isoCountries'
-import { getLocaleDisplayName } from 'utils/generic'
+import countries from '~/utils/isoCountries'
+import { getLocaleDisplayName } from '~/utils/generic'
interface FilterProps {
column: string
diff --git a/web/app/pages/Captcha/View/components/NoEvents.tsx b/web/app/pages/Captcha/View/components/NoEvents.tsx
index 0b085baf9..408f20730 100644
--- a/web/app/pages/Captcha/View/components/NoEvents.tsx
+++ b/web/app/pages/Captcha/View/components/NoEvents.tsx
@@ -2,9 +2,9 @@ import React, { memo } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import _isEmpty from 'lodash/isEmpty'
-import Button from 'ui/Button'
-import { DOCS_CAPTCHA_URL } from 'lib/constants'
-import { Filter } from 'pages/Project/View/interfaces/traffic'
+import Button from '~/ui/Button'
+import { DOCS_CAPTCHA_URL } from '~/lib/constants'
+import { Filter } from '~/pages/Project/View/interfaces/traffic'
interface NoEventsProps {
filters: Filter[]
diff --git a/web/app/pages/Captcha/View/components/TBPeriodSelector.tsx b/web/app/pages/Captcha/View/components/TBPeriodSelector.tsx
index 20b8b80ad..09c80b615 100644
--- a/web/app/pages/Captcha/View/components/TBPeriodSelector.tsx
+++ b/web/app/pages/Captcha/View/components/TBPeriodSelector.tsx
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import _includes from 'lodash/includes'
import cx from 'clsx'
-import { ALL_PERIODS } from 'lib/constants'
+import { ALL_PERIODS } from '~/lib/constants'
interface TBPeriodSelectorProps {
title: string | number | React.ReactNode
diff --git a/web/app/pages/Changelog/index.tsx b/web/app/pages/Changelog/index.tsx
index d592ec58e..b54b1b110 100644
--- a/web/app/pages/Changelog/index.tsx
+++ b/web/app/pages/Changelog/index.tsx
@@ -5,8 +5,8 @@ import { useTranslation } from 'react-i18next'
import dayjs from 'dayjs'
import { Link } from '@remix-run/react'
-import { SWETRIX_VS_GOOGLE, DOCS_URL, CAPTCHA_URL, DOCS_CAPTCHA_URL } from 'lib/constants'
-import routes from 'utils/routes'
+import { SWETRIX_VS_GOOGLE, DOCS_URL, CAPTCHA_URL, DOCS_CAPTCHA_URL } from '~/lib/constants'
+import routes from '~/utils/routes'
const INTEGRATIONS_LINK = `${routes.user_settings}#integrations`
diff --git a/web/app/pages/Contact/index.tsx b/web/app/pages/Contact/index.tsx
index 02f4476b1..aa8aa1c7d 100644
--- a/web/app/pages/Contact/index.tsx
+++ b/web/app/pages/Contact/index.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import { useTranslation, Trans } from 'react-i18next'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
-import { CONTACT_EMAIL, TWITTER_URL, TWITTER_USERNAME, DISCORD_URL, DOCS_URL, BOOK_A_CALL_URL } from 'lib/constants'
+import { CONTACT_EMAIL, TWITTER_URL, TWITTER_USERNAME, DISCORD_URL, DOCS_URL, BOOK_A_CALL_URL } from '~/lib/constants'
interface PanelProps {
href: string
diff --git a/web/app/pages/Dashboard/AddProject.tsx b/web/app/pages/Dashboard/AddProject.tsx
index a2f0a09fb..c919b9045 100644
--- a/web/app/pages/Dashboard/AddProject.tsx
+++ b/web/app/pages/Dashboard/AddProject.tsx
@@ -4,7 +4,7 @@ import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import cx from 'clsx'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
interface AddProjectProps {
onClick: (e: React.MouseEvent<HTMLAnchorElement>) => void
diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsx
index d1605ca2e..30d342f5f 100644
--- a/web/app/pages/Dashboard/Dashboard.tsx
+++ b/web/app/pages/Dashboard/Dashboard.tsx
@@ -8,23 +8,23 @@ import { useTranslation } from 'react-i18next'
import { FolderPlusIcon, MagnifyingGlassIcon, XMarkIcon } from '@heroicons/react/24/outline'
import { XCircleIcon } from '@heroicons/react/24/solid'
-import Modal from 'ui/Modal'
-import { withAuthentication, auth } from 'hoc/protected'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
-import { isSelfhosted, ENTRIES_PER_PAGE_DASHBOARD, LIVE_VISITORS_UPDATE_INTERVAL } from 'lib/constants'
-import EventsRunningOutBanner from 'components/EventsRunningOutBanner'
-import DashboardLockedBanner from 'components/DashboardLockedBanner'
-import useDebounce from 'hooks/useDebounce'
+import Modal from '~/ui/Modal'
+import { withAuthentication, auth } from '~/hoc/protected'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
+import { isSelfhosted, ENTRIES_PER_PAGE_DASHBOARD, LIVE_VISITORS_UPDATE_INTERVAL } from '~/lib/constants'
+import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
+import DashboardLockedBanner from '~/components/DashboardLockedBanner'
+import useDebounce from '~/hooks/useDebounce'
-import Pagination from 'ui/Pagination'
+import Pagination from '~/ui/Pagination'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
import { ProjectCard } from './ProjectCard'
import { NoProjects } from './NoProjects'
import { AddProject } from './AddProject'
-import { Overall, Project } from 'lib/models/Project'
-import { getProjects, getLiveVisitors, getOverallStats, getOverallStatsCaptcha } from 'api'
+import { Overall, Project } from '~/lib/models/Project'
+import { getProjects, getLiveVisitors, getOverallStats, getOverallStatsCaptcha } from '~/api'
const Dashboard = () => {
const { user } = useSelector((state: StateType) => state.auth)
diff --git a/web/app/pages/Dashboard/NoProjects.tsx b/web/app/pages/Dashboard/NoProjects.tsx
index 3218f303c..559a8543c 100644
--- a/web/app/pages/Dashboard/NoProjects.tsx
+++ b/web/app/pages/Dashboard/NoProjects.tsx
@@ -3,7 +3,7 @@ import { FolderPlusIcon } from '@heroicons/react/24/outline'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
interface NoProjectsProps {
onClick: (e: React.MouseEvent<HTMLAnchorElement>) => void
diff --git a/web/app/pages/Dashboard/ProjectCard.tsx b/web/app/pages/Dashboard/ProjectCard.tsx
index 381ef4ef5..eb69924c0 100644
--- a/web/app/pages/Dashboard/ProjectCard.tsx
+++ b/web/app/pages/Dashboard/ProjectCard.tsx
@@ -10,17 +10,17 @@ import { useTranslation } from 'react-i18next'
import { AdjustmentsVerticalIcon, ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
import { ChevronUpIcon, ChevronDownIcon } from '@heroicons/react/20/solid'
-import Modal from 'ui/Modal'
-import { Badge, BadgeProps } from 'ui/Badge'
-import routes from 'utils/routes'
-import { nFormatter, calculateRelativePercentage } from 'utils/generic'
+import Modal from '~/ui/Modal'
+import { Badge, BadgeProps } from '~/ui/Badge'
+import routes from '~/utils/routes'
+import { nFormatter, calculateRelativePercentage } from '~/utils/generic'
-import { acceptProjectShare } from 'api'
+import { acceptProjectShare } from '~/api'
-import { OverallObject, Project } from 'lib/models/Project'
+import { OverallObject, Project } from '~/lib/models/Project'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
interface ProjectCardProps {
live?: string | number
diff --git a/web/app/pages/ErrorTracking/index.tsx b/web/app/pages/ErrorTracking/index.tsx
index d9c41fa4d..735fff18b 100644
--- a/web/app/pages/ErrorTracking/index.tsx
+++ b/web/app/pages/ErrorTracking/index.tsx
@@ -8,16 +8,16 @@ import { ArrowRightIcon } from '@heroicons/react/20/solid'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
-import routesPath from 'utils/routes'
-import { getAccessToken } from 'utils/accessToken'
-import { nFormatterSeparated } from 'utils/generic'
-import { ERROR_TRACKING_LIVE_DEMO_URL, isBrowser } from 'lib/constants'
-import { StateType } from 'lib/store/index'
-import BackgroundSvg from 'ui/icons/BackgroundSvg'
+import routesPath from '~/utils/routes'
+import { getAccessToken } from '~/utils/accessToken'
+import { nFormatterSeparated } from '~/utils/generic'
+import { ERROR_TRACKING_LIVE_DEMO_URL, isBrowser } from '~/lib/constants'
+import { StateType } from '~/lib/store/index'
+import BackgroundSvg from '~/ui/icons/BackgroundSvg'
-import Header from 'components/Header'
+import Header from '~/components/Header'
import Pricing from '../../components/marketing/Pricing'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
const Lines = () => (
<div className='pointer-events-none relative'>
diff --git a/web/app/pages/Imprint/index.tsx b/web/app/pages/Imprint/index.tsx
index 1d0531f3f..b21894e68 100644
--- a/web/app/pages/Imprint/index.tsx
+++ b/web/app/pages/Imprint/index.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unescaped-entities */
import React from 'react'
-import { CONTACT_EMAIL } from 'lib/constants'
+import { CONTACT_EMAIL } from '~/lib/constants'
const Imprint = () => {
return (
diff --git a/web/app/pages/Landings/Marketers.tsx b/web/app/pages/Landings/Marketers.tsx
index 79ebe2ea8..80fc4b26f 100644
--- a/web/app/pages/Landings/Marketers.tsx
+++ b/web/app/pages/Landings/Marketers.tsx
@@ -2,19 +2,19 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from 'lib/constants'
-import routesPath from 'utils/routes'
+import { StateType } from '~/lib/store'
+import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from '~/lib/constants'
+import routesPath from '~/utils/routes'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
-import Header from 'components/Header'
-import { getAccessToken } from 'utils/accessToken'
+import Header from '~/components/Header'
+import { getAccessToken } from '~/utils/accessToken'
import _map from 'lodash/map'
-import { ComparisonTable } from 'components/marketing/ComparisonTable'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
+import { ComparisonTable } from '~/components/marketing/ComparisonTable'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
interface LoaderProps {
theme: 'dark' | 'light'
diff --git a/web/app/pages/Landings/SmallBusinesses.tsx b/web/app/pages/Landings/SmallBusinesses.tsx
index e466ec305..cc264ce39 100644
--- a/web/app/pages/Landings/SmallBusinesses.tsx
+++ b/web/app/pages/Landings/SmallBusinesses.tsx
@@ -2,19 +2,19 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL, TWITTER_URL } from 'lib/constants'
-import routesPath from 'utils/routes'
+import { StateType } from '~/lib/store'
+import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL, TWITTER_URL } from '~/lib/constants'
+import routesPath from '~/utils/routes'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
-import Header from 'components/Header'
-import { getAccessToken } from 'utils/accessToken'
+import Header from '~/components/Header'
+import { getAccessToken } from '~/utils/accessToken'
import _map from 'lodash/map'
-import { ComparisonTable } from 'components/marketing/ComparisonTable'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
+import { ComparisonTable } from '~/components/marketing/ComparisonTable'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
interface LoaderProps {
theme: 'dark' | 'light'
diff --git a/web/app/pages/Landings/Startups.tsx b/web/app/pages/Landings/Startups.tsx
index fe5d2baaf..42ddb93fa 100644
--- a/web/app/pages/Landings/Startups.tsx
+++ b/web/app/pages/Landings/Startups.tsx
@@ -2,19 +2,19 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from 'lib/constants'
-import routesPath from 'utils/routes'
+import { StateType } from '~/lib/store'
+import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from '~/lib/constants'
+import routesPath from '~/utils/routes'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
-import Header from 'components/Header'
-import { getAccessToken } from 'utils/accessToken'
+import Header from '~/components/Header'
+import { getAccessToken } from '~/utils/accessToken'
import _map from 'lodash/map'
-import { ComparisonTable } from 'components/marketing/ComparisonTable'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
+import { ComparisonTable } from '~/components/marketing/ComparisonTable'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
interface LoaderProps {
theme: 'dark' | 'light'
diff --git a/web/app/pages/NotFound/index.tsx b/web/app/pages/NotFound/index.tsx
index ddf2d0e91..a591d7fba 100644
--- a/web/app/pages/NotFound/index.tsx
+++ b/web/app/pages/NotFound/index.tsx
@@ -2,8 +2,8 @@ import React from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
-import routes from 'utils/routes'
-import { isSelfhosted } from 'lib/constants'
+import routes from '~/utils/routes'
+import { isSelfhosted } from '~/lib/constants'
const CONTACT_US_URL = `https://swetrix.com${routes.contact}`
diff --git a/web/app/pages/OpenStartup/index.tsx b/web/app/pages/OpenStartup/index.tsx
index 48a52bbad..479dadd10 100644
--- a/web/app/pages/OpenStartup/index.tsx
+++ b/web/app/pages/OpenStartup/index.tsx
@@ -5,9 +5,9 @@ import { useTranslation, Trans } from 'react-i18next'
import { Link } from '@remix-run/react'
import { useSelector } from 'react-redux'
-import { nFormatterSeparated } from 'utils/generic'
-import { StateType } from 'lib/store/index'
-import { LIVE_DEMO_URL } from 'lib/constants'
+import { nFormatterSeparated } from '~/utils/generic'
+import { StateType } from '~/lib/store/index'
+import { LIVE_DEMO_URL } from '~/lib/constants'
// This should be generated on the API side, will be done later.
// MRR taken from Profitwell dashboard
diff --git a/web/app/pages/Organisations/OrganisationCard.tsx b/web/app/pages/Organisations/OrganisationCard.tsx
index 82fadee27..de65504ae 100644
--- a/web/app/pages/Organisations/OrganisationCard.tsx
+++ b/web/app/pages/Organisations/OrganisationCard.tsx
@@ -9,15 +9,15 @@ import _map from 'lodash/map'
import { useTranslation } from 'react-i18next'
import cx from 'clsx'
-import Modal from 'ui/Modal'
-import { Badge, BadgeProps } from 'ui/Badge'
-import routes from 'utils/routes'
+import Modal from '~/ui/Modal'
+import { Badge, BadgeProps } from '~/ui/Badge'
+import routes from '~/utils/routes'
-import { DetailedOrganisation } from 'lib/models/Organisation'
+import { DetailedOrganisation } from '~/lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'lib/store'
-import { acceptOrganisationInvitation } from 'api'
-import { authActions } from 'lib/reducers/auth'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { acceptOrganisationInvitation } from '~/api'
+import { authActions } from '~/lib/reducers/auth'
interface OrganisationCardProps {
organisation: DetailedOrganisation
diff --git a/web/app/pages/Organisations/Organisations.tsx b/web/app/pages/Organisations/Organisations.tsx
index e0d148564..43f56c21d 100644
--- a/web/app/pages/Organisations/Organisations.tsx
+++ b/web/app/pages/Organisations/Organisations.tsx
@@ -9,24 +9,24 @@ import { useTranslation } from 'react-i18next'
import { MagnifyingGlassIcon, XMarkIcon, BuildingOffice2Icon } from '@heroicons/react/24/outline'
import { XCircleIcon } from '@heroicons/react/24/solid'
-import Modal from 'ui/Modal'
-import { withAuthentication, auth } from 'hoc/protected'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
-import { ENTRIES_PER_PAGE_DASHBOARD } from 'lib/constants'
-import EventsRunningOutBanner from 'components/EventsRunningOutBanner'
-import useDebounce from 'hooks/useDebounce'
+import Modal from '~/ui/Modal'
+import { withAuthentication, auth } from '~/hoc/protected'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
+import { ENTRIES_PER_PAGE_DASHBOARD } from '~/lib/constants'
+import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
+import useDebounce from '~/hooks/useDebounce'
-import { createOrganisation, getOrganisations } from 'api'
+import { createOrganisation, getOrganisations } from '~/api'
-import Pagination from 'ui/Pagination'
-import { DetailedOrganisation } from 'lib/models/Organisation'
-import Input from 'ui/Input'
+import Pagination from '~/ui/Pagination'
+import { DetailedOrganisation } from '~/lib/models/Organisation'
+import Input from '~/ui/Input'
import { OrganisationCard } from './OrganisationCard'
import { NoOrganisations } from './NoOrganisations'
import { AddOrganisation } from './AddOrganisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
const Organisations = () => {
const { loading: authLoading } = useSelector((state: StateType) => state.auth)
diff --git a/web/app/pages/Organisations/Settings/People.tsx b/web/app/pages/Organisations/Settings/People.tsx
index 8316fdce9..542dc56c4 100644
--- a/web/app/pages/Organisations/Settings/People.tsx
+++ b/web/app/pages/Organisations/Settings/People.tsx
@@ -9,17 +9,17 @@ import _keys from 'lodash/keys'
import _isEmpty from 'lodash/isEmpty'
import _map from 'lodash/map'
-import { isValidEmail } from 'utils/validator'
-import Input from 'ui/Input'
-import { Badge } from 'ui/Badge'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import { roles, INVITATION_EXPIRES_IN } from 'lib/constants'
-import useOnClickOutside from 'hooks/useOnClickOutside'
-import { DetailedOrganisation, Role } from 'lib/models/Organisation'
+import { isValidEmail } from '~/utils/validator'
+import Input from '~/ui/Input'
+import { Badge } from '~/ui/Badge'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import { roles, INVITATION_EXPIRES_IN } from '~/lib/constants'
+import useOnClickOutside from '~/hooks/useOnClickOutside'
+import { DetailedOrganisation, Role } from '~/lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import { changeOrganisationRole, inviteOrganisationMember, removeOrganisationMember } from 'api'
+import { StateType } from '~/lib/store'
+import { changeOrganisationRole, inviteOrganisationMember, removeOrganisationMember } from '~/api'
const NoPeople = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Organisations/Settings/Projects.tsx b/web/app/pages/Organisations/Settings/Projects.tsx
index 19e2f3006..8c4bf8167 100644
--- a/web/app/pages/Organisations/Settings/Projects.tsx
+++ b/web/app/pages/Organisations/Settings/Projects.tsx
@@ -7,19 +7,19 @@ import _replace from 'lodash/replace'
import _map from 'lodash/map'
import _filter from 'lodash/filter'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import { DetailedOrganisation } from 'lib/models/Organisation'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import { DetailedOrganisation } from '~/lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import Tooltip from 'ui/Tooltip'
-import { removeProjectFromOrganisation, getProjectsAvailableForOrganisation, addProjectToOrganisation } from 'api'
+import { StateType } from '~/lib/store'
+import Tooltip from '~/ui/Tooltip'
+import { removeProjectFromOrganisation, getProjectsAvailableForOrganisation, addProjectToOrganisation } from '~/api'
import { Link } from '@remix-run/react'
-import routes from 'utils/routes'
-import Loader from 'ui/Loader'
-import Pagination from 'ui/Pagination'
-import useDebounce from 'hooks/useDebounce'
-import { Project } from 'lib/models/Project'
+import routes from '~/utils/routes'
+import Loader from '~/ui/Loader'
+import Pagination from '~/ui/Pagination'
+import useDebounce from '~/hooks/useDebounce'
+import { Project } from '~/lib/models/Project'
interface SelectAProjectProps {
onSelect: (project: Project) => void
diff --git a/web/app/pages/Organisations/Settings/index.tsx b/web/app/pages/Organisations/Settings/index.tsx
index 44fc9e571..5b84c91cb 100644
--- a/web/app/pages/Organisations/Settings/index.tsx
+++ b/web/app/pages/Organisations/Settings/index.tsx
@@ -6,19 +6,19 @@ import _isEmpty from 'lodash/isEmpty'
import _size from 'lodash/size'
import _keys from 'lodash/keys'
-import { withAuthentication, auth } from 'hoc/protected'
-import { TITLE_SUFFIX } from 'lib/constants'
-import { transferProject, getOrganisation, updateOrganisation, deleteOrganisation } from 'api'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Loader from 'ui/Loader'
-import Modal from 'ui/Modal'
-import routes from 'utils/routes'
+import { withAuthentication, auth } from '~/hoc/protected'
+import { TITLE_SUFFIX } from '~/lib/constants'
+import { transferProject, getOrganisation, updateOrganisation, deleteOrganisation } from '~/api'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Loader from '~/ui/Loader'
+import Modal from '~/ui/Modal'
+import routes from '~/utils/routes'
import People from './People'
-import { useRequiredParams } from 'hooks/useRequiredParams'
-import { DetailedOrganisation } from 'lib/models/Organisation'
-import { StateType } from 'lib/store'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
+import { DetailedOrganisation } from '~/lib/models/Organisation'
+import { StateType } from '~/lib/store'
import { useSelector } from 'react-redux'
import { Projects } from './Projects'
import { TrashIcon, XCircleIcon } from '@heroicons/react/24/outline'
diff --git a/web/app/pages/Performance/index.tsx b/web/app/pages/Performance/index.tsx
index bd04ceb50..5d54d3d0c 100644
--- a/web/app/pages/Performance/index.tsx
+++ b/web/app/pages/Performance/index.tsx
@@ -8,16 +8,16 @@ import { ArrowRightIcon } from '@heroicons/react/20/solid'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
-import routesPath from 'utils/routes'
-import { getAccessToken } from 'utils/accessToken'
-import { nFormatterSeparated } from 'utils/generic'
-import { PERFORMANCE_LIVE_DEMO_URL, isBrowser } from 'lib/constants'
-import { StateType } from 'lib/store/index'
-import BackgroundSvg from 'ui/icons/BackgroundSvg'
+import routesPath from '~/utils/routes'
+import { getAccessToken } from '~/utils/accessToken'
+import { nFormatterSeparated } from '~/utils/generic'
+import { PERFORMANCE_LIVE_DEMO_URL, isBrowser } from '~/lib/constants'
+import { StateType } from '~/lib/store/index'
+import BackgroundSvg from '~/ui/icons/BackgroundSvg'
-import Header from 'components/Header'
+import Header from '~/components/Header'
import Pricing from '../../components/marketing/Pricing'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
const Lines = () => (
<div className='pointer-events-none relative'>
diff --git a/web/app/pages/Press/index.tsx b/web/app/pages/Press/index.tsx
index 9160cb155..e5b5291d6 100644
--- a/web/app/pages/Press/index.tsx
+++ b/web/app/pages/Press/index.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import { Link } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
const FONT_INTER_URL = 'https://rsms.me/inter/'
const FONT_NAME = 'Inter'
diff --git a/web/app/pages/Privacy/index.tsx b/web/app/pages/Privacy/index.tsx
index 431c667d3..3a627b809 100644
--- a/web/app/pages/Privacy/index.tsx
+++ b/web/app/pages/Privacy/index.tsx
@@ -2,7 +2,7 @@
import React from 'react'
import _map from 'lodash/map'
-import { CONTACT_EMAIL, SECURITY_EMAIL, DOCS_URL } from 'lib/constants'
+import { CONTACT_EMAIL, SECURITY_EMAIL, DOCS_URL } from '~/lib/constants'
const serviceProviders: {
company: string
diff --git a/web/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx b/web/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
index b8c74d80d..e41339ce6 100644
--- a/web/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
+++ b/web/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
@@ -13,20 +13,20 @@ import _values from 'lodash/values'
import _findKey from 'lodash/findKey'
import _toNumber from 'lodash/toNumber'
import { clsx as cx } from 'clsx'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Checkbox from 'ui/Checkbox'
-import Modal from 'ui/Modal'
-import { PROJECT_TABS, QUERY_CONDITION, QUERY_METRIC, QUERY_TIME } from 'lib/constants'
-import { createAlert, updateAlert, deleteAlert, CreateAlert, getAlert } from 'api'
-import { withAuthentication, auth } from 'hoc/protected'
-import routes from 'utils/routes'
-import Select from 'ui/Select'
-import { Alerts } from 'lib/models/Alerts'
-import { StateType } from 'lib/store'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Checkbox from '~/ui/Checkbox'
+import Modal from '~/ui/Modal'
+import { PROJECT_TABS, QUERY_CONDITION, QUERY_METRIC, QUERY_TIME } from '~/lib/constants'
+import { createAlert, updateAlert, deleteAlert, CreateAlert, getAlert } from '~/api'
+import { withAuthentication, auth } from '~/hoc/protected'
+import routes from '~/utils/routes'
+import Select from '~/ui/Select'
+import { Alerts } from '~/lib/models/Alerts'
+import { StateType } from '~/lib/store'
import { useSelector } from 'react-redux'
-import { useRequiredParams } from 'hooks/useRequiredParams'
-import Loader from 'ui/Loader'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
+import Loader from '~/ui/Loader'
const INTEGRATIONS_LINK = `${routes.user_settings}#integrations`
diff --git a/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx b/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
index 449677a36..87ab2d095 100644
--- a/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
+++ b/web/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
@@ -19,16 +19,16 @@ import {
XCircleIcon,
} from '@heroicons/react/24/outline'
-import routes from 'utils/routes'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import PaidFeature from 'modals/PaidFeature'
-import { QUERY_METRIC, PLAN_LIMITS, DEFAULT_ALERTS_TAKE } from 'lib/constants'
-import { deleteAlert as deleteAlertApi, getProjectAlerts } from 'api'
-import { StateType } from 'lib/store'
-import { Alerts } from 'lib/models/Alerts'
-import Loader from 'ui/Loader'
-import Pagination from 'ui/Pagination'
+import routes from '~/utils/routes'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import PaidFeature from '~/modals/PaidFeature'
+import { QUERY_METRIC, PLAN_LIMITS, DEFAULT_ALERTS_TAKE } from '~/lib/constants'
+import { deleteAlert as deleteAlertApi, getProjectAlerts } from '~/api'
+import { StateType } from '~/lib/store'
+import { Alerts } from '~/lib/models/Alerts'
+import Loader from '~/ui/Loader'
+import Pagination from '~/ui/Pagination'
const Separator = () => (
<svg viewBox='0 0 2 2' className='h-0.5 w-0.5 flex-none fill-gray-400'>
diff --git a/web/app/pages/Project/ConfirmShare/index.tsx b/web/app/pages/Project/ConfirmShare/index.tsx
index 8f4aacb69..97114eb45 100644
--- a/web/app/pages/Project/ConfirmShare/index.tsx
+++ b/web/app/pages/Project/ConfirmShare/index.tsx
@@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _split from 'lodash/split'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
-import { verifyShare } from 'api'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
+import { verifyShare } from '~/api'
const ConfirmShare = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Project/New/index.tsx b/web/app/pages/Project/New/index.tsx
index 281968e01..31d66950f 100644
--- a/web/app/pages/Project/New/index.tsx
+++ b/web/app/pages/Project/New/index.tsx
@@ -7,17 +7,17 @@ import _isEmpty from 'lodash/isEmpty'
import _size from 'lodash/size'
import _keys from 'lodash/keys'
-import { withAuthentication, auth } from 'hoc/protected'
-import { isSelfhosted, TITLE_SUFFIX } from 'lib/constants'
-import { Project } from 'lib/models/Project'
-import { createProject } from 'api'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Loader from 'ui/Loader'
-import { trackCustom } from 'utils/analytics'
-import routes from 'utils/routes'
-import { useAppDispatch, StateType } from 'lib/store'
-import Select from 'ui/Select'
+import { withAuthentication, auth } from '~/hoc/protected'
+import { isSelfhosted, TITLE_SUFFIX } from '~/lib/constants'
+import { Project } from '~/lib/models/Project'
+import { createProject } from '~/api'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Loader from '~/ui/Loader'
+import { trackCustom } from '~/utils/analytics'
+import routes from '~/utils/routes'
+import { useAppDispatch, StateType } from '~/lib/store'
+import Select from '~/ui/Select'
const MAX_NAME_LENGTH = 50
diff --git a/web/app/pages/Project/ProjectProtectedPassword/index.tsx b/web/app/pages/Project/ProjectProtectedPassword/index.tsx
index cb803d7e1..c85a570fd 100644
--- a/web/app/pages/Project/ProjectProtectedPassword/index.tsx
+++ b/web/app/pages/Project/ProjectProtectedPassword/index.tsx
@@ -6,15 +6,15 @@ import _isEmpty from 'lodash/isEmpty'
import _size from 'lodash/size'
import _replace from 'lodash/replace'
-import routes from 'utils/routes'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import { checkPassword } from 'api'
+import routes from '~/utils/routes'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import { checkPassword } from '~/api'
import { useDispatch } from 'react-redux'
-import UIActions from 'lib/reducers/ui'
-import Header from 'components/Header'
-import Footer from 'components/Footer'
-import { useRequiredParams } from 'hooks/useRequiredParams'
+import UIActions from '~/lib/reducers/ui'
+import Header from '~/components/Header'
+import Footer from '~/components/Footer'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
interface ProjectProtectedPasswordForm {
password: string
diff --git a/web/app/pages/Project/Settings/Emails/ConfirmReportsShare/index.tsx b/web/app/pages/Project/Settings/Emails/ConfirmReportsShare/index.tsx
index 49c531704..8b49dc7c5 100644
--- a/web/app/pages/Project/Settings/Emails/ConfirmReportsShare/index.tsx
+++ b/web/app/pages/Project/Settings/Emails/ConfirmReportsShare/index.tsx
@@ -3,10 +3,10 @@ import { useParams, Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
-import Loader from 'ui/Loader'
+import Loader from '~/ui/Loader'
-import { confirmSubscriberInvite } from 'api'
-import routes from 'utils/routes'
+import { confirmSubscriberInvite } from '~/api'
+import routes from '~/utils/routes'
const ConfirmReportsShare = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Project/Settings/Emails/Emails.tsx b/web/app/pages/Project/Settings/Emails/Emails.tsx
index 027940bec..c2a61e4b9 100644
--- a/web/app/pages/Project/Settings/Emails/Emails.tsx
+++ b/web/app/pages/Project/Settings/Emails/Emails.tsx
@@ -9,19 +9,19 @@ import _filter from 'lodash/filter'
import _map from 'lodash/map'
import _toLower from 'lodash/toLower'
-import { addSubscriber, removeSubscriber, getSubscribers, updateSubscriber } from 'api'
+import { addSubscriber, removeSubscriber, getSubscribers, updateSubscriber } from '~/api'
-import { isValidEmail } from 'utils/validator'
-import useOnClickOutside from 'hooks/useOnClickOutside'
-import { reportFrequencyForEmailsOptions } from 'lib/constants'
+import { isValidEmail } from '~/utils/validator'
+import useOnClickOutside from '~/hooks/useOnClickOutside'
+import { reportFrequencyForEmailsOptions } from '~/lib/constants'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import Loader from 'ui/Loader'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import Loader from '~/ui/Loader'
import cx from 'clsx'
-import { Badge } from 'ui/Badge'
-import { Subscriber } from 'lib/models/Subscriber'
+import { Badge } from '~/ui/Badge'
+import { Subscriber } from '~/lib/models/Subscriber'
interface ModalMessageProps {
handleInput: (e: React.ChangeEvent<HTMLInputElement>) => void
diff --git a/web/app/pages/Project/Settings/People/People.tsx b/web/app/pages/Project/Settings/People/People.tsx
index 2c5b9fe3a..bb0ff91e8 100644
--- a/web/app/pages/Project/Settings/People/People.tsx
+++ b/web/app/pages/Project/Settings/People/People.tsx
@@ -9,19 +9,19 @@ import _keys from 'lodash/keys'
import _isEmpty from 'lodash/isEmpty'
import _map from 'lodash/map'
-import { deleteShareProjectUsers, shareProject, changeShareRole } from 'api'
-import { isValidEmail } from 'utils/validator'
-import Input from 'ui/Input'
-import { Badge } from 'ui/Badge'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import PaidFeature from 'modals/PaidFeature'
-import { roles, INVITATION_EXPIRES_IN } from 'lib/constants'
-import useOnClickOutside from 'hooks/useOnClickOutside'
-import { Project, ShareOwnerProject } from 'lib/models/Project'
-import { Role } from 'lib/models/Organisation'
+import { deleteShareProjectUsers, shareProject, changeShareRole } from '~/api'
+import { isValidEmail } from '~/utils/validator'
+import Input from '~/ui/Input'
+import { Badge } from '~/ui/Badge'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import PaidFeature from '~/modals/PaidFeature'
+import { roles, INVITATION_EXPIRES_IN } from '~/lib/constants'
+import useOnClickOutside from '~/hooks/useOnClickOutside'
+import { Project, ShareOwnerProject } from '~/lib/models/Project'
+import { Role } from '~/lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
const NoPeople = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Project/Settings/ProjectSettings.tsx b/web/app/pages/Project/Settings/ProjectSettings.tsx
index ab423c131..e9456f214 100644
--- a/web/app/pages/Project/Settings/ProjectSettings.tsx
+++ b/web/app/pages/Project/Settings/ProjectSettings.tsx
@@ -17,9 +17,9 @@ import _toUpper from 'lodash/toUpper'
import _includes from 'lodash/includes'
import { TrashIcon, XCircleIcon } from '@heroicons/react/24/outline'
-import { withAuthentication, auth } from 'hoc/protected'
-import { isSelfhosted, TITLE_SUFFIX, FILTERS_PANELS_ORDER, isBrowser } from 'lib/constants'
-import { Project } from 'lib/models/Project'
+import { withAuthentication, auth } from '~/hoc/protected'
+import { isSelfhosted, TITLE_SUFFIX, FILTERS_PANELS_ORDER, isBrowser } from '~/lib/constants'
+import { Project } from '~/lib/models/Project'
import {
updateProject,
deleteProject,
@@ -30,26 +30,26 @@ import {
resetFilters,
getProject,
assignProjectToOrganisation,
-} from 'api'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Loader from 'ui/Loader'
-import Checkbox from 'ui/Checkbox'
-import Modal from 'ui/Modal'
-import FlatPicker from 'ui/Flatpicker'
-import countries from 'utils/isoCountries'
-import routes from 'utils/routes'
-import Dropdown from 'ui/Dropdown'
-import MultiSelect from 'ui/MultiSelect'
+} from '~/api'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Loader from '~/ui/Loader'
+import Checkbox from '~/ui/Checkbox'
+import Modal from '~/ui/Modal'
+import FlatPicker from '~/ui/Flatpicker'
+import countries from '~/utils/isoCountries'
+import routes from '~/utils/routes'
+import Dropdown from '~/ui/Dropdown'
+import MultiSelect from '~/ui/MultiSelect'
import CCRow from '../View/components/CCRow'
import { getFormatDate } from '../View/ViewProject.helpers'
import People from './People'
import Emails from './Emails'
-import Select from 'ui/Select'
-import { useRequiredParams } from 'hooks/useRequiredParams'
+import Select from '~/ui/Select'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
import { ArrowLeftRight, RotateCcw } from 'lucide-react'
-import { StateType } from 'lib/store'
+import { StateType } from '~/lib/store'
import { useSelector } from 'react-redux'
const MAX_NAME_LENGTH = 50
diff --git a/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx b/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
index a695828f2..9a85ffc12 100644
--- a/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
+++ b/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
@@ -3,10 +3,10 @@ import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
-import Loader from 'ui/Loader'
+import Loader from '~/ui/Loader'
-import { confirmTransferProject } from 'api'
-import routes from 'utils/routes'
+import { confirmTransferProject } from '~/api'
+import routes from '~/utils/routes'
const TransferProjectConfirm = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx b/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
index 0077f3839..28a709722 100644
--- a/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
+++ b/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
@@ -3,10 +3,10 @@ import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { XCircleIcon, InformationCircleIcon } from '@heroicons/react/24/solid'
-import Loader from 'ui/Loader'
+import Loader from '~/ui/Loader'
-import { rejectTransferProject } from 'api'
-import routes from 'utils/routes'
+import { rejectTransferProject } from '~/api'
+import routes from '~/utils/routes'
const TransferProjectReject = () => {
const { t } = useTranslation('common')
diff --git a/web/app/pages/Project/View/Panels.tsx b/web/app/pages/Project/View/Panels.tsx
index c6680c962..235786b2d 100644
--- a/web/app/pages/Project/View/Panels.tsx
+++ b/web/app/pages/Project/View/Panels.tsx
@@ -33,18 +33,18 @@ import _fromPairs from 'lodash/fromPairs'
import _toPairs from 'lodash/toPairs'
import _reverse from 'lodash/reverse'
-import { nFormatter } from 'utils/generic'
-import Progress from 'ui/Progress'
-import Sort from 'ui/icons/Sort'
-import Modal from 'ui/Modal'
-import Button from 'ui/Button'
-import Chart from 'ui/Chart'
-import { PROJECT_TABS } from 'lib/constants'
-import { Entry } from 'lib/models/Entry'
+import { nFormatter } from '~/utils/generic'
+import Progress from '~/ui/Progress'
+import Sort from '~/ui/icons/Sort'
+import Modal from '~/ui/Modal'
+import Button from '~/ui/Button'
+import Chart from '~/ui/Chart'
+import { PROJECT_TABS } from '~/lib/constants'
+import { Entry } from '~/lib/models/Entry'
import InteractiveMap from './components/InteractiveMap'
import UserFlow from './components/UserFlow'
import { iconClassName } from './ViewProject.helpers'
-import Spin from 'ui/icons/Spin'
+import Spin from '~/ui/icons/Spin'
import { useTranslation } from 'react-i18next'
import CustomEventsDropdown from './components/CustomEventsDropdown'
import { Customs, Filter, Properties } from './interfaces/traffic'
diff --git a/web/app/pages/Project/View/ViewProject.helpers.tsx b/web/app/pages/Project/View/ViewProject.helpers.tsx
index 6f7eff3d8..58e255697 100644
--- a/web/app/pages/Project/View/ViewProject.helpers.tsx
+++ b/web/app/pages/Project/View/ViewProject.helpers.tsx
@@ -41,11 +41,11 @@ import {
tbsFormatMapperTooltip24h,
PROJECT_TABS,
isSelfhosted,
-} from 'lib/constants'
-import { Entry } from 'lib/models/Entry'
-import { getTimeFromSeconds, getStringFromTime, sumArrays, nFormatter } from 'utils/generic'
-import countries from 'utils/isoCountries'
-import { AnalyticsFunnel } from 'lib/models/Project'
+} from '~/lib/constants'
+import { Entry } from '~/lib/models/Entry'
+import { getTimeFromSeconds, getStringFromTime, sumArrays, nFormatter } from '~/utils/generic'
+import countries from '~/utils/isoCountries'
+import { AnalyticsFunnel } from '~/lib/models/Project'
const getAvg = (arr: any) => {
const total = _reduce(arr, (acc, c) => acc + c, 0)
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsx
index 2f23a67fc..6f4d8fc00 100644
--- a/web/app/pages/Project/View/ViewProject.tsx
+++ b/web/app/pages/Project/View/ViewProject.tsx
@@ -11,7 +11,7 @@ import React, {
Dispatch,
} from 'react'
import { ClientOnly } from 'remix-utils/client-only'
-import useSize from 'hooks/useSize'
+import useSize from '~/hooks/useSize'
import { useNavigate, Link, useSearchParams, useLoaderData } from '@remix-run/react'
import bb from 'billboard.js'
import {
@@ -59,11 +59,11 @@ import _truncate from 'lodash/truncate'
import _isString from 'lodash/isString'
import { toast } from 'sonner'
-import { periodToCompareDate } from 'utils/compareConvertDate'
+import { periodToCompareDate } from '~/utils/compareConvertDate'
-import { getTimeFromSeconds, getStringFromTime, getLocaleDisplayName, nLocaleFormatter } from 'utils/generic'
-import { getItem, setItem, removeItem } from 'utils/localstorage'
-import EventsRunningOutBanner from 'components/EventsRunningOutBanner'
+import { getTimeFromSeconds, getStringFromTime, getLocaleDisplayName, nLocaleFormatter } from '~/utils/generic'
+import { getItem, setItem, removeItem } from '~/utils/localstorage'
+import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
import {
tbPeriodPairs,
LIVE_VISITORS_UPDATE_INTERVAL,
@@ -95,23 +95,23 @@ import {
ERROR_PERIOD_PAIRS,
FUNNELS_PERIOD_PAIRS,
ThemeType,
-} from 'lib/constants'
-import { Project, Funnel, AnalyticsFunnel, OverallObject, OverallPerformanceObject } from 'lib/models/Project'
-import { CountryEntry } from 'lib/models/Entry'
-import Loader from 'ui/Loader'
-import Dropdown from 'ui/Dropdown'
-import Checkbox from 'ui/Checkbox'
-import Select from 'ui/Select'
-import FlatPicker from 'ui/Flatpicker'
-import Robot from 'ui/icons/Robot'
-import LineChart from 'ui/icons/LineChart'
-import BarChart from 'ui/icons/BarChart'
-import Forecast from 'modals/Forecast'
-import NewFunnel from 'modals/NewFunnel'
-import ViewProjectHotkeys from 'modals/ViewProjectHotkeys'
-import routes from 'utils/routes'
-import Header from 'components/Header'
-import Footer from 'components/Footer'
+} from '~/lib/constants'
+import { Project, Funnel, AnalyticsFunnel, OverallObject, OverallPerformanceObject } from '~/lib/models/Project'
+import { CountryEntry } from '~/lib/models/Entry'
+import Loader from '~/ui/Loader'
+import Dropdown from '~/ui/Dropdown'
+import Checkbox from '~/ui/Checkbox'
+import Select from '~/ui/Select'
+import FlatPicker from '~/ui/Flatpicker'
+import Robot from '~/ui/icons/Robot'
+import LineChart from '~/ui/icons/LineChart'
+import BarChart from '~/ui/icons/BarChart'
+import Forecast from '~/modals/Forecast'
+import NewFunnel from '~/modals/NewFunnel'
+import ViewProjectHotkeys from '~/modals/ViewProjectHotkeys'
+import routes from '~/utils/routes'
+import Header from '~/components/Header'
+import Footer from '~/components/Footer'
import {
getProjectData,
getProject,
@@ -138,8 +138,8 @@ import {
getProjectViews,
deleteProjectView,
getDetailsPrediction,
-} from 'api'
-import { getChartPrediction } from 'api/ai'
+} from '~/api'
+import { getChartPrediction } from '~/api/ai'
import { Panel, Metadata } from './Panels'
import {
onCSVExportClick,
@@ -197,7 +197,7 @@ import {
Properties,
TrafficLogResponse,
} from './interfaces/traffic'
-import { trackCustom } from 'utils/analytics'
+import { trackCustom } from '~/utils/analytics'
import {
handleNavigationParams,
updateFilterState,
@@ -211,11 +211,11 @@ import {
import AddAViewModal from './components/AddAViewModal'
import CustomMetrics from './components/CustomMetrics'
import { AIProcessedResponse, AIResponse } from './interfaces/ai'
-import { useRequiredParams } from 'hooks/useRequiredParams'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
import BrowserDropdown from './components/BrowserDropdown'
import OSDropdown from './components/OSDropdown'
-import { StateType, useAppDispatch } from 'lib/store'
-import UIActions from 'lib/reducers/ui'
+import { StateType, useAppDispatch } from '~/lib/store'
+import UIActions from '~/lib/reducers/ui'
import { useSelector } from 'react-redux'
const SwetrixSDK = require('@swetrix/sdk')
diff --git a/web/app/pages/Project/View/components/AddAViewModal.tsx b/web/app/pages/Project/View/components/AddAViewModal.tsx
index 8dc2fb5b3..34f73bc2f 100644
--- a/web/app/pages/Project/View/components/AddAViewModal.tsx
+++ b/web/app/pages/Project/View/components/AddAViewModal.tsx
@@ -8,14 +8,14 @@ import _find from 'lodash/find'
import _size from 'lodash/size'
import { toast } from 'sonner'
-import Modal from 'ui/Modal'
-import Select from 'ui/Select'
-import Combobox from 'ui/Combobox'
-import { FILTERS_PANELS_ORDER } from 'lib/constants'
-import countries from 'utils/isoCountries'
-import { getFilters, createProjectView, updateProjectView } from 'api'
+import Modal from '~/ui/Modal'
+import Select from '~/ui/Select'
+import Combobox from '~/ui/Combobox'
+import { FILTERS_PANELS_ORDER } from '~/lib/constants'
+import countries from '~/utils/isoCountries'
+import { getFilters, createProjectView, updateProjectView } from '~/api'
import { Filter } from './Filters'
-import Input from 'ui/Input'
+import Input from '~/ui/Input'
import {
Filter as FilterType,
ProjectView,
diff --git a/web/app/pages/Project/View/components/CCRow.tsx b/web/app/pages/Project/View/components/CCRow.tsx
index 485c26ff9..a6b744298 100644
--- a/web/app/pages/Project/View/components/CCRow.tsx
+++ b/web/app/pages/Project/View/components/CCRow.tsx
@@ -1,7 +1,7 @@
import React, { memo } from 'react'
import _fill from 'lodash/fill'
-import countries from 'utils/isoCountries'
-import Flag from 'ui/Flag'
+import countries from '~/utils/isoCountries'
+import Flag from '~/ui/Flag'
interface CCRowProps {
cc: string
diff --git a/web/app/pages/Project/View/components/ErrorDetails.tsx b/web/app/pages/Project/View/components/ErrorDetails.tsx
index d486ee8e7..4a4ec54a3 100644
--- a/web/app/pages/Project/View/components/ErrorDetails.tsx
+++ b/web/app/pages/Project/View/components/ErrorDetails.tsx
@@ -2,8 +2,8 @@ import React, { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { SwetrixErrorDetails } from '../interfaces/error'
import { MetricCard } from './MetricCards'
-import { getRelativeDateIfPossible } from 'utils/date'
-import Tooltip from 'ui/Tooltip'
+import { getRelativeDateIfPossible } from '~/utils/date'
+import Tooltip from '~/ui/Tooltip'
interface ErrorDetailsProps {
details: SwetrixErrorDetails
diff --git a/web/app/pages/Project/View/components/Errors.tsx b/web/app/pages/Project/View/components/Errors.tsx
index 7a7ce4692..b11475596 100644
--- a/web/app/pages/Project/View/components/Errors.tsx
+++ b/web/app/pages/Project/View/components/Errors.tsx
@@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import cx from 'clsx'
import { ChevronRightIcon } from '@heroicons/react/24/outline'
-import Loader from 'ui/Loader'
+import Loader from '~/ui/Loader'
import { SwetrixError } from '../interfaces/error'
-import { getRelativeDateIfPossible } from 'utils/date'
-import { Badge } from 'ui/Badge'
+import { getRelativeDateIfPossible } from '~/utils/date'
+import { Badge } from '~/ui/Badge'
interface ErrorsProps {
errors: SwetrixError[]
diff --git a/web/app/pages/Project/View/components/Filters.tsx b/web/app/pages/Project/View/components/Filters.tsx
index 2f695e65a..e2e282ccd 100644
--- a/web/app/pages/Project/View/components/Filters.tsx
+++ b/web/app/pages/Project/View/components/Filters.tsx
@@ -8,8 +8,8 @@ import _startsWith from 'lodash/startsWith'
import _replace from 'lodash/replace'
import { useTranslation } from 'react-i18next'
-import countries from 'utils/isoCountries'
-import { getLocaleDisplayName } from 'utils/generic'
+import countries from '~/utils/isoCountries'
+import { getLocaleDisplayName } from '~/utils/generic'
import { useViewProjectContext } from '../ViewProject'
interface FilterProps {
diff --git a/web/app/pages/Project/View/components/FunnelsList.tsx b/web/app/pages/Project/View/components/FunnelsList.tsx
index a0ac4dff8..73a219efe 100644
--- a/web/app/pages/Project/View/components/FunnelsList.tsx
+++ b/web/app/pages/Project/View/components/FunnelsList.tsx
@@ -3,7 +3,7 @@ import _map from 'lodash/map'
import cx from 'clsx'
import { useTranslation } from 'react-i18next'
import { AdjustmentsVerticalIcon, PlusCircleIcon, TrashIcon } from '@heroicons/react/24/outline'
-import { Funnel } from 'lib/models/Project'
+import { Funnel } from '~/lib/models/Project'
interface FunnelsListProps {
funnels?: any[]
diff --git a/web/app/pages/Project/View/components/InteractiveMap.tsx b/web/app/pages/Project/View/components/InteractiveMap.tsx
index 83cd43042..4b626c032 100644
--- a/web/app/pages/Project/View/components/InteractiveMap.tsx
+++ b/web/app/pages/Project/View/components/InteractiveMap.tsx
@@ -3,12 +3,12 @@ import cx from 'clsx'
import _map from 'lodash/map'
import _reduce from 'lodash/reduce'
import { useTranslation } from 'react-i18next'
-import countries from 'utils/isoCountries'
-import { PROJECT_TABS } from 'lib/constants'
-import { getTimeFromSeconds, getStringFromTime, nFormatter } from 'utils/generic'
+import countries from '~/utils/isoCountries'
+import { PROJECT_TABS } from '~/lib/constants'
+import { getTimeFromSeconds, getStringFromTime, nFormatter } from '~/utils/generic'
-import { Entry } from 'lib/models/Entry'
-import countriesList from 'utils/countries'
+import { Entry } from '~/lib/models/Entry'
+import countriesList from '~/utils/countries'
import { useSearchParams } from '@remix-run/react'
import { useViewProjectContext } from '../ViewProject'
diff --git a/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx b/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
index cbb3bcede..6083a2e8f 100644
--- a/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
+++ b/web/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
@@ -4,12 +4,12 @@ import { useTranslation } from 'react-i18next'
import OutsideClickHandler from 'react-outside-click-handler'
import { ChevronDownIcon, ChevronUpIcon, XMarkIcon } from '@heroicons/react/24/outline'
-import { getLiveVisitorsInfo, GetLiveVisitorsInfo } from 'api'
-import PulsatingCircle from 'ui/icons/PulsatingCircle'
-import Flag from 'ui/Flag'
+import { getLiveVisitorsInfo, GetLiveVisitorsInfo } from '~/api'
+import PulsatingCircle from '~/ui/icons/PulsatingCircle'
+import Flag from '~/ui/Flag'
import { useViewProjectContext } from '../ViewProject'
import { Link } from '@remix-run/react'
-import { PROJECT_TABS } from 'lib/constants'
+import { PROJECT_TABS } from '~/lib/constants'
interface LiveVisitorsDropdownProps {
live: number | string
diff --git a/web/app/pages/Project/View/components/LockedDashboard.tsx b/web/app/pages/Project/View/components/LockedDashboard.tsx
index cd0093f89..0858e2747 100644
--- a/web/app/pages/Project/View/components/LockedDashboard.tsx
+++ b/web/app/pages/Project/View/components/LockedDashboard.tsx
@@ -1,10 +1,10 @@
import React, { useMemo } from 'react'
import { LockClosedIcon } from '@heroicons/react/24/outline'
import { Link } from '@remix-run/react'
-import { User, DashboardBlockReason } from 'lib/models/User'
-import { ProjectForShared } from 'lib/models/SharedProject'
+import { User, DashboardBlockReason } from '~/lib/models/User'
+import { ProjectForShared } from '~/lib/models/SharedProject'
import { useTranslation } from 'react-i18next'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
interface LockedDashboardProps {
user?: User
diff --git a/web/app/pages/Project/View/components/MetricCards.tsx b/web/app/pages/Project/View/components/MetricCards.tsx
index 696f9f3d2..73efaa6d9 100644
--- a/web/app/pages/Project/View/components/MetricCards.tsx
+++ b/web/app/pages/Project/View/components/MetricCards.tsx
@@ -6,11 +6,11 @@ import _round from 'lodash/round'
import _isEmpty from 'lodash/isEmpty'
import _isNumber from 'lodash/isNumber'
import _map from 'lodash/map'
-import { nFormatter, getStringFromTime, getTimeFromSeconds } from 'utils/generic'
-import { OverallObject, OverallPerformanceObject } from 'lib/models/Project'
+import { nFormatter, getStringFromTime, getTimeFromSeconds } from '~/utils/generic'
+import { OverallObject, OverallPerformanceObject } from '~/lib/models/Project'
import { ChevronDownIcon, ChevronUpIcon, XMarkIcon } from '@heroicons/react/24/outline'
-import { Badge } from 'ui/Badge'
-import { MonitorOverallObject } from 'lib/models/Uptime'
+import { Badge } from '~/ui/Badge'
+import { MonitorOverallObject } from '~/lib/models/Uptime'
interface MetricCardProps {
label: string
diff --git a/web/app/pages/Project/View/components/NoEvents.tsx b/web/app/pages/Project/View/components/NoEvents.tsx
index e013f835a..71afe2af9 100644
--- a/web/app/pages/Project/View/components/NoEvents.tsx
+++ b/web/app/pages/Project/View/components/NoEvents.tsx
@@ -2,7 +2,7 @@ import React, { memo } from 'react'
import { useTranslation } from 'react-i18next'
import _isEmpty from 'lodash/isEmpty'
-import Button from 'ui/Button'
+import Button from '~/ui/Button'
import { Filter } from '../interfaces/traffic'
interface NoEventsProps {
diff --git a/web/app/pages/Project/View/components/SearchFilters.tsx b/web/app/pages/Project/View/components/SearchFilters.tsx
index 4d5d4d803..7746758bc 100644
--- a/web/app/pages/Project/View/components/SearchFilters.tsx
+++ b/web/app/pages/Project/View/components/SearchFilters.tsx
@@ -5,13 +5,13 @@ import _filter from 'lodash/filter'
import _map from 'lodash/map'
import _find from 'lodash/find'
-import Modal from 'ui/Modal'
-import Checkbox from 'ui/Checkbox'
-import Select from 'ui/Select'
-import Combobox from 'ui/Combobox'
-import { FILTERS_PANELS_ORDER, ERRORS_FILTERS_PANELS_ORDER } from 'lib/constants'
-import countries from 'utils/isoCountries'
-import { getFilters, getErrorsFilters } from 'api'
+import Modal from '~/ui/Modal'
+import Checkbox from '~/ui/Checkbox'
+import Select from '~/ui/Select'
+import Combobox from '~/ui/Combobox'
+import { FILTERS_PANELS_ORDER, ERRORS_FILTERS_PANELS_ORDER } from '~/lib/constants'
+import countries from '~/utils/isoCountries'
+import { getFilters, getErrorsFilters } from '~/api'
import { Filter } from './Filters'
import { Filter as FilterType } from '../interfaces/traffic'
diff --git a/web/app/pages/Project/View/components/SessionDetails.tsx b/web/app/pages/Project/View/components/SessionDetails.tsx
index f7b0be298..188ee8c29 100644
--- a/web/app/pages/Project/View/components/SessionDetails.tsx
+++ b/web/app/pages/Project/View/components/SessionDetails.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
import _capitalize from 'lodash/capitalize'
import _size from 'lodash/size'
import _truncate from 'lodash/truncate'
-import { getLocaleDisplayName, getStringFromTime, getTimeFromSeconds } from 'utils/generic'
+import { getLocaleDisplayName, getStringFromTime, getTimeFromSeconds } from '~/utils/generic'
import { SessionDetails as Details } from '../interfaces/session'
import { MetricCard, MetricCardSelect } from './MetricCards'
import CCRow from './CCRow'
diff --git a/web/app/pages/Project/View/components/Sessions.tsx b/web/app/pages/Project/View/components/Sessions.tsx
index 26fdedbfb..645dd642e 100644
--- a/web/app/pages/Project/View/components/Sessions.tsx
+++ b/web/app/pages/Project/View/components/Sessions.tsx
@@ -4,7 +4,7 @@ import { ClientOnly } from 'remix-utils/client-only'
import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import { ChevronRightIcon } from '@heroicons/react/24/outline'
-import Loader from 'ui/Loader'
+import Loader from '~/ui/Loader'
import { Session as SessionType } from '../interfaces/session'
import CCRow from './CCRow'
diff --git a/web/app/pages/Project/View/components/TBPeriodSelector.tsx b/web/app/pages/Project/View/components/TBPeriodSelector.tsx
index daba782d0..008e8a230 100644
--- a/web/app/pages/Project/View/components/TBPeriodSelector.tsx
+++ b/web/app/pages/Project/View/components/TBPeriodSelector.tsx
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import _includes from 'lodash/includes'
import cx from 'clsx'
-import { ALL_PERIODS } from 'lib/constants'
+import { ALL_PERIODS } from '~/lib/constants'
import { useViewProjectContext } from '../ViewProject'
interface TBPeriodSelectorProps {
diff --git a/web/app/pages/Project/View/components/UserFlow.tsx b/web/app/pages/Project/View/components/UserFlow.tsx
index 244ce8787..a6b166980 100644
--- a/web/app/pages/Project/View/components/UserFlow.tsx
+++ b/web/app/pages/Project/View/components/UserFlow.tsx
@@ -1,10 +1,10 @@
import { useEffect, useState, memo, useMemo } from 'react'
import { toast } from 'sonner'
import { ResponsiveSankey } from '@nivo/sankey'
-import { UserFlowType } from 'lib/models/UserFlow'
+import { UserFlowType } from '~/lib/models/UserFlow'
import _isEmpty from 'lodash/isEmpty'
-import { getUserFlow } from 'api'
-import Loader from 'ui/Loader'
+import { getUserFlow } from '~/api'
+import Loader from '~/ui/Loader'
import { useTranslation } from 'react-i18next'
import { useViewProjectContext } from '../ViewProject'
import { getFormatDate } from '../ViewProject.helpers'
diff --git a/web/app/pages/Project/View/components/WaitingForAnError.tsx b/web/app/pages/Project/View/components/WaitingForAnError.tsx
index ee56d0ee1..024c23ed5 100644
--- a/web/app/pages/Project/View/components/WaitingForAnError.tsx
+++ b/web/app/pages/Project/View/components/WaitingForAnError.tsx
@@ -1,8 +1,8 @@
import { BugAntIcon } from '@heroicons/react/24/outline'
import { Link } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
-import routes from 'utils/routes'
-import { ERROR_TRACKING_DOCS_URL } from 'lib/constants'
+import routes from '~/utils/routes'
+import { ERROR_TRACKING_DOCS_URL } from '~/lib/constants'
const TROUBLESHOOTING_URL = 'https://docs.swetrix.com/troubleshooting'
diff --git a/web/app/pages/Project/View/components/WaitingForAnEvent.tsx b/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
index e1e617fca..94f09fb7e 100644
--- a/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
+++ b/web/app/pages/Project/View/components/WaitingForAnEvent.tsx
@@ -1,11 +1,11 @@
import React, { useState } from 'react'
import { Link } from '@remix-run/react'
-import { User } from 'lib/models/User'
-import { ProjectForShared } from 'lib/models/SharedProject'
+import { User } from '~/lib/models/User'
+import { ProjectForShared } from '~/lib/models/SharedProject'
import { useTranslation, Trans } from 'react-i18next'
-import routes from 'utils/routes'
-import PulsatingCircle from 'ui/icons/PulsatingCircle'
-import TrackingSnippet from 'modals/TrackingSnippet'
+import routes from '~/utils/routes'
+import PulsatingCircle from '~/ui/icons/PulsatingCircle'
+import TrackingSnippet from '~/modals/TrackingSnippet'
interface WaitingForAnEventProps {
user?: User
diff --git a/web/app/pages/Project/uptime/Settings.tsx b/web/app/pages/Project/uptime/Settings.tsx
index 73d2dd8be..afba45088 100644
--- a/web/app/pages/Project/uptime/Settings.tsx
+++ b/web/app/pages/Project/uptime/Settings.tsx
@@ -12,22 +12,22 @@ import _isNaN from 'lodash/isNaN'
import _map from 'lodash/map'
import _keys from 'lodash/keys'
import { clsx as cx } from 'clsx'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import { PROJECT_TABS } from 'lib/constants'
-import { createMonitor, updateMonitor, deleteMonitor, CreateMonitor, getProjectMonitor } from 'api'
-import { withAuthentication, auth } from 'hoc/protected'
-import routes from 'utils/routes'
-import { Monitor } from 'lib/models/Uptime'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import { PROJECT_TABS } from '~/lib/constants'
+import { createMonitor, updateMonitor, deleteMonitor, CreateMonitor, getProjectMonitor } from '~/api'
+import { withAuthentication, auth } from '~/hoc/protected'
+import routes from '~/utils/routes'
+import { Monitor } from '~/lib/models/Uptime'
import { useSelector } from 'react-redux'
import { toast } from 'sonner'
-import { StateType } from 'lib/store'
-import { useRequiredParams } from 'hooks/useRequiredParams'
-import Select from 'ui/Select'
-import { formatTime } from 'utils/date'
-import { isValidUrl } from 'utils/validator'
-import Loader from 'ui/Loader'
+import { StateType } from '~/lib/store'
+import { useRequiredParams } from '~/hooks/useRequiredParams'
+import Select from '~/ui/Select'
+import { formatTime } from '~/utils/date'
+import { isValidUrl } from '~/utils/validator'
+import Loader from '~/ui/Loader'
const MONITOR_TYPES = ['HTTP']
diff --git a/web/app/pages/Project/uptime/View.tsx b/web/app/pages/Project/uptime/View.tsx
index 3ce5d142a..187271c8c 100644
--- a/web/app/pages/Project/uptime/View.tsx
+++ b/web/app/pages/Project/uptime/View.tsx
@@ -21,21 +21,21 @@ import {
} from '@heroicons/react/24/outline'
import { toast } from 'sonner'
-import routes from 'utils/routes'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import PaidFeature from 'modals/PaidFeature'
-import { DEFAULT_MONITORS_TAKE, PLAN_LIMITS, tbPeriodPairs, UPTIME_PERIOD_PAIRS } from 'lib/constants'
-import { deleteMonitor as deleteMonitorApi, getMonitorOverallStats, getMonitorStats, getProjectMonitors } from 'api'
-import { StateType } from 'lib/store'
-import { Monitor, MonitorOverallObject } from 'lib/models/Uptime'
+import routes from '~/utils/routes'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import PaidFeature from '~/modals/PaidFeature'
+import { DEFAULT_MONITORS_TAKE, PLAN_LIMITS, tbPeriodPairs, UPTIME_PERIOD_PAIRS } from '~/lib/constants'
+import { deleteMonitor as deleteMonitorApi, getMonitorOverallStats, getMonitorStats, getProjectMonitors } from '~/api'
+import { StateType } from '~/lib/store'
+import { Monitor, MonitorOverallObject } from '~/lib/models/Uptime'
import { useViewProjectContext } from '../View/ViewProject'
import { getFormatDate, getSettingsUptime } from '../View/ViewProject.helpers'
import TBPeriodSelector from '../View/components/TBPeriodSelector'
import { MetricCardsUptime } from '../View/components/MetricCards'
import NoMonitorEvents from './components/NoMonitorDetails'
-import Loader from 'ui/Loader'
-import Pagination from 'ui/Pagination'
+import Loader from '~/ui/Loader'
+import Pagination from '~/ui/Pagination'
interface MonitorCardProps {
monitor: Monitor
diff --git a/web/app/pages/ReferralPage/index.tsx b/web/app/pages/ReferralPage/index.tsx
index c91a2be9b..0f58c2e0a 100644
--- a/web/app/pages/ReferralPage/index.tsx
+++ b/web/app/pages/ReferralPage/index.tsx
@@ -4,12 +4,12 @@ import { useSelector } from 'react-redux'
import { useTranslation, Trans } from 'react-i18next'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
-import { StateType } from 'lib/store/index'
-import Header from 'components/Header'
-import routes from 'utils/routes'
-import { Lines } from 'components/marketing/Lines'
+import { StateType } from '~/lib/store/index'
+import Header from '~/components/Header'
+import routes from '~/utils/routes'
+import { Lines } from '~/components/marketing/Lines'
-import { isBrowser, REFERRAL_COOKIE_DAYS, REFERRAL_DISCOUNT } from 'lib/constants'
+import { isBrowser, REFERRAL_COOKIE_DAYS, REFERRAL_DISCOUNT } from '~/lib/constants'
interface ReferralPageProps {
ssrTheme: 'dark' | 'light'
diff --git a/web/app/pages/Terms/index.tsx b/web/app/pages/Terms/index.tsx
index 5d3a2ddbf..f52cd38a9 100644
--- a/web/app/pages/Terms/index.tsx
+++ b/web/app/pages/Terms/index.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unescaped-entities */
import React from 'react'
-import { CONTACT_EMAIL } from 'lib/constants'
+import { CONTACT_EMAIL } from '~/lib/constants'
const Terms = () => {
return (
diff --git a/web/app/pages/Unsubscribe/index.tsx b/web/app/pages/Unsubscribe/index.tsx
index e0287a68c..86cb45c58 100644
--- a/web/app/pages/Unsubscribe/index.tsx
+++ b/web/app/pages/Unsubscribe/index.tsx
@@ -5,10 +5,10 @@ import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _isString from 'lodash/isString'
import { useSelector } from 'react-redux'
-import { StateType } from 'lib/store'
-import { unsubscribeFromEmailReports, unsubscribeFromEmailReports3rdParty } from 'api'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
+import { StateType } from '~/lib/store'
+import { unsubscribeFromEmailReports, unsubscribeFromEmailReports3rdParty } from '~/api'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
interface UnsubscribeProps {
type: 'user-reports' | '3rdparty'
diff --git a/web/app/pages/UserSettings/UserSettings.tsx b/web/app/pages/UserSettings/UserSettings.tsx
index 474d64b5d..0fda1d49e 100644
--- a/web/app/pages/UserSettings/UserSettings.tsx
+++ b/web/app/pages/UserSettings/UserSettings.tsx
@@ -34,22 +34,22 @@ import {
GDPR_EXPORT_TIMEFRAME,
TimeFormat,
isSelfhosted,
-} from 'lib/constants'
-import { User } from 'lib/models/User'
-import { withAuthentication, auth } from 'hoc/protected'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import Select from 'ui/Select'
-import Checkbox from 'ui/Checkbox'
-import PaidFeature from 'modals/PaidFeature'
-import TimezonePicker from 'ui/TimezonePicker'
-import Textarea from 'ui/Textarea'
-import Loader from 'ui/Loader'
-import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS } from 'utils/validator'
-import routes from 'utils/routes'
-import { trackCustom } from 'utils/analytics'
-import { getCookie, setCookie } from 'utils/cookie'
+} from '~/lib/constants'
+import { User } from '~/lib/models/User'
+import { withAuthentication, auth } from '~/hoc/protected'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import Select from '~/ui/Select'
+import Checkbox from '~/ui/Checkbox'
+import PaidFeature from '~/modals/PaidFeature'
+import TimezonePicker from '~/ui/TimezonePicker'
+import Textarea from '~/ui/Textarea'
+import Loader from '~/ui/Loader'
+import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS } from '~/utils/validator'
+import routes from '~/utils/routes'
+import { trackCustom } from '~/utils/analytics'
+import { getCookie, setCookie } from '~/utils/cookie'
import {
confirmEmail,
exportUserData,
@@ -59,7 +59,7 @@ import {
setShowLiveVisitorsInTitle,
changeUserDetails,
deleteUser,
-} from 'api'
+} from '~/api'
import ProjectList from './components/ProjectList'
import TwoFA from './components/TwoFA'
import Integrations from './components/Integrations'
@@ -69,11 +69,11 @@ import NoSharedProjects from './components/NoSharedProjects'
import Organisations from './components/Organisations'
import NoOrganisations from './components/NoOrganisations'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
-import { removeRefreshToken } from 'utils/refreshToken'
-import { removeAccessToken } from 'utils/accessToken'
-import { logout } from 'utils/auth'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
+import { removeRefreshToken } from '~/utils/refreshToken'
+import { removeAccessToken } from '~/utils/accessToken'
+import { logout } from '~/utils/auth'
dayjs.extend(utc)
diff --git a/web/app/pages/UserSettings/components/Integrations.tsx b/web/app/pages/UserSettings/components/Integrations.tsx
index 763a6ba3b..2a7b0b4b9 100644
--- a/web/app/pages/UserSettings/components/Integrations.tsx
+++ b/web/app/pages/UserSettings/components/Integrations.tsx
@@ -6,16 +6,16 @@ import _isString from 'lodash/isString'
import { CheckCircleIcon, XCircleIcon, ClockIcon } from '@heroicons/react/24/solid'
import { toast } from 'sonner'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import Telegram from 'ui/icons/Telegram'
-import Slack from 'ui/icons/Slack'
-import Discord from 'ui/icons/Discord'
-import { removeTgIntegration } from 'api'
-import { User } from 'lib/models/User'
-import { StateType, useAppDispatch } from 'lib/store'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import Telegram from '~/ui/icons/Telegram'
+import Slack from '~/ui/icons/Slack'
+import Discord from '~/ui/icons/Discord'
+import { removeTgIntegration } from '~/api'
+import { User } from '~/lib/models/User'
+import { StateType, useAppDispatch } from '~/lib/store'
import { useSelector } from 'react-redux'
-import { authActions } from 'lib/reducers/auth'
+import { authActions } from '~/lib/reducers/auth'
const getAvailableIntegrations = (
t: typeof i18next.t,
diff --git a/web/app/pages/UserSettings/components/Organisations.tsx b/web/app/pages/UserSettings/components/Organisations.tsx
index 58a2d74f3..ee11a9b97 100644
--- a/web/app/pages/UserSettings/components/Organisations.tsx
+++ b/web/app/pages/UserSettings/components/Organisations.tsx
@@ -5,12 +5,12 @@ import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import _filter from 'lodash/filter'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import { rejectOrganisationInvitation, acceptOrganisationInvitation } from 'api'
-import { OrganisationMembership } from 'lib/models/Organisation'
-import { StateType, useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import { rejectOrganisationInvitation, acceptOrganisationInvitation } from '~/api'
+import { OrganisationMembership } from '~/lib/models/Organisation'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
import { useSelector } from 'react-redux'
interface OrganisationsProps {
diff --git a/web/app/pages/UserSettings/components/ProjectList.tsx b/web/app/pages/UserSettings/components/ProjectList.tsx
index 60fc7fbcc..c505fd4ff 100644
--- a/web/app/pages/UserSettings/components/ProjectList.tsx
+++ b/web/app/pages/UserSettings/components/ProjectList.tsx
@@ -5,12 +5,12 @@ import { useTranslation } from 'react-i18next'
import _map from 'lodash/map'
import _filter from 'lodash/filter'
-import Button from 'ui/Button'
-import Modal from 'ui/Modal'
-import { rejectProjectShare, acceptProjectShare } from 'api'
-import { SharedProject } from 'lib/models/SharedProject'
-import { StateType, useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
+import Button from '~/ui/Button'
+import Modal from '~/ui/Modal'
+import { rejectProjectShare, acceptProjectShare } from '~/api'
+import { SharedProject } from '~/lib/models/SharedProject'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
import { useSelector } from 'react-redux'
interface ProjectListProps {
diff --git a/web/app/pages/UserSettings/components/Referral.tsx b/web/app/pages/UserSettings/components/Referral.tsx
index 957f43558..8157d5698 100644
--- a/web/app/pages/UserSettings/components/Referral.tsx
+++ b/web/app/pages/UserSettings/components/Referral.tsx
@@ -5,11 +5,11 @@ import _isEmpty from 'lodash/isEmpty'
import _map from 'lodash/map'
import { toast } from 'sonner'
-import { generateRefCode, getPayoutsInfo, getReferrals, setPaypalEmail } from 'api'
-import Tooltip from 'ui/Tooltip'
-import Highlighted from 'ui/Highlighted'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
+import { generateRefCode, getPayoutsInfo, getReferrals, setPaypalEmail } from '~/api'
+import Tooltip from '~/ui/Tooltip'
+import Highlighted from '~/ui/Highlighted'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
import {
REF_URL_PREFIX,
DOCS_REFERRAL_PROGRAM_URL,
@@ -20,13 +20,13 @@ import {
BillingFrequency,
MERCHANT_FEE,
REFERRAL_CUT,
-} from 'lib/constants'
-import { isValidEmail } from 'utils/validator'
+} from '~/lib/constants'
+import { isValidEmail } from '~/utils/validator'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'lib/store'
-import { authActions } from 'lib/reducers/auth'
-import { User } from 'lib/models/User'
-import Spin from 'ui/icons/Spin'
+import { StateType, useAppDispatch } from '~/lib/store'
+import { authActions } from '~/lib/reducers/auth'
+import { User } from '~/lib/models/User'
+import Spin from '~/ui/icons/Spin'
const Referral = () => {
const { user } = useSelector((state: StateType) => state.auth)
diff --git a/web/app/pages/UserSettings/components/Socialisations.tsx b/web/app/pages/UserSettings/components/Socialisations.tsx
index a66ff3ff4..c8eb6984e 100644
--- a/web/app/pages/UserSettings/components/Socialisations.tsx
+++ b/web/app/pages/UserSettings/components/Socialisations.tsx
@@ -4,17 +4,17 @@ import _map from 'lodash/map'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import { toast } from 'sonner'
-import Button from 'ui/Button'
-import Google from 'ui/icons/GoogleG'
-import GithubDark from 'ui/icons/GithubDark'
-import GithubLight from 'ui/icons/GithubLight'
-import { User } from 'lib/models/User'
-import { SSO_PROVIDERS } from 'lib/constants'
-import { StateType, useAppDispatch } from 'lib/store'
+import Button from '~/ui/Button'
+import Google from '~/ui/icons/GoogleG'
+import GithubDark from '~/ui/icons/GithubDark'
+import GithubLight from '~/ui/icons/GithubLight'
+import { User } from '~/lib/models/User'
+import { SSO_PROVIDERS } from '~/lib/constants'
+import { StateType, useAppDispatch } from '~/lib/store'
import { useSelector } from 'react-redux'
-import { authMe, generateSSOAuthURL, linkBySSOHash, unlinkSSO } from 'api'
-import { authActions } from 'lib/reducers/auth'
-import { delay, openBrowserWindow } from 'utils/generic'
+import { authMe, generateSSOAuthURL, linkBySSOHash, unlinkSSO } from '~/api'
+import { authActions } from '~/lib/reducers/auth'
+import { delay, openBrowserWindow } from '~/utils/generic'
const AVAILABLE_SSO_PROVIDERS = [
{
diff --git a/web/app/pages/UserSettings/components/TwoFA.tsx b/web/app/pages/UserSettings/components/TwoFA.tsx
index 16a9caf42..fee5ae243 100644
--- a/web/app/pages/UserSettings/components/TwoFA.tsx
+++ b/web/app/pages/UserSettings/components/TwoFA.tsx
@@ -6,14 +6,14 @@ import _isNull from 'lodash/isNull'
import _isString from 'lodash/isString'
import { toast } from 'sonner'
-import Input from 'ui/Input'
-import Button from 'ui/Button'
-import { generate2FA, enable2FA, disable2FA } from 'api'
-import { setAccessToken } from 'utils/accessToken'
-import { setRefreshToken } from 'utils/refreshToken'
-import { StateType, useAppDispatch } from 'lib/store'
+import Input from '~/ui/Input'
+import Button from '~/ui/Button'
+import { generate2FA, enable2FA, disable2FA } from '~/api'
+import { setAccessToken } from '~/utils/accessToken'
+import { setRefreshToken } from '~/utils/refreshToken'
+import { StateType, useAppDispatch } from '~/lib/store'
import { useSelector } from 'react-redux'
-import { authActions } from 'lib/reducers/auth'
+import { authActions } from '~/lib/reducers/auth'
const TwoFA = () => {
const dispatch = useAppDispatch()
diff --git a/web/app/root.tsx b/web/app/root.tsx
index 0d68e93a1..2244c115b 100644
--- a/web/app/root.tsx
+++ b/web/app/root.tsx
@@ -12,32 +12,32 @@ import {
isRouteErrorResponse,
useRouteError,
} from '@remix-run/react'
-import { store } from 'lib/store'
-import { isBrowser, CONTACT_EMAIL, LS_THEME_SETTING, isSelfhosted, I18N_CACHE_BREAKER } from 'lib/constants'
+import { store } from '~/lib/store'
+import { isBrowser, CONTACT_EMAIL, LS_THEME_SETTING, isSelfhosted, I18N_CACHE_BREAKER } from '~/lib/constants'
import { ExternalScripts } from 'remix-utils/external-scripts'
-import { getCookie, generateCookieString } from 'utils/cookie'
+import { getCookie, generateCookieString } from '~/utils/cookie'
import { ExclamationTriangleIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline'
import { Provider } from 'react-redux'
import clsx from 'clsx'
import _replace from 'lodash/replace'
import BillboardCss from 'billboard.js/dist/billboard.min.css'
-import { trackViews, trackErrors } from 'utils/analytics'
+import { trackViews, trackErrors } from '~/utils/analytics'
import { useChangeLanguage } from 'remix-i18next/react'
import { useTranslation } from 'react-i18next'
-import AppWrapper from 'App'
-import { detectLanguage } from 'i18n'
-import { detectTheme, isAuthenticated, isWWW } from 'utils/server'
-import { LocaleLinks } from 'components/LocaleLinks'
-import { SEO } from 'components/SEO'
+import AppWrapper from './App'
+import { detectLanguage } from './i18n'
+import { detectTheme, isAuthenticated, isWWW } from '~/utils/server'
+import { LocaleLinks } from '~/components/LocaleLinks'
+import { SEO } from '~/components/SEO'
-import mainCss from 'styles/index.css'
-import tailwindCss from 'styles/tailwind.css'
-import sonnerCss from 'styles/sonner.css'
-import FlatpickerCss from 'styles/Flatpicker.css'
+import mainCss from '~/styles/index.css'
+import tailwindCss from '~/styles/tailwind.css'
+import sonnerCss from '~/styles/sonner.css'
+import FlatpickerCss from '~/styles/Flatpicker.css'
import FlatpickrLightCss from 'flatpickr/dist/themes/light.css'
import FlatpickrDarkCss from 'flatpickr/dist/themes/dark.css'
-import FontsCss from 'styles/fonts.css'
+import FontsCss from '~/styles/fonts.css'
trackViews()
trackErrors()
diff --git a/web/app/routes/$.tsx b/web/app/routes/$.tsx
index 7884ae19e..82771ec59 100644
--- a/web/app/routes/$.tsx
+++ b/web/app/routes/$.tsx
@@ -1,7 +1,7 @@
import type { LoaderFunction } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import { json } from '@remix-run/node'
-import NotFound from 'pages/NotFound'
+import NotFound from '~/pages/NotFound'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/3rd-party-unsubscribe.$token.tsx b/web/app/routes/3rd-party-unsubscribe.$token.tsx
index 318495cbc..50df37e6a 100644
--- a/web/app/routes/3rd-party-unsubscribe.$token.tsx
+++ b/web/app/routes/3rd-party-unsubscribe.$token.tsx
@@ -1,7 +1,7 @@
import type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
-import Unsubscribe from 'pages/Unsubscribe'
+import { isSelfhosted } from '~/lib/constants'
+import Unsubscribe from '~/pages/Unsubscribe'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/[robots.txt].tsx b/web/app/routes/[robots.txt].tsx
index 8ce89eb58..9dafa6c7d 100644
--- a/web/app/routes/[robots.txt].tsx
+++ b/web/app/routes/[robots.txt].tsx
@@ -1,4 +1,4 @@
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
const PRODUCTION_ROBOTS = `Sitemap: https://swetrix.com/sitemap.xml
diff --git a/web/app/routes/about.tsx b/web/app/routes/about.tsx
index 6c7eabf99..4e5865933 100644
--- a/web/app/routes/about.tsx
+++ b/web/app/routes/about.tsx
@@ -1,6 +1,6 @@
import { redirect } from '@remix-run/node'
-import About from 'pages/About'
-import { isSelfhosted } from 'lib/constants'
+import About from '~/pages/About'
+import { isSelfhosted } from '~/lib/constants'
export async function loader() {
if (isSelfhosted) {
diff --git a/web/app/routes/billing.tsx b/web/app/routes/billing.tsx
index f4a3dc90f..28f0f19ac 100644
--- a/web/app/routes/billing.tsx
+++ b/web/app/routes/billing.tsx
@@ -2,10 +2,10 @@ import type { LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import Billing from 'pages/Billing'
+import Billing from '~/pages/Billing'
-import { isSelfhosted } from 'lib/constants'
-import { isAuthenticated, detectTheme } from 'utils/server'
+import { isSelfhosted } from '~/lib/constants'
+import { isAuthenticated, detectTheme } from '~/utils/server'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/blog.$category.$slug.tsx b/web/app/routes/blog.$category.$slug.tsx
index 3b980726c..3bffe5843 100644
--- a/web/app/routes/blog.$category.$slug.tsx
+++ b/web/app/routes/blog.$category.$slug.tsx
@@ -1,9 +1,9 @@
import type { LoaderFunction, LinksFunction, MetaFunction } from '@remix-run/node'
import { redirect, json } from '@remix-run/node'
-import singlePostCss from 'css/mdfile.css'
-import { getPost } from 'utils/getPosts'
-import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from 'lib/constants'
-import Post from 'pages/Blog/Post'
+import singlePostCss from '~/css/mdfile.css'
+import { getPost } from '~/utils/getPosts'
+import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from '~/lib/constants'
+import Post from '~/pages/Blog/Post'
export const links: LinksFunction = () => {
return [{ rel: 'stylesheet', href: singlePostCss }]
diff --git a/web/app/routes/blog.$slug.tsx b/web/app/routes/blog.$slug.tsx
index 70edc418b..09ed7e42d 100644
--- a/web/app/routes/blog.$slug.tsx
+++ b/web/app/routes/blog.$slug.tsx
@@ -5,11 +5,11 @@ import _map from 'lodash/map'
import _last from 'lodash/last'
import _join from 'lodash/join'
import _isString from 'lodash/isString'
-import singlePostCss from 'css/mdfile.css'
-import { getPost, getSlugFromFilename, getDateFromFilename } from 'utils/getPosts'
-import { getSitemap } from 'api'
-import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from 'lib/constants'
-import Post from 'pages/Blog/Post'
+import singlePostCss from '~/css/mdfile.css'
+import { getPost, getSlugFromFilename, getDateFromFilename } from '~/utils/getPosts'
+import { getSitemap } from '~/api'
+import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from '~/lib/constants'
+import Post from '~/pages/Blog/Post'
export const links: LinksFunction = () => {
return [{ rel: 'stylesheet', href: singlePostCss }]
diff --git a/web/app/routes/blog.tsx b/web/app/routes/blog.tsx
index 327039a63..a3a517684 100644
--- a/web/app/routes/blog.tsx
+++ b/web/app/routes/blog.tsx
@@ -4,8 +4,8 @@ import { Link, useLoaderData } from '@remix-run/react'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
import _filter from 'lodash/filter'
-import { isSelfhosted, TITLE_SUFFIX } from 'lib/constants'
-import { getBlogPosts } from 'api'
+import { isSelfhosted, TITLE_SUFFIX } from '~/lib/constants'
+import { getBlogPosts } from '~/api'
export const loader: LoaderFunction = async () => {
if (isSelfhosted) {
diff --git a/web/app/routes/captchas.$id.tsx b/web/app/routes/captchas.$id.tsx
index 60cd23d37..f29871eb1 100644
--- a/web/app/routes/captchas.$id.tsx
+++ b/web/app/routes/captchas.$id.tsx
@@ -1,7 +1,7 @@
-import CaptchaView from 'pages/Captcha/View'
+import CaptchaView from '~/pages/Captcha/View'
import { json, type LinksFunction, type LoaderFunctionArgs } from '@remix-run/node'
-import ProjectViewStyle from 'styles/ProjectViewStyle.css'
-import { detectTheme } from 'utils/server'
+import ProjectViewStyle from '~/styles/ProjectViewStyle.css'
+import { detectTheme } from '~/utils/server'
import { useLoaderData } from '@remix-run/react'
export const links: LinksFunction = () => [{ rel: 'stylesheet', href: ProjectViewStyle }]
diff --git a/web/app/routes/captchas.new.tsx b/web/app/routes/captchas.new.tsx
index e5e637a95..fc782ccc3 100644
--- a/web/app/routes/captchas.new.tsx
+++ b/web/app/routes/captchas.new.tsx
@@ -1,4 +1,4 @@
-import CaptchaSettings from 'pages/Captcha/Settings'
+import CaptchaSettings from '~/pages/Captcha/Settings'
export default function Index() {
return <CaptchaSettings />
diff --git a/web/app/routes/captchas.settings.$id.tsx b/web/app/routes/captchas.settings.$id.tsx
index 28947e28a..7da1aa565 100644
--- a/web/app/routes/captchas.settings.$id.tsx
+++ b/web/app/routes/captchas.settings.$id.tsx
@@ -1,4 +1,4 @@
-import CaptchaSettings from 'pages/Captcha/Settings'
+import CaptchaSettings from '~/pages/Captcha/Settings'
export default function Index() {
return <CaptchaSettings isSettings />
diff --git a/web/app/routes/change-email.$id.tsx b/web/app/routes/change-email.$id.tsx
index 21c8b7124..e5dcc8c4e 100644
--- a/web/app/routes/change-email.$id.tsx
+++ b/web/app/routes/change-email.$id.tsx
@@ -1,9 +1,9 @@
-import ChangeEmail from 'pages/Auth/ChangeEmail'
+import ChangeEmail from '~/pages/Auth/ChangeEmail'
import type { SitemapFunction } from 'remix-sitemap'
import type { HeadersFunction } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/changelog.tsx b/web/app/routes/changelog.tsx
index 343279a03..857f3caa6 100644
--- a/web/app/routes/changelog.tsx
+++ b/web/app/routes/changelog.tsx
@@ -1,4 +1,4 @@
-import Changelog from 'pages/Changelog'
+import Changelog from '~/pages/Changelog'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/confirm-email.tsx b/web/app/routes/confirm-email.tsx
index da8434ddc..c8e539131 100644
--- a/web/app/routes/confirm-email.tsx
+++ b/web/app/routes/confirm-email.tsx
@@ -1,8 +1,8 @@
-import CheckYourInbox from 'pages/Auth/CheckYourInbox'
+import CheckYourInbox from '~/pages/Auth/CheckYourInbox'
import type { SitemapFunction } from 'remix-sitemap'
import type { HeadersFunction, LoaderFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/contact.tsx b/web/app/routes/contact.tsx
index 4b24d447e..29e2cf7ba 100644
--- a/web/app/routes/contact.tsx
+++ b/web/app/routes/contact.tsx
@@ -1,6 +1,6 @@
import { redirect } from '@remix-run/node'
-import Contact from 'pages/Contact'
-import { isSelfhosted } from 'lib/constants'
+import Contact from '~/pages/Contact'
+import { isSelfhosted } from '~/lib/constants'
export async function loader() {
if (isSelfhosted) {
diff --git a/web/app/routes/cookie-policy.tsx b/web/app/routes/cookie-policy.tsx
index 6e8eb2e7e..ef345d8d0 100644
--- a/web/app/routes/cookie-policy.tsx
+++ b/web/app/routes/cookie-policy.tsx
@@ -1,4 +1,4 @@
-import CookiePolicy from 'pages/CookiePolicy'
+import CookiePolicy from '~/pages/CookiePolicy'
export default function Index() {
return <CookiePolicy />
diff --git a/web/app/routes/dashboard.tsx b/web/app/routes/dashboard.tsx
index 7df10bd8a..e17bf0bd5 100644
--- a/web/app/routes/dashboard.tsx
+++ b/web/app/routes/dashboard.tsx
@@ -1,4 +1,4 @@
-import Dashboard from 'pages/Dashboard'
+import Dashboard from '~/pages/Dashboard'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/error-tracking.tsx b/web/app/routes/error-tracking.tsx
index 2efcbedf9..9adfd1cb9 100644
--- a/web/app/routes/error-tracking.tsx
+++ b/web/app/routes/error-tracking.tsx
@@ -3,9 +3,9 @@ import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import ErrorTracking from 'pages/ErrorTracking'
-import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'lib/constants'
+import ErrorTracking from '~/pages/ErrorTracking'
+import { detectTheme, isAuthenticated } from '~/utils/server'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 1,
diff --git a/web/app/routes/for-marketers.tsx b/web/app/routes/for-marketers.tsx
index a12836adc..1d34f6483 100644
--- a/web/app/routes/for-marketers.tsx
+++ b/web/app/routes/for-marketers.tsx
@@ -1,10 +1,10 @@
-import Marketers from 'pages/Landings/Marketers'
+import Marketers from '~/pages/Landings/Marketers'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'lib/constants'
+import { detectTheme, isAuthenticated } from '~/utils/server'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 0.9,
diff --git a/web/app/routes/for-small-businesses.tsx b/web/app/routes/for-small-businesses.tsx
index 47b8b5754..8065358a4 100644
--- a/web/app/routes/for-small-businesses.tsx
+++ b/web/app/routes/for-small-businesses.tsx
@@ -1,10 +1,10 @@
-import SmallBusinesses from 'pages/Landings/SmallBusinesses'
+import SmallBusinesses from '~/pages/Landings/SmallBusinesses'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'lib/constants'
+import { detectTheme, isAuthenticated } from '~/utils/server'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 0.9,
diff --git a/web/app/routes/for-startups.tsx b/web/app/routes/for-startups.tsx
index f3d1d03fe..02bac32d2 100644
--- a/web/app/routes/for-startups.tsx
+++ b/web/app/routes/for-startups.tsx
@@ -1,10 +1,10 @@
-import Startups from 'pages/Landings/Startups'
+import Startups from '~/pages/Landings/Startups'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'lib/constants'
+import { detectTheme, isAuthenticated } from '~/utils/server'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 0.9,
diff --git a/web/app/routes/imprint.tsx b/web/app/routes/imprint.tsx
index ece3f4a1f..78db4f973 100644
--- a/web/app/routes/imprint.tsx
+++ b/web/app/routes/imprint.tsx
@@ -1,4 +1,4 @@
-import Imprint from 'pages/Imprint'
+import Imprint from '~/pages/Imprint'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/index.tsx b/web/app/routes/index.tsx
index fc4502085..8a9b3889c 100644
--- a/web/app/routes/index.tsx
+++ b/web/app/routes/index.tsx
@@ -5,7 +5,7 @@ import type { SitemapFunction } from 'remix-sitemap'
import { UAParser } from 'ua-parser-js'
import { motion } from 'framer-motion'
-import { detectTheme, isAuthenticated } from 'utils/server'
+import { detectTheme, isAuthenticated } from '~/utils/server'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
@@ -14,9 +14,9 @@ import { StarIcon } from '@heroicons/react/24/solid'
import { ArrowRightIcon } from '@heroicons/react/20/solid'
import _map from 'lodash/map'
-import routesPath from 'utils/routes'
-import { getAccessToken } from 'utils/accessToken'
-import { getStringFromTime, getTimeFromSeconds } from 'utils/generic'
+import routesPath from '~/utils/routes'
+import { getAccessToken } from '~/utils/accessToken'
+import { getStringFromTime, getTimeFromSeconds } from '~/utils/generic'
import {
GITHUB_URL,
LIVE_DEMO_URL,
@@ -25,22 +25,22 @@ import {
OS_LOGO_MAP,
OS_LOGO_MAP_DARK,
BROWSER_LOGO_MAP,
-} from 'lib/constants'
-import { StateType } from 'lib/store/index'
+} from '~/lib/constants'
+import { StateType } from '~/lib/store/index'
import { Cookie } from 'lucide-react'
-import Header from 'components/Header'
-import Pricing from 'components/marketing/Pricing'
-import { DitchGoogle } from 'components/marketing/DitchGoogle'
-import { Lines } from 'components/marketing/Lines'
+import Header from '~/components/Header'
+import Pricing from '~/components/marketing/Pricing'
+import { DitchGoogle } from '~/components/marketing/DitchGoogle'
+import { Lines } from '~/components/marketing/Lines'
import React, { useEffect, useState } from 'react'
import clsx from 'clsx'
-import { MetricCard, MetricCardSelect } from 'pages/Project/View/components/MetricCards'
-import CCRow from 'pages/Project/View/components/CCRow'
+import { MetricCard, MetricCardSelect } from '~/pages/Project/View/components/MetricCards'
+import CCRow from '~/pages/Project/View/components/CCRow'
import { CheckIcon, CursorArrowRaysIcon, GlobeAltIcon, NewspaperIcon } from '@heroicons/react/24/outline'
-import { LogoTimeline } from 'components/marketing/LogoTimeline'
-import { MarketplaceCluster } from 'components/marketing/MarketplaceCluster'
-import { ConveyorBelt } from 'components/marketing/ConveyorBelt'
+import { LogoTimeline } from '~/components/marketing/LogoTimeline'
+import { MarketplaceCluster } from '~/components/marketing/MarketplaceCluster'
+import { ConveyorBelt } from '~/components/marketing/ConveyorBelt'
export const sitemap: SitemapFunction = () => ({
priority: 1,
diff --git a/web/app/routes/login.tsx b/web/app/routes/login.tsx
index 37ebcc596..539c2cbd9 100644
--- a/web/app/routes/login.tsx
+++ b/web/app/routes/login.tsx
@@ -1,9 +1,9 @@
-import Signin from 'pages/Auth/Signin'
+import Signin from '~/pages/Auth/Signin'
import type { HeadersFunction, LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json } from '@remix-run/node'
-import { detectTheme } from 'utils/server'
+import { detectTheme } from '~/utils/server'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/open.tsx b/web/app/routes/open.tsx
index d3ee980fd..dacd3f12d 100644
--- a/web/app/routes/open.tsx
+++ b/web/app/routes/open.tsx
@@ -1,9 +1,9 @@
-import OpenStartup from 'pages/OpenStartup'
+import OpenStartup from '~/pages/OpenStartup'
import { redirect } from '@remix-run/node'
import type { LinksFunction } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
-import Style from 'styles/ProjectViewStyle.css'
+import Style from '~/styles/ProjectViewStyle.css'
export const links: LinksFunction = () => {
return [{ rel: 'stylesheet', href: Style }]
diff --git a/web/app/routes/organisation.invite.$id.tsx b/web/app/routes/organisation.invite.$id.tsx
index 44d68fb6b..1c3675851 100644
--- a/web/app/routes/organisation.invite.$id.tsx
+++ b/web/app/routes/organisation.invite.$id.tsx
@@ -1,11 +1,11 @@
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/outline'
import { Link, useParams } from '@remix-run/react'
-import { acceptOrganisationInvitation } from 'api'
+import { acceptOrganisationInvitation } from '~/api'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
-import Loader from 'ui/Loader'
-import routes from 'utils/routes'
+import Loader from '~/ui/Loader'
+import routes from '~/utils/routes'
export default function ConfirmOrganisationInvitation() {
const { t } = useTranslation('common')
diff --git a/web/app/routes/organisations.$id.tsx b/web/app/routes/organisations.$id.tsx
index adc286266..9d71c2e89 100644
--- a/web/app/routes/organisations.$id.tsx
+++ b/web/app/routes/organisations.$id.tsx
@@ -1,7 +1,7 @@
import { redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import OrganisationSettings from 'pages/Organisations/Settings'
-import { isSelfhosted } from 'lib/constants'
+import OrganisationSettings from '~/pages/Organisations/Settings'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/organisations.tsx b/web/app/routes/organisations.tsx
index 8287305e7..4ddd6d5a1 100644
--- a/web/app/routes/organisations.tsx
+++ b/web/app/routes/organisations.tsx
@@ -1,7 +1,7 @@
import { redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import Organisations from 'pages/Organisations'
-import { isSelfhosted } from 'lib/constants'
+import Organisations from '~/pages/Organisations'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/password-reset.$id.tsx b/web/app/routes/password-reset.$id.tsx
index 7da914d9e..c6fd63bc4 100644
--- a/web/app/routes/password-reset.$id.tsx
+++ b/web/app/routes/password-reset.$id.tsx
@@ -1,8 +1,8 @@
-import CreateNewPassword from 'pages/Auth/CreateNewPassword'
+import CreateNewPassword from '~/pages/Auth/CreateNewPassword'
import type { SitemapFunction } from 'remix-sitemap'
import type { HeadersFunction } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/pay.tsx b/web/app/routes/pay.tsx
index dfe4e52ec..4257eb9b9 100644
--- a/web/app/routes/pay.tsx
+++ b/web/app/routes/pay.tsx
@@ -2,7 +2,7 @@ import { redirect } from '@remix-run/node'
import { useEffect } from 'react'
import type { SitemapFunction } from 'remix-sitemap'
import { ExternalScriptsHandle } from 'remix-utils/external-scripts'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 0.9,
diff --git a/web/app/routes/performance.tsx b/web/app/routes/performance.tsx
index cda92a251..8b968be72 100644
--- a/web/app/routes/performance.tsx
+++ b/web/app/routes/performance.tsx
@@ -1,11 +1,11 @@
-import Performance from 'pages/Performance'
+import Performance from '~/pages/Performance'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
-import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'lib/constants'
+import { detectTheme, isAuthenticated } from '~/utils/server'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 1,
diff --git a/web/app/routes/press.tsx b/web/app/routes/press.tsx
index d1ac487cc..22fe33070 100644
--- a/web/app/routes/press.tsx
+++ b/web/app/routes/press.tsx
@@ -1,4 +1,4 @@
-import Press from 'pages/Press'
+import Press from '~/pages/Press'
export default function Index() {
return <Press />
diff --git a/web/app/routes/privacy.tsx b/web/app/routes/privacy.tsx
index 97215b907..ab9225d75 100644
--- a/web/app/routes/privacy.tsx
+++ b/web/app/routes/privacy.tsx
@@ -1,4 +1,4 @@
-import Privacy from 'pages/Privacy'
+import Privacy from '~/pages/Privacy'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/project.transfer.cancel.tsx b/web/app/routes/project.transfer.cancel.tsx
index d1a1f2d6d..1a81f25d0 100644
--- a/web/app/routes/project.transfer.cancel.tsx
+++ b/web/app/routes/project.transfer.cancel.tsx
@@ -1,4 +1,4 @@
-import TransferProjectReject from 'pages/Project/Settings/TransferProject/TransferProjectReject'
+import TransferProjectReject from '~/pages/Project/Settings/TransferProject/TransferProjectReject'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/project.transfer.confirm.tsx b/web/app/routes/project.transfer.confirm.tsx
index c7613b21f..aa95fcd4b 100644
--- a/web/app/routes/project.transfer.confirm.tsx
+++ b/web/app/routes/project.transfer.confirm.tsx
@@ -1,4 +1,4 @@
-import TransferProjectConfirm from 'pages/Project/Settings/TransferProject/TransferProjectConfirm'
+import TransferProjectConfirm from '~/pages/Project/Settings/TransferProject/TransferProjectConfirm'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/projects.$id.password.tsx b/web/app/routes/projects.$id.password.tsx
index 2399d70ff..83b687e7e 100644
--- a/web/app/routes/projects.$id.password.tsx
+++ b/web/app/routes/projects.$id.password.tsx
@@ -1,9 +1,9 @@
-import ProjectProtectedPassword from 'pages/Project/ProjectProtectedPassword'
+import ProjectProtectedPassword from '~/pages/Project/ProjectProtectedPassword'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json } from '@remix-run/node'
-import { detectTheme, isEmbedded, getProjectPassword, isAuthenticated } from 'utils/server'
+import { detectTheme, isEmbedded, getProjectPassword, isAuthenticated } from '~/utils/server'
export async function loader({ request }: LoaderFunctionArgs) {
const embedded = isEmbedded(request)
diff --git a/web/app/routes/projects.$id.subscribers.invite.tsx b/web/app/routes/projects.$id.subscribers.invite.tsx
index a482b8c96..54f60285c 100644
--- a/web/app/routes/projects.$id.subscribers.invite.tsx
+++ b/web/app/routes/projects.$id.subscribers.invite.tsx
@@ -1,4 +1,4 @@
-import ConfirmReportsShare from 'pages/Project/Settings/Emails/ConfirmReportsShare'
+import ConfirmReportsShare from '~/pages/Project/Settings/Emails/ConfirmReportsShare'
export default function Index() {
return <ConfirmReportsShare />
diff --git a/web/app/routes/projects.$id.tsx b/web/app/routes/projects.$id.tsx
index 2ac47003b..b0dbcdbc2 100644
--- a/web/app/routes/projects.$id.tsx
+++ b/web/app/routes/projects.$id.tsx
@@ -1,11 +1,11 @@
-import ViewProject from 'pages/Project/View'
+import ViewProject from '~/pages/Project/View'
import type { LinksFunction, LoaderFunctionArgs, MetaFunction } from '@remix-run/node'
import { json } from '@remix-run/node'
import _split from 'lodash/split'
-import { API_URL } from 'lib/constants'
-import { detectTheme, isEmbedded, isAuthenticated, getProjectPassword, getProjectTabs } from 'utils/server'
-import ProjectViewStyle from 'styles/ProjectViewStyle.css'
+import { API_URL } from '~/lib/constants'
+import { detectTheme, isEmbedded, isAuthenticated, getProjectPassword, getProjectTabs } from '~/utils/server'
+import ProjectViewStyle from '~/styles/ProjectViewStyle.css'
export const links: LinksFunction = () => [{ rel: 'stylesheet', href: ProjectViewStyle }]
diff --git a/web/app/routes/projects.$pid.alerts.create.tsx b/web/app/routes/projects.$pid.alerts.create.tsx
index 952e17bdb..fb655e2bb 100644
--- a/web/app/routes/projects.$pid.alerts.create.tsx
+++ b/web/app/routes/projects.$pid.alerts.create.tsx
@@ -1,4 +1,4 @@
-import ProjectAlertsSettings from 'pages/Project/Alerts/Settings'
+import ProjectAlertsSettings from '~/pages/Project/Alerts/Settings'
export default function Index() {
return <ProjectAlertsSettings />
diff --git a/web/app/routes/projects.$pid.alerts.settings.$id.tsx b/web/app/routes/projects.$pid.alerts.settings.$id.tsx
index 04155cc02..cd63e20cf 100644
--- a/web/app/routes/projects.$pid.alerts.settings.$id.tsx
+++ b/web/app/routes/projects.$pid.alerts.settings.$id.tsx
@@ -1,4 +1,4 @@
-import ProjectAlertsSettings from 'pages/Project/Alerts/Settings'
+import ProjectAlertsSettings from '~/pages/Project/Alerts/Settings'
export default function Index() {
return <ProjectAlertsSettings isSettings />
diff --git a/web/app/routes/projects.$pid.uptime.create.tsx b/web/app/routes/projects.$pid.uptime.create.tsx
index 00d48ac72..76439768b 100644
--- a/web/app/routes/projects.$pid.uptime.create.tsx
+++ b/web/app/routes/projects.$pid.uptime.create.tsx
@@ -1,4 +1,4 @@
-import UptimeSettings from 'pages/Project/uptime/Settings'
+import UptimeSettings from '~/pages/Project/uptime/Settings'
export default function Settings() {
return <UptimeSettings />
diff --git a/web/app/routes/projects.$pid.uptime.settings.$id.tsx b/web/app/routes/projects.$pid.uptime.settings.$id.tsx
index ab8163631..b6a3afdde 100644
--- a/web/app/routes/projects.$pid.uptime.settings.$id.tsx
+++ b/web/app/routes/projects.$pid.uptime.settings.$id.tsx
@@ -1,4 +1,4 @@
-import UptimeSettings from 'pages/Project/uptime/Settings'
+import UptimeSettings from '~/pages/Project/uptime/Settings'
export default function Index() {
return <UptimeSettings isSettings />
diff --git a/web/app/routes/projects.new.tsx b/web/app/routes/projects.new.tsx
index 19deff265..4c106e066 100644
--- a/web/app/routes/projects.new.tsx
+++ b/web/app/routes/projects.new.tsx
@@ -1,4 +1,4 @@
-import NewProject from 'pages/Project/New'
+import NewProject from '~/pages/Project/New'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/projects.settings.$id.tsx b/web/app/routes/projects.settings.$id.tsx
index 6aa6bc9d7..df4fed302 100644
--- a/web/app/routes/projects.settings.$id.tsx
+++ b/web/app/routes/projects.settings.$id.tsx
@@ -1,5 +1,5 @@
import { json, type LoaderFunctionArgs } from '@remix-run/node'
-import ProjectSettings from 'pages/Project/Settings'
+import ProjectSettings from '~/pages/Project/Settings'
export async function loader({ request }: LoaderFunctionArgs) {
// return current domain origin, like https://app.swetrix.com
diff --git a/web/app/routes/recovery.tsx b/web/app/routes/recovery.tsx
index 6f41602d1..231e65301 100644
--- a/web/app/routes/recovery.tsx
+++ b/web/app/routes/recovery.tsx
@@ -1,7 +1,7 @@
-import ForgotPassword from 'pages/Auth/ForgotPassword'
+import ForgotPassword from '~/pages/Auth/ForgotPassword'
import type { HeadersFunction } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/ref.$id.$page.tsx b/web/app/routes/ref.$id.$page.tsx
index 556322da5..344ad7bd5 100644
--- a/web/app/routes/ref.$id.$page.tsx
+++ b/web/app/routes/ref.$id.$page.tsx
@@ -1,8 +1,8 @@
import type { LoaderFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted, REFERRAL_COOKIE, REFERRAL_COOKIE_DAYS } from 'lib/constants'
-import { generateCookieString } from 'utils/cookie'
+import { isSelfhosted, REFERRAL_COOKIE, REFERRAL_COOKIE_DAYS } from '~/lib/constants'
+import { generateCookieString } from '~/utils/cookie'
// This route sets the affiliate cookie ($id) and redirects to page specified at $page
export async function loader({ params }: LoaderFunctionArgs) {
diff --git a/web/app/routes/ref.$id.tsx b/web/app/routes/ref.$id.tsx
index ebb7ad43f..c79d96d8d 100644
--- a/web/app/routes/ref.$id.tsx
+++ b/web/app/routes/ref.$id.tsx
@@ -1,10 +1,10 @@
import type { LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
-import ReferralPage from 'pages/ReferralPage'
+import ReferralPage from '~/pages/ReferralPage'
-import { isSelfhosted } from 'lib/constants'
-import { detectTheme } from 'utils/server'
+import { isSelfhosted } from '~/lib/constants'
+import { detectTheme } from '~/utils/server'
export async function loader({ request }: LoaderFunctionArgs) {
if (isSelfhosted) {
diff --git a/web/app/routes/reports-unsubscribe.$token.tsx b/web/app/routes/reports-unsubscribe.$token.tsx
index 236bdff8e..8c67e88b8 100644
--- a/web/app/routes/reports-unsubscribe.$token.tsx
+++ b/web/app/routes/reports-unsubscribe.$token.tsx
@@ -1,7 +1,7 @@
import type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
-import Unsubscribe from 'pages/Unsubscribe'
+import { isSelfhosted } from '~/lib/constants'
+import Unsubscribe from '~/pages/Unsubscribe'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/routes/share.$id.tsx b/web/app/routes/share.$id.tsx
index 97cb46413..2f371a2f0 100644
--- a/web/app/routes/share.$id.tsx
+++ b/web/app/routes/share.$id.tsx
@@ -1,4 +1,4 @@
-import ConfirmShare from 'pages/Project/ConfirmShare'
+import ConfirmShare from '~/pages/Project/ConfirmShare'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/signup.tsx b/web/app/routes/signup.tsx
index e32323f5d..8e417c83b 100644
--- a/web/app/routes/signup.tsx
+++ b/web/app/routes/signup.tsx
@@ -1,11 +1,11 @@
-import Singup from 'pages/Auth/Signup'
+import Singup from '~/pages/Auth/Signup'
import type { SitemapFunction } from 'remix-sitemap'
import type { HeadersFunction, LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
-import { detectTheme } from 'utils/server'
+import { isSelfhosted } from '~/lib/constants'
+import { detectTheme } from '~/utils/server'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/socialised.tsx b/web/app/routes/socialised.tsx
index 6518d18c0..2cdee526f 100644
--- a/web/app/routes/socialised.tsx
+++ b/web/app/routes/socialised.tsx
@@ -1,4 +1,4 @@
-import Socialised from 'pages/Auth/Socialised'
+import Socialised from '~/pages/Auth/Socialised'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/terms.tsx b/web/app/routes/terms.tsx
index af722285f..4321d86ed 100644
--- a/web/app/routes/terms.tsx
+++ b/web/app/routes/terms.tsx
@@ -1,4 +1,4 @@
-import Terms from 'pages/Terms'
+import Terms from '~/pages/Terms'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/user-settings.tsx b/web/app/routes/user-settings.tsx
index f1f8ff41f..ac8fc3e59 100644
--- a/web/app/routes/user-settings.tsx
+++ b/web/app/routes/user-settings.tsx
@@ -1,4 +1,4 @@
-import UserSettings from 'pages/UserSettings'
+import UserSettings from '~/pages/UserSettings'
import type { SitemapFunction } from 'remix-sitemap'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/verify.$id.tsx b/web/app/routes/verify.$id.tsx
index c82b1dab3..04fe186ed 100644
--- a/web/app/routes/verify.$id.tsx
+++ b/web/app/routes/verify.$id.tsx
@@ -1,7 +1,7 @@
-import VerifyEmail from 'pages/Auth/VerifyEmail'
+import VerifyEmail from '~/pages/Auth/VerifyEmail'
import type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'lib/constants'
+import { isSelfhosted } from '~/lib/constants'
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/web/app/ui/Flatpicker.tsx b/web/app/ui/Flatpicker.tsx
index 822588d8b..f73dd1b81 100644
--- a/web/app/ui/Flatpicker.tsx
+++ b/web/app/ui/Flatpicker.tsx
@@ -5,7 +5,7 @@ import _size from 'lodash/size'
import _split from 'lodash/split'
import cx from 'clsx'
-import { MAX_MONTHS_IN_PAST } from 'lib/constants'
+import { MAX_MONTHS_IN_PAST } from '~/lib/constants'
interface FlatPickerProps {
onChange?: (dates: Date[]) => void
diff --git a/web/app/ui/Input.tsx b/web/app/ui/Input.tsx
index 8d009b3ef..694e995cc 100644
--- a/web/app/ui/Input.tsx
+++ b/web/app/ui/Input.tsx
@@ -2,7 +2,7 @@ import React, { memo } from 'react'
import { Description, Field, Input as HeadlessInput, Label } from '@headlessui/react'
import cx from 'clsx'
import _isEmpty from 'lodash/isEmpty'
-import Beta from 'ui/Beta'
+import Beta from '~/ui/Beta'
interface InputProps {
label?: React.ReactNode
diff --git a/web/app/ui/Modal.tsx b/web/app/ui/Modal.tsx
index bb8d62671..c152c062c 100644
--- a/web/app/ui/Modal.tsx
+++ b/web/app/ui/Modal.tsx
@@ -8,7 +8,7 @@ import {
UserGroupIcon,
XMarkIcon,
} from '@heroicons/react/24/outline'
-import Beta from 'ui/Beta'
+import Beta from '~/ui/Beta'
import Spin from './icons/Spin'
interface ModalProps {
diff --git a/web/app/ui/Pagination.tsx b/web/app/ui/Pagination.tsx
index 66db7c404..f5197299a 100644
--- a/web/app/ui/Pagination.tsx
+++ b/web/app/ui/Pagination.tsx
@@ -3,7 +3,7 @@ import { ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/24/solid
import _map from 'lodash/map'
import cx from 'clsx'
import { useTranslation } from 'react-i18next'
-import { usePagination, DOTS } from 'hooks/usePagination'
+import { usePagination, DOTS } from '~/hooks/usePagination'
interface PaginationProps {
page: number
diff --git a/web/app/ui/TimezonePicker.tsx b/web/app/ui/TimezonePicker.tsx
index 1cb5f87e7..a42feb986 100644
--- a/web/app/ui/TimezonePicker.tsx
+++ b/web/app/ui/TimezonePicker.tsx
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'
import _find from 'lodash/find'
import _reduce from 'lodash/reduce'
import _includes from 'lodash/includes'
-import timezones from 'lib/constants/timezones'
+import timezones from '~/lib/constants/timezones'
import Select from './Select'
diff --git a/web/app/utils/accessToken.ts b/web/app/utils/accessToken.ts
index cd8238a98..2b7f63b31 100644
--- a/web/app/utils/accessToken.ts
+++ b/web/app/utils/accessToken.ts
@@ -1,5 +1,5 @@
import _isEmpty from 'lodash/isEmpty'
-import { TOKEN, isBrowser } from 'lib/constants'
+import { TOKEN, isBrowser } from '~/lib/constants'
import { getCookie, setCookie, deleteCookie } from './cookie'
// 14 weeks in seconds
diff --git a/web/app/utils/analytics.ts b/web/app/utils/analytics.ts
index 7ef1bf594..8b50d622b 100644
--- a/web/app/utils/analytics.ts
+++ b/web/app/utils/analytics.ts
@@ -1,6 +1,6 @@
import * as Swetrix from 'swetrix'
import _includes from 'lodash/includes'
-import { isDevelopment, isSelfhosted } from 'lib/constants'
+import { isDevelopment, isSelfhosted } from '~/lib/constants'
const SWETRIX_PID = 'STEzHcB1rALV'
diff --git a/web/app/utils/auth.ts b/web/app/utils/auth.ts
index 149b63824..0251ff8a0 100644
--- a/web/app/utils/auth.ts
+++ b/web/app/utils/auth.ts
@@ -4,8 +4,8 @@ import {
LS_CAPTCHA_VIEW_PREFS_SETTING,
LS_VIEW_PREFS_SETTING,
SHOW_BANNER_AT_PERC,
-} from 'lib/constants'
-import { logoutAllApi, logoutApi } from 'api'
+} from '~/lib/constants'
+import { logoutAllApi, logoutApi } from '~/api'
import { getCookie } from './cookie'
import { getRefreshToken, removeRefreshToken } from './refreshToken'
import { removeAccessToken } from './accessToken'
diff --git a/web/app/utils/compareConvertDate.ts b/web/app/utils/compareConvertDate.ts
index a1f9fb23b..c5c737241 100644
--- a/web/app/utils/compareConvertDate.ts
+++ b/web/app/utils/compareConvertDate.ts
@@ -1,7 +1,7 @@
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
-import { getFormatDate } from 'pages/Project/View/ViewProject.helpers'
+import { getFormatDate } from '~/pages/Project/View/ViewProject.helpers'
dayjs.extend(utc)
diff --git a/web/app/utils/cookie.ts b/web/app/utils/cookie.ts
index 366d0226e..3249f000d 100644
--- a/web/app/utils/cookie.ts
+++ b/web/app/utils/cookie.ts
@@ -1,4 +1,4 @@
-import { isDevelopment, isSelfhosted, isBrowser } from 'lib/constants'
+import { isDevelopment, isSelfhosted, isBrowser } from '~/lib/constants'
const COOKIE_DOMAIN = 'swetrix.com'
diff --git a/web/app/utils/generic.ts b/web/app/utils/generic.ts
index 206cd29fe..6d22ae3e1 100644
--- a/web/app/utils/generic.ts
+++ b/web/app/utils/generic.ts
@@ -4,7 +4,7 @@ import _round from 'lodash/round'
import _map from 'lodash/map'
import _reduce from 'lodash/reduce'
-import { isBrowser } from 'lib/constants'
+import { isBrowser } from '~/lib/constants'
const rx = /\.0+$|(\.[0-9]*[1-9])0+$/
diff --git a/web/app/utils/getPosts.ts b/web/app/utils/getPosts.ts
index 417d734b8..715463b63 100644
--- a/web/app/utils/getPosts.ts
+++ b/web/app/utils/getPosts.ts
@@ -1,6 +1,6 @@
import { marked, type Tokens } from 'marked'
import _isEmpty from 'lodash/isEmpty'
-import { getBlogPost, getBlogPostWithCategory } from 'api'
+import { getBlogPost, getBlogPostWithCategory } from '~/api'
const renderer = new marked.Renderer()
diff --git a/web/app/utils/localstorage.ts b/web/app/utils/localstorage.ts
index 579561fd6..eaffeea22 100644
--- a/web/app/utils/localstorage.ts
+++ b/web/app/utils/localstorage.ts
@@ -1,4 +1,4 @@
-import { isBrowser } from 'lib/constants'
+import { isBrowser } from '~/lib/constants'
/*
* a small localStorage proxy for to persist localStorage
diff --git a/web/app/utils/refreshToken.ts b/web/app/utils/refreshToken.ts
index ef2ad935e..2d0774e87 100644
--- a/web/app/utils/refreshToken.ts
+++ b/web/app/utils/refreshToken.ts
@@ -1,6 +1,6 @@
import _isEmpty from 'lodash/isEmpty'
-import { REFRESH_TOKEN, isBrowser } from 'lib/constants'
+import { REFRESH_TOKEN, isBrowser } from '~/lib/constants'
import { getCookie, setCookie, deleteCookie } from './cookie'
// 14 weeks in seconds
diff --git a/web/app/utils/server.ts b/web/app/utils/server.ts
index a8168ac02..c074d221f 100644
--- a/web/app/utils/server.ts
+++ b/web/app/utils/server.ts
@@ -1,9 +1,9 @@
import type i18next from 'i18next'
-import routes from 'utils/routes'
+import routes from '~/utils/routes'
import _includes from 'lodash/includes'
import _split from 'lodash/split'
import _startsWith from 'lodash/startsWith'
-import { TITLE_SUFFIX, SUPPORTED_THEMES, ThemeType } from 'lib/constants'
+import { TITLE_SUFFIX, SUPPORTED_THEMES, ThemeType } from '~/lib/constants'
/**
* Function detects theme based on user's browser hints and cookies
diff --git a/web/tsconfig.json b/web/tsconfig.json
index cb7ac976e..eb8333899 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -15,7 +15,7 @@
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
- "*": ["./app/*"]
+ "~/*": ["./app/*"]
},
// Remix takes care of building everything in `remix build`.