diff --git a/packages/tupaia-web/README.md b/packages/tupaia-web/README.md
index b58ad7ae6e..c86f2e406d 100644
--- a/packages/tupaia-web/README.md
+++ b/packages/tupaia-web/README.md
@@ -1,3 +1,15 @@
# @tupaia/tupaia-web
Main [Tupaia](https://tupaia.org/) application.
+
+## App Directory Structure
+
+- `api`: API layer abstractions such as react-query queries and mutations.
+- `components`: Reusable components that are used throughout the app such as Button, Table, etc.
+- `constants`: App wide constants such as colors, fonts, etc. Some constants are also defined in the components files or directories.
+- `features`: Specific one-off react components that relate to features of the app such as maps, charts etc.
+- `layout`: App wide layout components such as Header, Footer etc.
+- `theme`: @material-ui theme configuration.
+- `utils`: App wide utils such as navigation utils etc.
+- `views`: Top level templates that map to router paths. These might contain components that are specific to the view but are not substantial enough to be a feature such as a one-off form.
+
diff --git a/packages/tupaia-web/src/pages/ModalRoutes.tsx b/packages/tupaia-web/src/ModalRoutes.tsx
similarity index 51%
rename from packages/tupaia-web/src/pages/ModalRoutes.tsx
rename to packages/tupaia-web/src/ModalRoutes.tsx
index a4d00cc0de..c5408dd234 100644
--- a/packages/tupaia-web/src/pages/ModalRoutes.tsx
+++ b/packages/tupaia-web/src/ModalRoutes.tsx
@@ -1,36 +1,36 @@
/*
* Tupaia
- * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
+ * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
import React from 'react';
-import { MODAL_ROUTES, URL_SEARCH_PARAMS } from '../constants';
+import { MODAL_ROUTES, URL_SEARCH_PARAMS } from './constants';
import {
- Projects,
- Login,
- Register,
- VerifyEmailResend,
- RequestProjectAccess,
- RequestCountryAccess,
- ForgotPassword,
- ResetPassword,
-} from '.';
-import { Modal } from '../components';
-import { useModal } from '../utils';
+ ProjectsModal,
+ LoginModal,
+ RegisterModal,
+ VerifyEmailResendModal,
+ RequestProjectAccessModal,
+ RequestCountryAccessModal,
+ ForgotPasswordModal,
+ ResetPasswordModal,
+} from './views';
+import { Modal } from './components';
+import { useModal } from './utils';
/**
* This is the wrapper to handle any search param routes that should be modals
*/
const modalViews = {
- [MODAL_ROUTES.PROJECTS]: Projects,
- [MODAL_ROUTES.LOGIN]: Login,
- [MODAL_ROUTES.REGISTER]: Register,
- [MODAL_ROUTES.REQUEST_COUNTRY_ACCESS]: RequestCountryAccess,
- [MODAL_ROUTES.REQUEST_PROJECT_ACCESS]: RequestProjectAccess,
- [MODAL_ROUTES.FORGOT_PASSWORD]: ForgotPassword,
- [MODAL_ROUTES.RESET_PASSWORD]: ResetPassword,
- [MODAL_ROUTES.VERIFY_EMAIL_RESEND]: VerifyEmailResend,
+ [MODAL_ROUTES.PROJECTS]: ProjectsModal,
+ [MODAL_ROUTES.LOGIN]: LoginModal,
+ [MODAL_ROUTES.REGISTER]: RegisterModal,
+ [MODAL_ROUTES.REQUEST_COUNTRY_ACCESS]: RequestCountryAccessModal,
+ [MODAL_ROUTES.REQUEST_PROJECT_ACCESS]: RequestProjectAccessModal,
+ [MODAL_ROUTES.FORGOT_PASSWORD]: ForgotPasswordModal,
+ [MODAL_ROUTES.RESET_PASSWORD]: ResetPasswordModal,
+ [MODAL_ROUTES.VERIFY_EMAIL_RESEND]: VerifyEmailResendModal,
};
const modalParams = {
diff --git a/packages/tupaia-web/src/Routes.tsx b/packages/tupaia-web/src/Routes.tsx
index 14c24f0e0e..c331b5c2c3 100644
--- a/packages/tupaia-web/src/Routes.tsx
+++ b/packages/tupaia-web/src/Routes.tsx
@@ -4,9 +4,10 @@
*/
import React from 'react';
import { Navigate, Route, Routes as RouterRoutes, useLocation } from 'react-router-dom';
-import { ModalRoutes, LandingPage, Project } from './pages';
+import { LandingPage, ProjectPage } from './views';
+import { ModalRoutes } from './ModalRoutes';
import { MODAL_ROUTES, DEFAULT_URL } from './constants';
-import { Layout } from './layout';
+import { MainLayout } from './layout';
/**
* This Router is using [version 6.3]{@link https://reactrouter.com/en/v6.3.0}, as later versions are not supported by our TS setup. See [this issue here]{@link https://github.com/remix-run/react-router/discussions/8364}
@@ -22,7 +23,7 @@ export const Routes = () => {
{/* This is the layout for the entire app, so needs to be wrapped around the rest of the routes so that we can access params in top bar etc */}
- }>
+ }>
} />
{/* Email verification links redirect to the login page where the verification happens */}
{
/>
} />
{/** Because react-router v 6.3 doesn't support optional url segments, we need to handle dashboardCode with a splat/catch-all instead */}
- } />
+ } />
>
diff --git a/packages/tupaia-web/src/layout/Sidebar/Breadcrumbs.tsx b/packages/tupaia-web/src/features/Dashboard/Breadcrumbs.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/Breadcrumbs.tsx
rename to packages/tupaia-web/src/features/Dashboard/Breadcrumbs.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/Sidebar.tsx b/packages/tupaia-web/src/features/Dashboard/Dashboard.tsx
similarity index 99%
rename from packages/tupaia-web/src/layout/Sidebar/Sidebar.tsx
rename to packages/tupaia-web/src/features/Dashboard/Dashboard.tsx
index 77a8ded84d..d0ca69bb8b 100644
--- a/packages/tupaia-web/src/layout/Sidebar/Sidebar.tsx
+++ b/packages/tupaia-web/src/features/Dashboard/Dashboard.tsx
@@ -99,7 +99,7 @@ const Chart = styled.div`
padding: 1rem 1rem 75%;
`;
-export const Sidebar = () => {
+export const Dashboard = () => {
const { projectCode, entityCode, '*': dashboardCode } = useParams();
const [isExpanded, setIsExpanded] = useState(false);
const { data: entityData } = useEntity(entityCode);
diff --git a/packages/tupaia-web/src/layout/Sidebar/DashboardMenu.tsx b/packages/tupaia-web/src/features/Dashboard/DashboardMenu.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/DashboardMenu.tsx
rename to packages/tupaia-web/src/features/Dashboard/DashboardMenu.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/ExpandButton.tsx b/packages/tupaia-web/src/features/Dashboard/ExpandButton.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/ExpandButton.tsx
rename to packages/tupaia-web/src/features/Dashboard/ExpandButton.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/Media.tsx b/packages/tupaia-web/src/features/Dashboard/Media.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/Media.tsx
rename to packages/tupaia-web/src/features/Dashboard/Media.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/Photo.tsx b/packages/tupaia-web/src/features/Dashboard/Photo.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/Photo.tsx
rename to packages/tupaia-web/src/features/Dashboard/Photo.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/StaticMap.tsx b/packages/tupaia-web/src/features/Dashboard/StaticMap.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Sidebar/StaticMap.tsx
rename to packages/tupaia-web/src/features/Dashboard/StaticMap.tsx
diff --git a/packages/tupaia-web/src/layout/Sidebar/index.ts b/packages/tupaia-web/src/features/Dashboard/index.ts
similarity index 66%
rename from packages/tupaia-web/src/layout/Sidebar/index.ts
rename to packages/tupaia-web/src/features/Dashboard/index.ts
index a1ac18fc21..05a442e59c 100644
--- a/packages/tupaia-web/src/layout/Sidebar/index.ts
+++ b/packages/tupaia-web/src/features/Dashboard/index.ts
@@ -3,4 +3,4 @@
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
-export { Sidebar } from './Sidebar';
+export { Dashboard } from './Dashboard';
diff --git a/packages/tupaia-web/src/layout/Map/Map.tsx b/packages/tupaia-web/src/features/Map/Map.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/Map.tsx
rename to packages/tupaia-web/src/features/Map/Map.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapLegend/DesktopMapLegend.tsx b/packages/tupaia-web/src/features/Map/MapLegend/DesktopMapLegend.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapLegend/DesktopMapLegend.tsx
rename to packages/tupaia-web/src/features/Map/MapLegend/DesktopMapLegend.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapLegend/MapLegend.tsx b/packages/tupaia-web/src/features/Map/MapLegend/MapLegend.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapLegend/MapLegend.tsx
rename to packages/tupaia-web/src/features/Map/MapLegend/MapLegend.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapLegend/MobileMapLegend.tsx b/packages/tupaia-web/src/features/Map/MapLegend/MobileMapLegend.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapLegend/MobileMapLegend.tsx
rename to packages/tupaia-web/src/features/Map/MapLegend/MobileMapLegend.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapLegend/index.ts b/packages/tupaia-web/src/features/Map/MapLegend/index.ts
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapLegend/index.ts
rename to packages/tupaia-web/src/features/Map/MapLegend/index.ts
diff --git a/packages/tupaia-web/src/layout/Map/MapOverlaySelector/DesktopMapOverlaySelector.tsx b/packages/tupaia-web/src/features/Map/MapOverlaySelector/DesktopMapOverlaySelector.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapOverlaySelector/DesktopMapOverlaySelector.tsx
rename to packages/tupaia-web/src/features/Map/MapOverlaySelector/DesktopMapOverlaySelector.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapOverlaySelector/MapOverlaySelector.tsx b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelector.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapOverlaySelector/MapOverlaySelector.tsx
rename to packages/tupaia-web/src/features/Map/MapOverlaySelector/MapOverlaySelector.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapOverlaySelector/MobileMapOverlaySelector.tsx b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MobileMapOverlaySelector.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapOverlaySelector/MobileMapOverlaySelector.tsx
rename to packages/tupaia-web/src/features/Map/MapOverlaySelector/MobileMapOverlaySelector.tsx
diff --git a/packages/tupaia-web/src/layout/Map/MapOverlaySelector/index.ts b/packages/tupaia-web/src/features/Map/MapOverlaySelector/index.ts
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapOverlaySelector/index.ts
rename to packages/tupaia-web/src/features/Map/MapOverlaySelector/index.ts
diff --git a/packages/tupaia-web/src/layout/Map/MapWatermark.tsx b/packages/tupaia-web/src/features/Map/MapWatermark.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/MapWatermark.tsx
rename to packages/tupaia-web/src/features/Map/MapWatermark.tsx
diff --git a/packages/tupaia-web/src/layout/Map/index.ts b/packages/tupaia-web/src/features/Map/index.ts
similarity index 100%
rename from packages/tupaia-web/src/layout/Map/index.ts
rename to packages/tupaia-web/src/features/Map/index.ts
diff --git a/packages/tupaia-web/src/features/index.ts b/packages/tupaia-web/src/features/index.ts
index 652a972fc4..c57eb32a4c 100644
--- a/packages/tupaia-web/src/features/index.ts
+++ b/packages/tupaia-web/src/features/index.ts
@@ -2,3 +2,5 @@
* Tupaia
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
+export { Map } from './Map';
+export { Dashboard } from './Dashboard';
diff --git a/packages/tupaia-web/src/layout/Layout.tsx b/packages/tupaia-web/src/layout/MainLayout.tsx
similarity index 96%
rename from packages/tupaia-web/src/layout/Layout.tsx
rename to packages/tupaia-web/src/layout/MainLayout.tsx
index a197494f99..9d1076d3fa 100644
--- a/packages/tupaia-web/src/layout/Layout.tsx
+++ b/packages/tupaia-web/src/layout/MainLayout.tsx
@@ -31,7 +31,7 @@ const Container = styled.div`
}
`;
-export const Layout = () => {
+export const MainLayout = () => {
return (
diff --git a/packages/tupaia-web/src/layout/index.ts b/packages/tupaia-web/src/layout/index.ts
index cf14727a1d..9c4fbd9a85 100644
--- a/packages/tupaia-web/src/layout/index.ts
+++ b/packages/tupaia-web/src/layout/index.ts
@@ -2,9 +2,5 @@
* Tupaia
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
-export { DesktopLayout } from './DesktopLayout';
-export { Layout } from './Layout';
-export { Map } from './Map';
+export { MainLayout } from './MainLayout';
export * from './ProjectCardList';
-export { Sidebar } from './Sidebar';
-export { MobileTabLayout } from './MobileTabLayout';
diff --git a/packages/tupaia-web/src/pages/index.ts b/packages/tupaia-web/src/pages/index.ts
deleted file mode 100644
index 95aed6605f..0000000000
--- a/packages/tupaia-web/src/pages/index.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * Tupaia
- * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
- */
-export { LandingPage } from './LandingPage';
-export { Login } from './Login';
-export { ResetPassword } from './ResetPassword/ResetPassword';
-export { Project } from './Project';
-export { Register } from './Register';
-export { Projects } from './Projects';
-export { RequestCountryAccess } from './RequestCountryAccess';
-export { RequestProjectAccess } from './RequestProjectAccess';
-export { ForgotPassword } from './ForgotPassword';
-export { EmailVerification } from './EmailVerification';
-export { VerifyEmailResend } from './VerifyEmailResend';
-export { ModalRoutes } from './ModalRoutes';
diff --git a/packages/tupaia-web/src/pages/EmailVerification.tsx b/packages/tupaia-web/src/views/EmailVerificationModal.tsx
similarity index 93%
rename from packages/tupaia-web/src/pages/EmailVerification.tsx
rename to packages/tupaia-web/src/views/EmailVerificationModal.tsx
index ab401aa4fc..ffec9ed5b4 100644
--- a/packages/tupaia-web/src/pages/EmailVerification.tsx
+++ b/packages/tupaia-web/src/views/EmailVerificationModal.tsx
@@ -15,7 +15,7 @@ const Error = styled(Typography)`
color: ${({ theme }) => theme.palette.error.main};
`;
-export const EmailVerification = () => {
+export const EmailVerificationModal = () => {
const { isSuccess, isError } = useEmailVerification();
if (isSuccess) return Your e-mail was successfully verified;
diff --git a/packages/tupaia-web/src/pages/ForgotPassword.tsx b/packages/tupaia-web/src/views/ForgotPasswordModal.tsx
similarity index 98%
rename from packages/tupaia-web/src/pages/ForgotPassword.tsx
rename to packages/tupaia-web/src/views/ForgotPasswordModal.tsx
index 989f0594d6..3b6d823759 100644
--- a/packages/tupaia-web/src/pages/ForgotPassword.tsx
+++ b/packages/tupaia-web/src/views/ForgotPasswordModal.tsx
@@ -37,7 +37,7 @@ const CheckEmailMessage = styled.p`
padding: 0 0.9375rem;
`;
-export const ForgotPassword = () => {
+export const ForgotPasswordModal = () => {
const formContext = useForm({
mode: 'onChange',
});
diff --git a/packages/tupaia-web/src/pages/LandingPage/LandingPage.tsx b/packages/tupaia-web/src/views/LandingPage/LandingPage.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/LandingPage/LandingPage.tsx
rename to packages/tupaia-web/src/views/LandingPage/LandingPage.tsx
diff --git a/packages/tupaia-web/src/pages/LandingPage/LandingPageFooter.tsx b/packages/tupaia-web/src/views/LandingPage/LandingPageFooter.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/LandingPage/LandingPageFooter.tsx
rename to packages/tupaia-web/src/views/LandingPage/LandingPageFooter.tsx
diff --git a/packages/tupaia-web/src/pages/LandingPage/MultiProjectLandingPage.tsx b/packages/tupaia-web/src/views/LandingPage/MultiProjectLandingPage.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/LandingPage/MultiProjectLandingPage.tsx
rename to packages/tupaia-web/src/views/LandingPage/MultiProjectLandingPage.tsx
diff --git a/packages/tupaia-web/src/pages/LandingPage/SingleProjectLandingPage.tsx b/packages/tupaia-web/src/views/LandingPage/SingleProjectLandingPage.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/LandingPage/SingleProjectLandingPage.tsx
rename to packages/tupaia-web/src/views/LandingPage/SingleProjectLandingPage.tsx
diff --git a/packages/tupaia-web/src/pages/LandingPage/index.ts b/packages/tupaia-web/src/views/LandingPage/index.ts
similarity index 100%
rename from packages/tupaia-web/src/pages/LandingPage/index.ts
rename to packages/tupaia-web/src/views/LandingPage/index.ts
diff --git a/packages/tupaia-web/src/pages/Login.tsx b/packages/tupaia-web/src/views/LoginModal.tsx
similarity index 88%
rename from packages/tupaia-web/src/pages/Login.tsx
rename to packages/tupaia-web/src/views/LoginModal.tsx
index 31a3f5008f..03bf2406df 100644
--- a/packages/tupaia-web/src/pages/Login.tsx
+++ b/packages/tupaia-web/src/views/LoginModal.tsx
@@ -9,7 +9,7 @@ import Typography from '@material-ui/core/Typography';
import { useLogin } from '../api/mutations';
import { AuthModalBody, AuthModalButton, TextField, RouterLink, Form } from '../components';
import { FORM_FIELD_VALIDATION, MODAL_ROUTES } from '../constants';
-import { EmailVerification } from './EmailVerification';
+import { EmailVerificationModal } from './EmailVerificationModal';
const ModalBody = styled(AuthModalBody)`
width: 38rem;
@@ -42,13 +42,17 @@ const ForgotPasswordText = styled(LinkText)`
text-align: right;
`;
-export const Login = () => {
+export const LoginModal = () => {
const formContext = useForm();
const { mutate: login, isLoading, isError, error } = useLogin();
return (
- {isError ? {error.message} : }
+ {isError ? (
+ {error.message}
+ ) : (
+
+ )}
} formContext={formContext}>
{
return (
-
+
);
};
diff --git a/packages/tupaia-web/src/layout/MobileTabLayout/Footer.tsx b/packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/Footer.tsx
similarity index 100%
rename from packages/tupaia-web/src/layout/MobileTabLayout/Footer.tsx
rename to packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/Footer.tsx
diff --git a/packages/tupaia-web/src/layout/MobileTabLayout/MobileTabLayout.tsx b/packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/MobileTabLayout.tsx
similarity index 91%
rename from packages/tupaia-web/src/layout/MobileTabLayout/MobileTabLayout.tsx
rename to packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/MobileTabLayout.tsx
index 7eb97022e6..d5968e5514 100644
--- a/packages/tupaia-web/src/layout/MobileTabLayout/MobileTabLayout.tsx
+++ b/packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/MobileTabLayout.tsx
@@ -9,10 +9,9 @@ import { Typography, Tabs as MuiTabs, Tab as MuiTab } from '@material-ui/core';
import { TabContext, TabPanel as MuiTabPanel } from '@material-ui/lab';
import { useParams } from 'react-router';
import { useSearchParams } from 'react-router-dom';
-import { useEntity } from '../../api/queries';
-import { MOBILE_BREAKPOINT, TABS, URL_SEARCH_PARAMS } from '../../constants';
-import { Map } from '../Map';
-import { Sidebar } from '..';
+import { useEntity } from '../../../api/queries';
+import { MOBILE_BREAKPOINT, TABS, URL_SEARCH_PARAMS } from '../../../constants';
+import { Dashboard, Map } from '../../../features';
import { Footer } from './Footer';
const Wrapper = styled.div`
@@ -72,7 +71,7 @@ export const MobileTabLayout = () => {
const selectedTab = urlSearchParams.get(URL_SEARCH_PARAMS.TAB) || TABS.DASHBOARD;
- const setSelectedTab = (e: ChangeEvent<{}>, value: `${TABS}`) => {
+ const setSelectedTab = (_event: ChangeEvent<{}>, value: `${TABS}`) => {
urlSearchParams.set(URL_SEARCH_PARAMS.TAB, value);
setUrlSearchParams(urlSearchParams);
};
@@ -86,7 +85,7 @@ export const MobileTabLayout = () => {
{data && {data.name}}
-
+
diff --git a/packages/tupaia-web/src/layout/MobileTabLayout/index.ts b/packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/index.ts
similarity index 100%
rename from packages/tupaia-web/src/layout/MobileTabLayout/index.ts
rename to packages/tupaia-web/src/views/ProjectPage/MobileTabLayout/index.ts
diff --git a/packages/tupaia-web/src/pages/Project.tsx b/packages/tupaia-web/src/views/ProjectPage/ProjectPage.tsx
similarity index 73%
rename from packages/tupaia-web/src/pages/Project.tsx
rename to packages/tupaia-web/src/views/ProjectPage/ProjectPage.tsx
index 9340542aef..18dd15f696 100644
--- a/packages/tupaia-web/src/pages/Project.tsx
+++ b/packages/tupaia-web/src/views/ProjectPage/ProjectPage.tsx
@@ -1,14 +1,15 @@
/*
* Tupaia
- * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
+ * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
import React from 'react';
-import { DesktopLayout, MobileTabLayout } from '../layout';
+import { DesktopLayout } from './DesktopLayout';
+import { MobileTabLayout } from './MobileTabLayout';
/**
* This is the layout for the project/* view. This contains the map and the sidebar, as well as any overlays that are not auth overlays (i.e. not needed in landing pages)
*/
-export const Project = () => {
+export const ProjectPage = () => {
// Use these to fetch the project and any other entity info you might need
// const { projectCode, entityCode, '*': dashboardCode } = useParams();
diff --git a/packages/tupaia-web/src/pages/Register/index.ts b/packages/tupaia-web/src/views/ProjectPage/index.ts
similarity index 64%
rename from packages/tupaia-web/src/pages/Register/index.ts
rename to packages/tupaia-web/src/views/ProjectPage/index.ts
index a2c9243c21..902003371e 100644
--- a/packages/tupaia-web/src/pages/Register/index.ts
+++ b/packages/tupaia-web/src/views/ProjectPage/index.ts
@@ -3,4 +3,4 @@
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
-export { Register } from './Register';
+export { ProjectPage } from './ProjectPage';
diff --git a/packages/tupaia-web/src/pages/Projects.tsx b/packages/tupaia-web/src/views/ProjectsModal.tsx
similarity index 98%
rename from packages/tupaia-web/src/pages/Projects.tsx
rename to packages/tupaia-web/src/views/ProjectsModal.tsx
index 364753b0a4..ec51d1b80c 100644
--- a/packages/tupaia-web/src/pages/Projects.tsx
+++ b/packages/tupaia-web/src/views/ProjectsModal.tsx
@@ -70,7 +70,7 @@ const Logo = styled.img`
/**
* This is the projects view that is shown when the projects modal is open
*/
-export const Projects = () => {
+export const ProjectsModal = () => {
const {
data: { projects },
} = useProjects();
diff --git a/packages/tupaia-web/src/pages/Register/Register.tsx b/packages/tupaia-web/src/views/RegisterModal/RegisterModal.tsx
similarity index 98%
rename from packages/tupaia-web/src/pages/Register/Register.tsx
rename to packages/tupaia-web/src/views/RegisterModal/RegisterModal.tsx
index fa99dabcf6..97b0b00953 100644
--- a/packages/tupaia-web/src/pages/Register/Register.tsx
+++ b/packages/tupaia-web/src/views/RegisterModal/RegisterModal.tsx
@@ -56,7 +56,7 @@ const StyledForm = styled(Form)`
}
`;
-export const Register = () => {
+export const RegisterModal = () => {
const { mutate: onSubmit, isLoading, isSuccess, isError, error } = useRegister();
const formContext = useForm();
diff --git a/packages/tupaia-web/src/pages/Register/SignUpComplete.tsx b/packages/tupaia-web/src/views/RegisterModal/SignUpComplete.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/Register/SignUpComplete.tsx
rename to packages/tupaia-web/src/views/RegisterModal/SignUpComplete.tsx
diff --git a/packages/tupaia-web/src/views/RegisterModal/index.ts b/packages/tupaia-web/src/views/RegisterModal/index.ts
new file mode 100644
index 0000000000..e7c7c680c2
--- /dev/null
+++ b/packages/tupaia-web/src/views/RegisterModal/index.ts
@@ -0,0 +1,6 @@
+/*
+ * Tupaia
+ * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
+ */
+
+export { RegisterModal } from './RegisterModal';
diff --git a/packages/tupaia-web/src/pages/RequestCountryAccess.tsx b/packages/tupaia-web/src/views/RequestCountryAccessModal.tsx
similarity index 98%
rename from packages/tupaia-web/src/pages/RequestCountryAccess.tsx
rename to packages/tupaia-web/src/views/RequestCountryAccessModal.tsx
index 86134ae24e..d011ea67aa 100644
--- a/packages/tupaia-web/src/pages/RequestCountryAccess.tsx
+++ b/packages/tupaia-web/src/views/RequestCountryAccessModal.tsx
@@ -41,7 +41,7 @@ const Title = styled(Typography).attrs({
margin-bottom: 1rem;
`;
-export const RequestCountryAccess = () => {
+export const RequestCountryAccessModal = () => {
const formContext = useForm();
const { data, isLoading: isLoadingList } = useCountryAccessList();
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/ModalHeader.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/ModalHeader.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/ModalHeader.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/ModalHeader.tsx
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/ProjectAccessForm.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectAccessForm.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/ProjectAccessForm.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectAccessForm.tsx
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/ProjectDetails.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectDetails.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/ProjectDetails.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectDetails.tsx
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/ProjectHero.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectHero.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/ProjectHero.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/ProjectHero.tsx
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/RequestProjectAccess.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/RequestProjectAccessModal.tsx
similarity index 98%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/RequestProjectAccess.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/RequestProjectAccessModal.tsx
index 150017434c..fd18d79be0 100644
--- a/packages/tupaia-web/src/pages/RequestProjectAccess/RequestProjectAccess.tsx
+++ b/packages/tupaia-web/src/views/RequestProjectAccessModal/RequestProjectAccessModal.tsx
@@ -23,7 +23,7 @@ const ModalBody = styled.div`
max-width: 100%;
`;
-export const RequestProjectAccess = () => {
+export const RequestProjectAccessModal = () => {
const [urlSearchParams] = useSearchParams();
const [requestAdditionalCountries, setRequestAdditionalCountries] = useState(false);
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/RequestedCountries.tsx b/packages/tupaia-web/src/views/RequestProjectAccessModal/RequestedCountries.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/RequestedCountries.tsx
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/RequestedCountries.tsx
diff --git a/packages/tupaia-web/src/pages/RequestProjectAccess/index.ts b/packages/tupaia-web/src/views/RequestProjectAccessModal/index.ts
similarity index 52%
rename from packages/tupaia-web/src/pages/RequestProjectAccess/index.ts
rename to packages/tupaia-web/src/views/RequestProjectAccessModal/index.ts
index ba28b60619..2efd543e8c 100644
--- a/packages/tupaia-web/src/pages/RequestProjectAccess/index.ts
+++ b/packages/tupaia-web/src/views/RequestProjectAccessModal/index.ts
@@ -3,4 +3,4 @@
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
-export { RequestProjectAccess } from './RequestProjectAccess';
+export { RequestProjectAccessModal } from './RequestProjectAccessModal';
diff --git a/packages/tupaia-web/src/pages/ResetPassword/OneTimeLogin.tsx b/packages/tupaia-web/src/views/ResetPasswordModal/OneTimeLogin.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/ResetPassword/OneTimeLogin.tsx
rename to packages/tupaia-web/src/views/ResetPasswordModal/OneTimeLogin.tsx
diff --git a/packages/tupaia-web/src/pages/ResetPassword/ResetPasswordForm.tsx b/packages/tupaia-web/src/views/ResetPasswordModal/ResetPasswordForm.tsx
similarity index 100%
rename from packages/tupaia-web/src/pages/ResetPassword/ResetPasswordForm.tsx
rename to packages/tupaia-web/src/views/ResetPasswordModal/ResetPasswordForm.tsx
diff --git a/packages/tupaia-web/src/pages/ResetPassword/ResetPassword.tsx b/packages/tupaia-web/src/views/ResetPasswordModal/ResetPasswordModal.tsx
similarity index 96%
rename from packages/tupaia-web/src/pages/ResetPassword/ResetPassword.tsx
rename to packages/tupaia-web/src/views/ResetPasswordModal/ResetPasswordModal.tsx
index df8af3d038..d5d69f9862 100644
--- a/packages/tupaia-web/src/pages/ResetPassword/ResetPassword.tsx
+++ b/packages/tupaia-web/src/views/ResetPasswordModal/ResetPasswordModal.tsx
@@ -15,7 +15,7 @@ const ModalBody = styled(AuthModalBody)`
width: 38rem;
`;
-export const ResetPassword = () => {
+export const ResetPasswordModal = () => {
const [urlSearchParams] = useSearchParams();
const { mutate: attemptLogin, isError, isLoading, isSuccess } = useOneTimeLogin();
const token = urlSearchParams.get(URL_SEARCH_PARAMS.PASSWORD_RESET_TOKEN);
diff --git a/packages/tupaia-web/src/pages/ResetPassword/index.ts b/packages/tupaia-web/src/views/ResetPasswordModal/index.ts
similarity index 57%
rename from packages/tupaia-web/src/pages/ResetPassword/index.ts
rename to packages/tupaia-web/src/views/ResetPasswordModal/index.ts
index a4a2c90fa5..22105dbe53 100644
--- a/packages/tupaia-web/src/pages/ResetPassword/index.ts
+++ b/packages/tupaia-web/src/views/ResetPasswordModal/index.ts
@@ -3,4 +3,4 @@
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/
-export { ResetPassword } from './ResetPassword';
+export { ResetPasswordModal } from './ResetPasswordModal';
diff --git a/packages/tupaia-web/src/pages/VerifyEmailResend.tsx b/packages/tupaia-web/src/views/VerifyEmailResendModal.tsx
similarity index 97%
rename from packages/tupaia-web/src/pages/VerifyEmailResend.tsx
rename to packages/tupaia-web/src/views/VerifyEmailResendModal.tsx
index 2b8e89720d..d042b7d4da 100644
--- a/packages/tupaia-web/src/pages/VerifyEmailResend.tsx
+++ b/packages/tupaia-web/src/views/VerifyEmailResendModal.tsx
@@ -26,7 +26,7 @@ const StyledForm = styled(Form)`
max-width: 100%;
`;
-export const VerifyEmailResend = () => {
+export const VerifyEmailResendModal = () => {
const formContext = useForm();
const { mutate: submit, isSuccess, isLoading, isError, error } = useResendVerificationEmail();
diff --git a/packages/tupaia-web/src/views/index.ts b/packages/tupaia-web/src/views/index.ts
new file mode 100644
index 0000000000..5386b7e8ea
--- /dev/null
+++ b/packages/tupaia-web/src/views/index.ts
@@ -0,0 +1,15 @@
+/**
+ * Tupaia
+ * Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
+ */
+export { LandingPage } from './LandingPage';
+export { LoginModal } from './LoginModal';
+export { ResetPasswordModal } from './ResetPasswordModal/ResetPasswordModal';
+export { ProjectPage } from './ProjectPage';
+export { RegisterModal } from './RegisterModal';
+export { ProjectsModal } from './ProjectsModal';
+export { RequestCountryAccessModal } from './RequestCountryAccessModal';
+export { RequestProjectAccessModal } from './RequestProjectAccessModal';
+export { ForgotPasswordModal } from './ForgotPasswordModal';
+export { EmailVerificationModal } from './EmailVerificationModal';
+export { VerifyEmailResendModal } from './VerifyEmailResendModal';