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!

rename: redux -> lib

Blue Mousea701c08a212c
diff --git a/web/app/App.tsx b/web/app/App.tsx
index 028e43490..3ff0fff57 100644
--- a/web/app/App.tsx
+++ b/web/app/App.tsx
@@ -13,13 +13,13 @@ import Footer from 'components/Footer'
import { Toaster } from 'sonner'
import { getAccessToken } from 'utils/accessToken'
-import { authActions } from 'redux/reducers/auth'
-import { StateType, useAppDispatch } from 'redux/store'
-import { isBrowser, isSelfhosted } from 'redux/constants'
+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 'redux/reducers/ui'
+import UIActions from 'lib/reducers/ui'
import { logout, shouldShowLowEventsBanner } from 'utils/auth'
interface AppProps {
diff --git a/web/app/api/ai.ts b/web/app/api/ai.ts
index 71bdaf5cb..f4a3b9ac3 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 'redux/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 dcb84cdb5..e7bf7a262 100644
--- a/web/app/api/index.ts
+++ b/web/app/api/index.ts
@@ -1,24 +1,24 @@
/* eslint-disable implicit-arrow-linebreak */
import axios, { AxiosResponse } from 'axios'
import createAuthRefreshInterceptor from 'axios-auth-refresh'
-import { store } from 'redux/store'
+import { store } from 'lib/store'
import _map from 'lodash/map'
import _isEmpty from 'lodash/isEmpty'
import _isArray from 'lodash/isArray'
-import { authActions } from 'redux/reducers/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 'redux/constants'
-import { User } from 'redux/models/User'
-import { Auth } from 'redux/models/Auth'
-import { Project, Overall, LiveStats } from 'redux/models/Project'
-import { Alerts } from 'redux/models/Alerts'
-import { Subscriber } from 'redux/models/Subscriber'
+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 'redux/models/Uptime'
-import { Role } from 'redux/models/Organisation'
+import { Monitor, MonitorOverall } from 'lib/models/Uptime'
+import { Role } from 'lib/models/Organisation'
import { logout } from 'utils/auth'
const api = axios.create({
diff --git a/web/app/components/DashboardLockedBanner.tsx b/web/app/components/DashboardLockedBanner.tsx
index 06bef4d17..3133b112a 100644
--- a/web/app/components/DashboardLockedBanner.tsx
+++ b/web/app/components/DashboardLockedBanner.tsx
@@ -1,9 +1,9 @@
import React, { memo, useState, useMemo } from 'react'
import { LockClosedIcon } from '@heroicons/react/24/outline'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import { useTranslation } from 'react-i18next'
-import { DashboardBlockReason } from 'redux/models/User'
+import { DashboardBlockReason } from 'lib/models/User'
import Modal from 'ui/Modal'
const DashboardLockedBanner = () => {
diff --git a/web/app/components/EventsRunningOutBanner.tsx b/web/app/components/EventsRunningOutBanner.tsx
index 8c92364e4..b7f7024ea 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 'redux/store'
+import { useAppDispatch, StateType } from 'lib/store'
import { useTranslation } from 'react-i18next'
import Modal from 'ui/Modal'
-import UIActions from 'redux/reducers/ui'
-import { SHOW_BANNER_AT_PERC } from 'redux/constants'
+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 a1e0cc1c4..37e4ffa39 100644
--- a/web/app/components/Footer/index.tsx
+++ b/web/app/components/Footer/index.tsx
@@ -20,7 +20,7 @@ import {
SWETRIX_VS_SIMPLE_ANALYTICS,
DISCORD_URL,
CAPTCHA_URL,
-} from 'redux/constants'
+} from 'lib/constants'
import routesPath from 'utils/routes'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/solid'
diff --git a/web/app/components/GithubAuth.tsx b/web/app/components/GithubAuth.tsx
index 2d33f22f0..61fde1a36 100644
--- a/web/app/components/GithubAuth.tsx
+++ b/web/app/components/GithubAuth.tsx
@@ -4,10 +4,10 @@ import { useSelector } from 'react-redux'
import cx from 'clsx'
import Button from 'ui/Button'
-import { StateType } from 'redux/store/index'
+import { StateType } from 'lib/store/index'
import GithubDarkSVG from 'ui/icons/GithubDark'
import GithubLightSVG from 'ui/icons/GithubLight'
-import { isBrowser } from 'redux/constants'
+import { isBrowser } from 'lib/constants'
interface GoogleAuthProps {
ssrTheme: string
diff --git a/web/app/components/Header/index.tsx b/web/app/components/Header/index.tsx
index 322dd54c2..06968b960 100644
--- a/web/app/components/Header/index.tsx
+++ b/web/app/components/Header/index.tsx
@@ -39,8 +39,8 @@ import _startsWith from 'lodash/startsWith'
import cx, { clsx } from 'clsx'
import routes from 'utils/routes'
-import { authActions } from 'redux/reducers/auth'
-import UIActions from 'redux/reducers/ui'
+import { authActions } from 'lib/reducers/auth'
+import UIActions from 'lib/reducers/ui'
import {
whitelist,
languages,
@@ -50,11 +50,11 @@ import {
SUPPORTED_THEMES,
isBrowser,
CAPTCHA_URL,
-} from 'redux/constants'
+} from 'lib/constants'
import Dropdown from 'ui/Dropdown'
import Flag from 'ui/Flag'
-import { User } from 'redux/models/User'
-import { useAppDispatch, StateType } from 'redux/store'
+import { User } from 'lib/models/User'
+import { useAppDispatch, StateType } from 'lib/store'
import { logout } from 'utils/auth'
dayjs.extend(utc)
diff --git a/web/app/components/LocaleLinks.tsx b/web/app/components/LocaleLinks.tsx
index 394522f3e..36ff3f199 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 'redux/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 c33ba85c5..d8ff9eee7 100644
--- a/web/app/components/SEO.tsx
+++ b/web/app/components/SEO.tsx
@@ -4,7 +4,7 @@ import _startsWith from 'lodash/startsWith'
import _toUpper from 'lodash/toUpper'
// import { MAIN_URL } from 'redux/constants'
import { getPageMeta } from 'utils/server'
-import { getOgImageUrl } from 'redux/constants'
+import { getOgImageUrl } from 'lib/constants'
import routes from 'utils/routes'
export const SEO = () => {
diff --git a/web/app/components/marketing/Pricing.tsx b/web/app/components/marketing/Pricing.tsx
index 5b70d5950..5a3803a87 100644
--- a/web/app/components/marketing/Pricing.tsx
+++ b/web/app/components/marketing/Pricing.tsx
@@ -24,11 +24,11 @@ import {
REFERRAL_DISCOUNT_CODE,
STANDARD_PLANS,
TRIAL_DAYS,
-} from 'redux/constants'
-import { authActions } from 'redux/reducers/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 'redux/store'
+import { AppDispatch, StateType } from 'lib/store'
import Loader from 'ui/Loader'
import { Badge } from 'ui/Badge'
import { logout } from 'utils/auth'
diff --git a/web/app/entry.client.tsx b/web/app/entry.client.tsx
index c7689faf5..c3ae13d70 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 'redux/constants'
+import { I18N_CACHE_BREAKER } from 'lib/constants'
async function hydrate() {
await i18next
diff --git a/web/app/entry.server.tsx b/web/app/entry.server.tsx
index ae4ee5234..6917e1c2b 100644
--- a/web/app/entry.server.tsx
+++ b/web/app/entry.server.tsx
@@ -10,7 +10,7 @@ import { isbot } from 'isbot'
import { renderToPipeableStream } from 'react-dom/server'
import { createSitemapGenerator } from 'remix-sitemap'
-import { MAIN_URL } from './redux/constants'
+import { MAIN_URL } from './lib/constants'
import i18next from './i18next.server'
import i18n, { detectLanguage } from './i18n'
diff --git a/web/app/hoc/protected.tsx b/web/app/hoc/protected.tsx
index 6644ae545..4242602f9 100644
--- a/web/app/hoc/protected.tsx
+++ b/web/app/hoc/protected.tsx
@@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'
import { useNavigate } from '@remix-run/react'
import { getAccessToken } from 'utils/accessToken'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import routes from 'utils/routes'
type AuthParamType = {
diff --git a/web/app/hooks/usePagination.tsx b/web/app/hooks/usePagination.tsx
index 7230ef1f3..710708db9 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 'redux/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 d52cfd5e1..79cccc056 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 'redux/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 1ea7b6447..ff59df345 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 'redux/constants'
+import { defaultLanguage, whitelist } from 'lib/constants'
import i18n from './i18n'
const i18next = new RemixI18Next({
diff --git a/web/app/redux/constants/index.ts b/web/app/lib/constants/index.ts
similarity index 99%
rename from web/app/redux/constants/index.ts
rename to web/app/lib/constants/index.ts
index d7141ef2a..b634693ee 100644
--- a/web/app/redux/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 'redux/models/Organisation'
+import { Role } from 'lib/models/Organisation'
const displayDateOptions: Intl.DateTimeFormatOptions = {
year: 'numeric',
diff --git a/web/app/redux/constants/timezones.ts b/web/app/lib/constants/timezones.ts
similarity index 100%
rename from web/app/redux/constants/timezones.ts
rename to web/app/lib/constants/timezones.ts
diff --git a/web/app/redux/models/Alerts.ts b/web/app/lib/models/Alerts.ts
similarity index 100%
rename from web/app/redux/models/Alerts.ts
rename to web/app/lib/models/Alerts.ts
diff --git a/web/app/redux/models/Auth.ts b/web/app/lib/models/Auth.ts
similarity index 100%
rename from web/app/redux/models/Auth.ts
rename to web/app/lib/models/Auth.ts
diff --git a/web/app/redux/models/Entry.ts b/web/app/lib/models/Entry.ts
similarity index 100%
rename from web/app/redux/models/Entry.ts
rename to web/app/lib/models/Entry.ts
diff --git a/web/app/redux/models/Metainfo.ts b/web/app/lib/models/Metainfo.ts
similarity index 100%
rename from web/app/redux/models/Metainfo.ts
rename to web/app/lib/models/Metainfo.ts
diff --git a/web/app/redux/models/Organisation.ts b/web/app/lib/models/Organisation.ts
similarity index 100%
rename from web/app/redux/models/Organisation.ts
rename to web/app/lib/models/Organisation.ts
diff --git a/web/app/redux/models/Project.ts b/web/app/lib/models/Project.ts
similarity index 100%
rename from web/app/redux/models/Project.ts
rename to web/app/lib/models/Project.ts
diff --git a/web/app/redux/models/SharedProject.ts b/web/app/lib/models/SharedProject.ts
similarity index 100%
rename from web/app/redux/models/SharedProject.ts
rename to web/app/lib/models/SharedProject.ts
diff --git a/web/app/redux/models/Stats.ts b/web/app/lib/models/Stats.ts
similarity index 100%
rename from web/app/redux/models/Stats.ts
rename to web/app/lib/models/Stats.ts
diff --git a/web/app/redux/models/Subscriber.ts b/web/app/lib/models/Subscriber.ts
similarity index 100%
rename from web/app/redux/models/Subscriber.ts
rename to web/app/lib/models/Subscriber.ts
diff --git a/web/app/redux/models/Uptime.ts b/web/app/lib/models/Uptime.ts
similarity index 100%
rename from web/app/redux/models/Uptime.ts
rename to web/app/lib/models/Uptime.ts
diff --git a/web/app/redux/models/Usageinfo.ts b/web/app/lib/models/Usageinfo.ts
similarity index 100%
rename from web/app/redux/models/Usageinfo.ts
rename to web/app/lib/models/Usageinfo.ts
diff --git a/web/app/redux/models/User.ts b/web/app/lib/models/User.ts
similarity index 100%
rename from web/app/redux/models/User.ts
rename to web/app/lib/models/User.ts
diff --git a/web/app/redux/models/UserFlow.ts b/web/app/lib/models/UserFlow.ts
similarity index 100%
rename from web/app/redux/models/UserFlow.ts
rename to web/app/lib/models/UserFlow.ts
diff --git a/web/app/redux/reducers/auth.ts b/web/app/lib/reducers/auth.ts
similarity index 100%
rename from web/app/redux/reducers/auth.ts
rename to web/app/lib/reducers/auth.ts
diff --git a/web/app/redux/reducers/ui/cache.ts b/web/app/lib/reducers/ui/cache.ts
similarity index 100%
rename from web/app/redux/reducers/ui/cache.ts
rename to web/app/lib/reducers/ui/cache.ts
diff --git a/web/app/redux/reducers/ui/index.ts b/web/app/lib/reducers/ui/index.ts
similarity index 100%
rename from web/app/redux/reducers/ui/index.ts
rename to web/app/lib/reducers/ui/index.ts
diff --git a/web/app/redux/reducers/ui/misc.ts b/web/app/lib/reducers/ui/misc.ts
similarity index 100%
rename from web/app/redux/reducers/ui/misc.ts
rename to web/app/lib/reducers/ui/misc.ts
diff --git a/web/app/redux/reducers/ui/projects.ts b/web/app/lib/reducers/ui/projects.ts
similarity index 93%
rename from web/app/redux/reducers/ui/projects.ts
rename to web/app/lib/reducers/ui/projects.ts
index bf7471888..f580b384e 100644
--- a/web/app/redux/reducers/ui/projects.ts
+++ b/web/app/lib/reducers/ui/projects.ts
@@ -1,5 +1,5 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
-import { PROJECTS_PROTECTED } from 'redux/constants'
+import { PROJECTS_PROTECTED } from 'lib/constants'
import { setItem, getItem } from 'utils/localstorage'
interface InitialState {
diff --git a/web/app/redux/reducers/ui/theme.ts b/web/app/lib/reducers/ui/theme.ts
similarity index 100%
rename from web/app/redux/reducers/ui/theme.ts
rename to web/app/lib/reducers/ui/theme.ts
diff --git a/web/app/redux/store/index.ts b/web/app/lib/store/index.ts
similarity index 94%
rename from web/app/redux/store/index.ts
rename to web/app/lib/store/index.ts
index 4d7a424b3..ad64ff535 100644
--- a/web/app/redux/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 'redux/constants'
+import { isDevelopment } from 'lib/constants'
import authSlice from '../reducers/auth'
import miscSlice from '../reducers/ui/misc'
import projectsSlice from '../reducers/ui/projects'
diff --git a/web/app/modals/Forecast.tsx b/web/app/modals/Forecast.tsx
index 44c7a6692..800277327 100644
--- a/web/app/modals/Forecast.tsx
+++ b/web/app/modals/Forecast.tsx
@@ -6,7 +6,7 @@ import cx from 'clsx'
import Modal from 'ui/Modal'
import Input from 'ui/Input'
-import { FORECAST_MAX_MAPPING } from 'redux/constants'
+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 0ad74c499..b8c4dec86 100644
--- a/web/app/modals/NewFunnel.tsx
+++ b/web/app/modals/NewFunnel.tsx
@@ -9,10 +9,10 @@ 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 'redux/constants'
+import { MIN_FUNNEL_STEPS, MAX_FUNNEL_STEPS } from 'lib/constants'
import { getFilters } from 'api'
-import { Funnel } from 'redux/models/Project'
-import { ProjectForShared } from 'redux/models/SharedProject'
+import { Funnel } from 'lib/models/Project'
+import { ProjectForShared } from 'lib/models/SharedProject'
interface NewFunnelProps {
project: ProjectForShared
diff --git a/web/app/modals/TrackingSnippet.tsx b/web/app/modals/TrackingSnippet.tsx
index 83f28bc7f..ea597492d 100644
--- a/web/app/modals/TrackingSnippet.tsx
+++ b/web/app/modals/TrackingSnippet.tsx
@@ -4,7 +4,7 @@ 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 'redux/constants'
+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/pages/About/index.tsx b/web/app/pages/About/index.tsx
index 704f9412d..92529437c 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 'redux/constants'
+import { CONTACT_EMAIL, GITHUB_URL } from 'lib/constants'
const socialIcons: {
[key: string]: React.ReactNode
diff --git a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
index 1d8f09068..756d9a253 100644
--- a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
+++ b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
@@ -6,8 +6,8 @@ import { useSelector } from 'react-redux'
import Loader from 'ui/Loader'
import { withAuthentication } from 'hoc/protected'
-import { authActions } from 'redux/reducers/auth'
-import { StateType, useAppDispatch } from 'redux/store'
+import { authActions } from 'lib/reducers/auth'
+import { StateType, useAppDispatch } from 'lib/store'
import routes from 'utils/routes'
import { logout } from 'utils/auth'
diff --git a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
index ed9130564..045064ef8 100644
--- a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
+++ b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
@@ -10,7 +10,7 @@ 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 'redux/constants'
+import { TRIAL_DAYS } from 'lib/constants'
import { isValidEmail } from 'utils/validator'
const ForgotPassword = () => {
diff --git a/web/app/pages/Auth/Signin/Signin.tsx b/web/app/pages/Auth/Signin/Signin.tsx
index 43cdacb0f..a149a0d70 100644
--- a/web/app/pages/Auth/Signin/Signin.tsx
+++ b/web/app/pages/Auth/Signin/Signin.tsx
@@ -15,17 +15,17 @@ 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 'redux/constants'
+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 'redux/store'
-import { authActions } from 'redux/reducers/auth'
+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 'redux/reducers/ui'
-import { SSOProvider } from 'redux/models/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 460e9b501..5f648ec2d 100644
--- a/web/app/pages/Auth/Signup/Signup.tsx
+++ b/web/app/pages/Auth/Signup/Signup.tsx
@@ -15,19 +15,19 @@ 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 'redux/constants'
+import { HAVE_I_BEEN_PWNED_URL, REFERRAL_COOKIE, TRIAL_DAYS } from 'lib/constants'
import { trackCustom } from 'utils/analytics'
-import { StateType, useAppDispatch } from 'redux/store'
+import { StateType, useAppDispatch } from 'lib/store'
import { useSelector } from 'react-redux'
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 'redux/reducers/auth'
+import { authActions } from 'lib/reducers/auth'
import { setRefreshToken } from 'utils/refreshToken'
import { shouldShowLowEventsBanner } from 'utils/auth'
-import UIActions from 'redux/reducers/ui'
-import { SSOProvider } from 'redux/models/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 5cc852a33..ca9a7abba 100644
--- a/web/app/pages/Auth/Socialised/index.tsx
+++ b/web/app/pages/Auth/Socialised/index.tsx
@@ -6,7 +6,7 @@ import _split from 'lodash/split'
import _replace from 'lodash/replace'
import { processSSOToken } from 'api'
-import { SSO_PROVIDERS } from 'redux/constants'
+import { SSO_PROVIDERS } from 'lib/constants'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
diff --git a/web/app/pages/Auth/VerifyEmail/index.tsx b/web/app/pages/Auth/VerifyEmail/index.tsx
index d4ddaa458..86bee02c3 100644
--- a/web/app/pages/Auth/VerifyEmail/index.tsx
+++ b/web/app/pages/Auth/VerifyEmail/index.tsx
@@ -8,7 +8,7 @@ import _isString from 'lodash/isString'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
import { verifyEmail } from 'api'
-import { authActions } from 'redux/reducers/auth'
+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 9134bc79d..540acfdc7 100644
--- a/web/app/pages/Billing/index.tsx
+++ b/web/app/pages/Billing/index.tsx
@@ -14,19 +14,19 @@ import {
CONTACT_EMAIL,
paddleLanguageMapping,
isBrowser,
-} from 'redux/constants'
+} from 'lib/constants'
import { loadScript } from 'utils/generic'
import Loader from 'ui/Loader'
-import { useAppDispatch, StateType } from 'redux/store'
+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 'redux/reducers/ui'
+import UIActions from 'lib/reducers/ui'
import Pricing from '../../components/marketing/Pricing'
import DashboardLockedBanner from 'components/DashboardLockedBanner'
-import { UsageInfo } from 'redux/models/Usageinfo'
+import { UsageInfo } from 'lib/models/Usageinfo'
import { getUsageInfo } from 'api'
import { toast } from 'sonner'
diff --git a/web/app/pages/Captcha/Settings/CaptchaSettings.tsx b/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
index 893de2cb3..7b73136d8 100644
--- a/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
+++ b/web/app/pages/Captcha/Settings/CaptchaSettings.tsx
@@ -15,7 +15,7 @@ import _includes from 'lodash/includes'
import { ExclamationTriangleIcon, TrashIcon, XCircleIcon } from '@heroicons/react/24/outline'
import { withAuthentication, auth } from 'hoc/protected'
-import { TITLE_SUFFIX } from 'redux/constants'
+import { TITLE_SUFFIX } from 'lib/constants'
import {
createProject,
updateProject,
@@ -31,10 +31,10 @@ import Checkbox from 'ui/Checkbox'
import Modal from 'ui/Modal'
import { trackCustom } from 'utils/analytics'
import routes from 'utils/routes'
-import { CaptchaProject } from 'redux/models/Project'
+import { CaptchaProject } from 'lib/models/Project'
import { useRequiredParams } from 'hooks/useRequiredParams'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/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 4b198661d..1205c5d97 100644
--- a/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx
+++ b/web/app/pages/Captcha/View/ViewCaptcha.helpers.tsx
@@ -23,7 +23,7 @@ import {
tbsFormatMapper24h,
tbsFormatMapperTooltip,
tbsFormatMapperTooltip24h,
-} from 'redux/constants'
+} from 'lib/constants'
// @ts-ignore
import * as d3 from 'd3'
import { nFormatter } from 'utils/generic'
diff --git a/web/app/pages/Captcha/View/ViewCaptcha.tsx b/web/app/pages/Captcha/View/ViewCaptcha.tsx
index 0ca63cc63..a1c87f3e8 100644
--- a/web/app/pages/Captcha/View/ViewCaptcha.tsx
+++ b/web/app/pages/Captcha/View/ViewCaptcha.tsx
@@ -39,8 +39,8 @@ import {
OS_LOGO_MAP_DARK,
isBrowser,
ThemeType,
-} from 'redux/constants'
-import { CaptchaProject, Project } from 'redux/models/Project'
+} 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'
@@ -68,8 +68,8 @@ import NoEvents from './components/NoEvents'
import Filters from 'pages/Project/View/components/Filters'
import { useRequiredParams } from 'hooks/useRequiredParams'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'redux/store'
-import UIActions from 'redux/reducers/ui'
+import { StateType, useAppDispatch } from 'lib/store'
+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/Changelog/index.tsx b/web/app/pages/Changelog/index.tsx
index e1448a0ed..d592ec58e 100644
--- a/web/app/pages/Changelog/index.tsx
+++ b/web/app/pages/Changelog/index.tsx
@@ -5,7 +5,7 @@ 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 'redux/constants'
+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 72f40d249..02f4476b1 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 'redux/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/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsx
index 0a79ce11e..d1605ca2e 100644
--- a/web/app/pages/Dashboard/Dashboard.tsx
+++ b/web/app/pages/Dashboard/Dashboard.tsx
@@ -12,18 +12,18 @@ 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 'redux/constants'
+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 { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import { ProjectCard } from './ProjectCard'
import { NoProjects } from './NoProjects'
import { AddProject } from './AddProject'
-import { Overall, Project } from 'redux/models/Project'
+import { Overall, Project } from 'lib/models/Project'
import { getProjects, getLiveVisitors, getOverallStats, getOverallStatsCaptcha } from 'api'
const Dashboard = () => {
diff --git a/web/app/pages/Dashboard/ProjectCard.tsx b/web/app/pages/Dashboard/ProjectCard.tsx
index 684eaa2a8..381ef4ef5 100644
--- a/web/app/pages/Dashboard/ProjectCard.tsx
+++ b/web/app/pages/Dashboard/ProjectCard.tsx
@@ -17,10 +17,10 @@ import { nFormatter, calculateRelativePercentage } from 'utils/generic'
import { acceptProjectShare } from 'api'
-import { OverallObject, Project } from 'redux/models/Project'
+import { OverallObject, Project } from 'lib/models/Project'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'redux/store'
-import { authActions } from 'redux/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 db43dd357..d9c41fa4d 100644
--- a/web/app/pages/ErrorTracking/index.tsx
+++ b/web/app/pages/ErrorTracking/index.tsx
@@ -11,8 +11,8 @@ 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 'redux/constants'
-import { StateType } from 'redux/store/index'
+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'
diff --git a/web/app/pages/Imprint/index.tsx b/web/app/pages/Imprint/index.tsx
index 883fc9dc1..1d0531f3f 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 'redux/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 c51950ab8..79ebe2ea8 100644
--- a/web/app/pages/Landings/Marketers.tsx
+++ b/web/app/pages/Landings/Marketers.tsx
@@ -2,8 +2,8 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from 'redux/constants'
+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'
diff --git a/web/app/pages/Landings/SmallBusinesses.tsx b/web/app/pages/Landings/SmallBusinesses.tsx
index 48c436481..e466ec305 100644
--- a/web/app/pages/Landings/SmallBusinesses.tsx
+++ b/web/app/pages/Landings/SmallBusinesses.tsx
@@ -2,8 +2,8 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL, TWITTER_URL } from 'redux/constants'
+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'
diff --git a/web/app/pages/Landings/Startups.tsx b/web/app/pages/Landings/Startups.tsx
index 9ee9a04f8..fe5d2baaf 100644
--- a/web/app/pages/Landings/Startups.tsx
+++ b/web/app/pages/Landings/Startups.tsx
@@ -2,8 +2,8 @@ import { Link, useLoaderData } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
-import { BOOK_A_CALL_URL, DISCORD_URL, isBrowser, LIVE_DEMO_URL } from 'redux/constants'
+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'
diff --git a/web/app/pages/NotFound/index.tsx b/web/app/pages/NotFound/index.tsx
index 0c567ab7e..ddf2d0e91 100644
--- a/web/app/pages/NotFound/index.tsx
+++ b/web/app/pages/NotFound/index.tsx
@@ -3,7 +3,7 @@ import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import routes from 'utils/routes'
-import { isSelfhosted } from 'redux/constants'
+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 6a04e3a01..48a52bbad 100644
--- a/web/app/pages/OpenStartup/index.tsx
+++ b/web/app/pages/OpenStartup/index.tsx
@@ -6,8 +6,8 @@ import { Link } from '@remix-run/react'
import { useSelector } from 'react-redux'
import { nFormatterSeparated } from 'utils/generic'
-import { StateType } from 'redux/store/index'
-import { LIVE_DEMO_URL } from 'redux/constants'
+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 7c122270d..82fadee27 100644
--- a/web/app/pages/Organisations/OrganisationCard.tsx
+++ b/web/app/pages/Organisations/OrganisationCard.tsx
@@ -13,11 +13,11 @@ import Modal from 'ui/Modal'
import { Badge, BadgeProps } from 'ui/Badge'
import routes from 'utils/routes'
-import { DetailedOrganisation } from 'redux/models/Organisation'
+import { DetailedOrganisation } from 'lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType, useAppDispatch } from 'redux/store'
+import { StateType, useAppDispatch } from 'lib/store'
import { acceptOrganisationInvitation } from 'api'
-import { authActions } from 'redux/reducers/auth'
+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 7556ece2e..e0d148564 100644
--- a/web/app/pages/Organisations/Organisations.tsx
+++ b/web/app/pages/Organisations/Organisations.tsx
@@ -13,20 +13,20 @@ 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 'redux/constants'
+import { ENTRIES_PER_PAGE_DASHBOARD } from 'lib/constants'
import EventsRunningOutBanner from 'components/EventsRunningOutBanner'
import useDebounce from 'hooks/useDebounce'
import { createOrganisation, getOrganisations } from 'api'
import Pagination from 'ui/Pagination'
-import { DetailedOrganisation } from 'redux/models/Organisation'
+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 'redux/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 ed1fe393f..8316fdce9 100644
--- a/web/app/pages/Organisations/Settings/People.tsx
+++ b/web/app/pages/Organisations/Settings/People.tsx
@@ -14,11 +14,11 @@ 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 'redux/constants'
+import { roles, INVITATION_EXPIRES_IN } from 'lib/constants'
import useOnClickOutside from 'hooks/useOnClickOutside'
-import { DetailedOrganisation, Role } from 'redux/models/Organisation'
+import { DetailedOrganisation, Role } from 'lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import { changeOrganisationRole, inviteOrganisationMember, removeOrganisationMember } from 'api'
const NoPeople = () => {
diff --git a/web/app/pages/Organisations/Settings/Projects.tsx b/web/app/pages/Organisations/Settings/Projects.tsx
index 39fbbc932..19e2f3006 100644
--- a/web/app/pages/Organisations/Settings/Projects.tsx
+++ b/web/app/pages/Organisations/Settings/Projects.tsx
@@ -9,9 +9,9 @@ import _filter from 'lodash/filter'
import Button from 'ui/Button'
import Modal from 'ui/Modal'
-import { DetailedOrganisation } from 'redux/models/Organisation'
+import { DetailedOrganisation } from 'lib/models/Organisation'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import Tooltip from 'ui/Tooltip'
import { removeProjectFromOrganisation, getProjectsAvailableForOrganisation, addProjectToOrganisation } from 'api'
import { Link } from '@remix-run/react'
@@ -19,7 +19,7 @@ import routes from 'utils/routes'
import Loader from 'ui/Loader'
import Pagination from 'ui/Pagination'
import useDebounce from 'hooks/useDebounce'
-import { Project } from 'redux/models/Project'
+import { Project } from 'lib/models/Project'
interface SelectAProjectProps {
onSelect: (project: Project) => void
diff --git a/web/app/pages/Performance/index.tsx b/web/app/pages/Performance/index.tsx
index eee477418..bd04ceb50 100644
--- a/web/app/pages/Performance/index.tsx
+++ b/web/app/pages/Performance/index.tsx
@@ -11,8 +11,8 @@ 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 'redux/constants'
-import { StateType } from 'redux/store/index'
+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'
diff --git a/web/app/pages/Privacy/index.tsx b/web/app/pages/Privacy/index.tsx
index 2cda5d6dc..431c667d3 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 'redux/constants'
+import { CONTACT_EMAIL, SECURITY_EMAIL, DOCS_URL } from 'lib/constants'
const serviceProviders: {
company: string
diff --git a/web/app/pages/Project/New/index.tsx b/web/app/pages/Project/New/index.tsx
index 05bb048c1..281968e01 100644
--- a/web/app/pages/Project/New/index.tsx
+++ b/web/app/pages/Project/New/index.tsx
@@ -8,15 +8,15 @@ import _size from 'lodash/size'
import _keys from 'lodash/keys'
import { withAuthentication, auth } from 'hoc/protected'
-import { isSelfhosted, TITLE_SUFFIX } from 'redux/constants'
-import { Project } from 'redux/models/Project'
+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 'redux/store'
+import { useAppDispatch, StateType } from 'lib/store'
import Select from 'ui/Select'
const MAX_NAME_LENGTH = 50
diff --git a/web/app/pages/Project/Settings/ProjectSettings.tsx b/web/app/pages/Project/Settings/ProjectSettings.tsx
index 4ea2923af..87ff45b8e 100644
--- a/web/app/pages/Project/Settings/ProjectSettings.tsx
+++ b/web/app/pages/Project/Settings/ProjectSettings.tsx
@@ -18,8 +18,8 @@ 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 'redux/constants'
-import { Project } from 'redux/models/Project'
+import { isSelfhosted, TITLE_SUFFIX, FILTERS_PANELS_ORDER, isBrowser } from 'lib/constants'
+import { Project } from 'lib/models/Project'
import {
updateProject,
deleteProject,
@@ -49,9 +49,9 @@ import Emails from './Emails'
import Select from 'ui/Select'
import { useRequiredParams } from 'hooks/useRequiredParams'
import { ArrowLeftRight, RotateCcw } from 'lucide-react'
-import { StateType, useAppDispatch } from 'redux/store'
+import { StateType, useAppDispatch } from 'lib/store'
import { useSelector } from 'react-redux'
-import UIActions from 'redux/reducers/ui'
+import UIActions from 'lib/reducers/ui'
const MAX_NAME_LENGTH = 50
const MAX_ORIGINS_LENGTH = 300
diff --git a/web/app/pages/Project/View/Panels.tsx b/web/app/pages/Project/View/Panels.tsx
index dab064ca2..089f389bb 100644
--- a/web/app/pages/Project/View/Panels.tsx
+++ b/web/app/pages/Project/View/Panels.tsx
@@ -39,8 +39,8 @@ 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 'redux/constants'
-import { Entry } from 'redux/models/Entry'
+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'
diff --git a/web/app/pages/Project/View/ViewProject.helpers.tsx b/web/app/pages/Project/View/ViewProject.helpers.tsx
index a97a11a09..d2e2a71ae 100644
--- a/web/app/pages/Project/View/ViewProject.helpers.tsx
+++ b/web/app/pages/Project/View/ViewProject.helpers.tsx
@@ -43,11 +43,11 @@ import {
tbsFormatMapperTooltip24h,
PROJECT_TABS,
isSelfhosted,
-} from 'redux/constants'
-import { Entry } from 'redux/models/Entry'
+} 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 'redux/models/Project'
+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/ReferralPage/index.tsx b/web/app/pages/ReferralPage/index.tsx
index b9a825100..c91a2be9b 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 'redux/store/index'
+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 'redux/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 c4a4d78d0..5d3a2ddbf 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 'redux/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 f3b998698..e0287a68c 100644
--- a/web/app/pages/Unsubscribe/index.tsx
+++ b/web/app/pages/Unsubscribe/index.tsx
@@ -5,7 +5,7 @@ import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _isString from 'lodash/isString'
import { useSelector } from 'react-redux'
-import { StateType } from 'redux/store'
+import { StateType } from 'lib/store'
import { unsubscribeFromEmailReports, unsubscribeFromEmailReports3rdParty } from 'api'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
diff --git a/web/app/pages/UserSettings/UserSettings.tsx b/web/app/pages/UserSettings/UserSettings.tsx
index c932c2e22..7665b758b 100644
--- a/web/app/pages/UserSettings/UserSettings.tsx
+++ b/web/app/pages/UserSettings/UserSettings.tsx
@@ -36,8 +36,8 @@ import {
GDPR_EXPORT_TIMEFRAME,
TimeFormat,
isSelfhosted,
-} from 'redux/constants'
-import { User } from 'redux/models/User'
+} 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'
@@ -71,11 +71,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 'redux/store'
-import { authActions } from 'redux/reducers/auth'
+import { StateType, useAppDispatch } from 'lib/store'
+import { authActions } from 'lib/reducers/auth'
import { removeRefreshToken } from 'utils/refreshToken'
import { removeAccessToken } from 'utils/accessToken'
-import UIActions from 'redux/reducers/ui'
+import UIActions from 'lib/reducers/ui'
import { logout } from 'utils/auth'
dayjs.extend(utc)
diff --git a/web/app/root.tsx b/web/app/root.tsx
index ba3ef4755..0d68e93a1 100644
--- a/web/app/root.tsx
+++ b/web/app/root.tsx
@@ -12,8 +12,8 @@ import {
isRouteErrorResponse,
useRouteError,
} from '@remix-run/react'
-import { store } from 'redux/store'
-import { isBrowser, CONTACT_EMAIL, LS_THEME_SETTING, isSelfhosted, I18N_CACHE_BREAKER } from 'redux/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 { ExclamationTriangleIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline'
diff --git a/web/app/routes/3rd-party-unsubscribe.$token.tsx b/web/app/routes/3rd-party-unsubscribe.$token.tsx
index ef01a6f4b..318495cbc 100644
--- a/web/app/routes/3rd-party-unsubscribe.$token.tsx
+++ b/web/app/routes/3rd-party-unsubscribe.$token.tsx
@@ -1,6 +1,6 @@
import type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import Unsubscribe from 'pages/Unsubscribe'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/[robots.txt].tsx b/web/app/routes/[robots.txt].tsx
index aa81e72a2..8ce89eb58 100644
--- a/web/app/routes/[robots.txt].tsx
+++ b/web/app/routes/[robots.txt].tsx
@@ -1,4 +1,4 @@
-import { isSelfhosted } from 'redux/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 0029fe06b..6c7eabf99 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 'redux/constants'
+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 a91d08778..f4a3dc90f 100644
--- a/web/app/routes/billing.tsx
+++ b/web/app/routes/billing.tsx
@@ -4,7 +4,7 @@ import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import Billing from 'pages/Billing'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import { isAuthenticated, detectTheme } from 'utils/server'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/blog.$category.$slug.tsx b/web/app/routes/blog.$category.$slug.tsx
index 3a393c4d3..3b980726c 100644
--- a/web/app/routes/blog.$category.$slug.tsx
+++ b/web/app/routes/blog.$category.$slug.tsx
@@ -2,7 +2,7 @@ import type { LoaderFunction, LinksFunction, MetaFunction } from '@remix-run/nod
import { redirect, json } from '@remix-run/node'
import singlePostCss from 'css/mdfile.css'
import { getPost } from 'utils/getPosts'
-import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from 'redux/constants'
+import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from 'lib/constants'
import Post from 'pages/Blog/Post'
export const links: LinksFunction = () => {
diff --git a/web/app/routes/blog.$slug.tsx b/web/app/routes/blog.$slug.tsx
index 251be4885..70edc418b 100644
--- a/web/app/routes/blog.$slug.tsx
+++ b/web/app/routes/blog.$slug.tsx
@@ -8,7 +8,7 @@ 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 'redux/constants'
+import { isSelfhosted, TITLE_SUFFIX, getOgImageUrl } from 'lib/constants'
import Post from 'pages/Blog/Post'
export const links: LinksFunction = () => {
diff --git a/web/app/routes/blog.tsx b/web/app/routes/blog.tsx
index abd7bd598..327039a63 100644
--- a/web/app/routes/blog.tsx
+++ b/web/app/routes/blog.tsx
@@ -4,7 +4,7 @@ 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 'redux/constants'
+import { isSelfhosted, TITLE_SUFFIX } from 'lib/constants'
import { getBlogPosts } from 'api'
export const loader: LoaderFunction = async () => {
diff --git a/web/app/routes/change-email.$id.tsx b/web/app/routes/change-email.$id.tsx
index 35349fcc9..21c8b7124 100644
--- a/web/app/routes/change-email.$id.tsx
+++ b/web/app/routes/change-email.$id.tsx
@@ -3,7 +3,7 @@ import type { SitemapFunction } from 'remix-sitemap'
import type { HeadersFunction } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
export const headers: HeadersFunction = ({ parentHeaders }) => {
parentHeaders.set('X-Frame-Options', 'DENY')
diff --git a/web/app/routes/confirm-email.tsx b/web/app/routes/confirm-email.tsx
index b4ce42245..da8434ddc 100644
--- a/web/app/routes/confirm-email.tsx
+++ b/web/app/routes/confirm-email.tsx
@@ -2,7 +2,7 @@ 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 'redux/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 3694cc147..4b24d447e 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 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
export async function loader() {
if (isSelfhosted) {
diff --git a/web/app/routes/error-tracking.tsx b/web/app/routes/error-tracking.tsx
index c26313bc0..2efcbedf9 100644
--- a/web/app/routes/error-tracking.tsx
+++ b/web/app/routes/error-tracking.tsx
@@ -5,7 +5,7 @@ import type { SitemapFunction } from 'remix-sitemap'
import ErrorTracking from 'pages/ErrorTracking'
import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'redux/constants'
+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 1e3b03706..a12836adc 100644
--- a/web/app/routes/for-marketers.tsx
+++ b/web/app/routes/for-marketers.tsx
@@ -4,7 +4,7 @@ import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'redux/constants'
+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 f38ebee3a..47b8b5754 100644
--- a/web/app/routes/for-small-businesses.tsx
+++ b/web/app/routes/for-small-businesses.tsx
@@ -4,7 +4,7 @@ import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'redux/constants'
+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 544e375ef..f3d1d03fe 100644
--- a/web/app/routes/for-startups.tsx
+++ b/web/app/routes/for-startups.tsx
@@ -4,7 +4,7 @@ import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 0.9,
diff --git a/web/app/routes/index.tsx b/web/app/routes/index.tsx
index 40c153817..fc4502085 100644
--- a/web/app/routes/index.tsx
+++ b/web/app/routes/index.tsx
@@ -25,8 +25,8 @@ import {
OS_LOGO_MAP,
OS_LOGO_MAP_DARK,
BROWSER_LOGO_MAP,
-} from 'redux/constants'
-import { StateType } from 'redux/store/index'
+} from 'lib/constants'
+import { StateType } from 'lib/store/index'
import { Cookie } from 'lucide-react'
import Header from 'components/Header'
diff --git a/web/app/routes/open.tsx b/web/app/routes/open.tsx
index e007f53f1..d3ee980fd 100644
--- a/web/app/routes/open.tsx
+++ b/web/app/routes/open.tsx
@@ -1,7 +1,7 @@
import OpenStartup from 'pages/OpenStartup'
import { redirect } from '@remix-run/node'
import type { LinksFunction } from '@remix-run/node'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import Style from 'styles/ProjectViewStyle.css'
diff --git a/web/app/routes/organisations.$id.tsx b/web/app/routes/organisations.$id.tsx
index a8fb11ddd..adc286266 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 'redux/constants'
+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 df33179aa..8287305e7 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 'redux/constants'
+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 4df876884..7da914d9e 100644
--- a/web/app/routes/password-reset.$id.tsx
+++ b/web/app/routes/password-reset.$id.tsx
@@ -2,7 +2,7 @@ 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 'redux/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 1ac8330d5..dfe4e52ec 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 'redux/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 580a3a93d..cda92a251 100644
--- a/web/app/routes/performance.tsx
+++ b/web/app/routes/performance.tsx
@@ -5,7 +5,7 @@ import { json, redirect } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
import { detectTheme, isAuthenticated } from 'utils/server'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
export const sitemap: SitemapFunction = () => ({
priority: 1,
diff --git a/web/app/routes/projects.$id.tsx b/web/app/routes/projects.$id.tsx
index 843afb8be..2ac47003b 100644
--- a/web/app/routes/projects.$id.tsx
+++ b/web/app/routes/projects.$id.tsx
@@ -3,7 +3,7 @@ import type { LinksFunction, LoaderFunctionArgs, MetaFunction } from '@remix-run
import { json } from '@remix-run/node'
import _split from 'lodash/split'
-import { API_URL } from 'redux/constants'
+import { API_URL } from 'lib/constants'
import { detectTheme, isEmbedded, isAuthenticated, getProjectPassword, getProjectTabs } from 'utils/server'
import ProjectViewStyle from 'styles/ProjectViewStyle.css'
diff --git a/web/app/routes/recovery.tsx b/web/app/routes/recovery.tsx
index fe90e2766..6f41602d1 100644
--- a/web/app/routes/recovery.tsx
+++ b/web/app/routes/recovery.tsx
@@ -1,7 +1,7 @@
import ForgotPassword from 'pages/Auth/ForgotPassword'
import type { HeadersFunction } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/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 65e29f244..556322da5 100644
--- a/web/app/routes/ref.$id.$page.tsx
+++ b/web/app/routes/ref.$id.$page.tsx
@@ -1,7 +1,7 @@
import type { LoaderFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'
-import { isSelfhosted, REFERRAL_COOKIE, REFERRAL_COOKIE_DAYS } from 'redux/constants'
+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
diff --git a/web/app/routes/ref.$id.tsx b/web/app/routes/ref.$id.tsx
index ba6975d43..ebb7ad43f 100644
--- a/web/app/routes/ref.$id.tsx
+++ b/web/app/routes/ref.$id.tsx
@@ -3,7 +3,7 @@ import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
import ReferralPage from 'pages/ReferralPage'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import { detectTheme } from 'utils/server'
export async function loader({ request }: LoaderFunctionArgs) {
diff --git a/web/app/routes/reports-unsubscribe.$token.tsx b/web/app/routes/reports-unsubscribe.$token.tsx
index a7c3759bf..236bdff8e 100644
--- a/web/app/routes/reports-unsubscribe.$token.tsx
+++ b/web/app/routes/reports-unsubscribe.$token.tsx
@@ -1,6 +1,6 @@
import type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import Unsubscribe from 'pages/Unsubscribe'
export const sitemap: SitemapFunction = () => ({
diff --git a/web/app/routes/signup.tsx b/web/app/routes/signup.tsx
index 76e526e5e..e32323f5d 100644
--- a/web/app/routes/signup.tsx
+++ b/web/app/routes/signup.tsx
@@ -4,7 +4,7 @@ import type { HeadersFunction, LoaderFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { json, redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/constants'
+import { isSelfhosted } from 'lib/constants'
import { detectTheme } from 'utils/server'
export const headers: HeadersFunction = ({ parentHeaders }) => {
diff --git a/web/app/routes/verify.$id.tsx b/web/app/routes/verify.$id.tsx
index f673d0d8f..c82b1dab3 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 type { SitemapFunction } from 'remix-sitemap'
import { redirect } from '@remix-run/node'
-import { isSelfhosted } from 'redux/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 bbe56da84..822588d8b 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 'redux/constants'
+import { MAX_MONTHS_IN_PAST } from 'lib/constants'
interface FlatPickerProps {
onChange?: (dates: Date[]) => void
diff --git a/web/app/ui/TimezonePicker.tsx b/web/app/ui/TimezonePicker.tsx
index 138bb187d..1cb5f87e7 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 'redux/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 4375d8ad1..cd8238a98 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 'redux/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 9e420fb6d..7ef1bf594 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 'redux/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 b40bbe0f4..149b63824 100644
--- a/web/app/utils/auth.ts
+++ b/web/app/utils/auth.ts
@@ -4,7 +4,7 @@ import {
LS_CAPTCHA_VIEW_PREFS_SETTING,
LS_VIEW_PREFS_SETTING,
SHOW_BANNER_AT_PERC,
-} from 'redux/constants'
+} from 'lib/constants'
import { logoutAllApi, logoutApi } from 'api'
import { getCookie } from './cookie'
import { getRefreshToken, removeRefreshToken } from './refreshToken'
diff --git a/web/app/utils/cookie.ts b/web/app/utils/cookie.ts
index 6ac9f4f55..366d0226e 100644
--- a/web/app/utils/cookie.ts
+++ b/web/app/utils/cookie.ts
@@ -1,4 +1,4 @@
-import { isDevelopment, isSelfhosted, isBrowser } from 'redux/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 ff83bbe6c..206cd29fe 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 'redux/constants'
+import { isBrowser } from 'lib/constants'
const rx = /\.0+$|(\.[0-9]*[1-9])0+$/
diff --git a/web/app/utils/localstorage.ts b/web/app/utils/localstorage.ts
index 3c9e520c3..579561fd6 100644
--- a/web/app/utils/localstorage.ts
+++ b/web/app/utils/localstorage.ts
@@ -1,4 +1,4 @@
-import { isBrowser } from 'redux/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 0793237f5..ef2ad935e 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 'redux/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 a720d219c..a8168ac02 100644
--- a/web/app/utils/server.ts
+++ b/web/app/utils/server.ts
@@ -3,7 +3,7 @@ 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 'redux/constants'
+import { TITLE_SUFFIX, SUPPORTED_THEMES, ThemeType } from 'lib/constants'
/**
* Function detects theme based on user's browser hints and cookies