Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ef21223
chore: added empty state texts
superwaih Jul 3, 2026
7daa267
chore: added empty state texts
superwaih Jul 3, 2026
591218c
updated models text
superwaih Jul 3, 2026
d62647a
chore: added review updates
superwaih Jul 14, 2026
4eaa473
updated header banner
superwaih Jul 14, 2026
8f4971d
updated header banner
superwaih Jul 14, 2026
9d0762d
feat: added snap to grid
superwaih Jul 14, 2026
b2ba8a1
updated range slider
superwaih Jul 14, 2026
50c778a
updated range slider
superwaih Jul 14, 2026
0d9eda2
Rename FAIR_STAC_CATALOG_BASE_URL to VITE_FAIR_STAC_CATALOG_BASE_URL
jeafreezy Jul 15, 2026
0911bec
updated default params
superwaih Jul 15, 2026
ea76107
chore: updated params name
superwaih Jul 15, 2026
8ee6394
Merge branch 'feat/try-fair' of https://github.com/Spatialnode/fAIr i…
superwaih Jul 15, 2026
2ac76e0
chore: remove high and small label
superwaih Jul 15, 2026
8ce9a09
chore: updated texts in parameters
superwaih Jul 16, 2026
d1ba8af
feat: added new icons
superwaih Jul 17, 2026
96cb339
feat: added new icons
superwaih Jul 17, 2026
76f3764
feat: added try fair imagery selector
superwaih Jul 18, 2026
6eb25d5
feat: added signin prompt modal
superwaih Jul 20, 2026
bcef51e
feat: added signin prompt modal
superwaih Jul 20, 2026
1dbe1de
feat: added imagery selector
superwaih Jul 21, 2026
e080c30
feat: added imagery selector
superwaih Jul 21, 2026
3fddc60
feat: simplifed custom imagery flow
superwaih Jul 21, 2026
1d95c58
feat: simplifed custom imagery flow
superwaih Jul 21, 2026
c42e84c
feat: updated search compoent
superwaih Jul 22, 2026
26cdff9
chore: updated search types
superwaih Jul 22, 2026
41513b4
feat: updated icons for map large area
superwaih Jul 22, 2026
2e0da8f
feat: added mode tag in navbar
superwaih Jul 22, 2026
cab6dc8
feat: added mode tag in navbar
superwaih Jul 22, 2026
e70c296
feat: complete feature to map dropdown
superwaih Jul 23, 2026
676e74c
feat: complete feature to map dropdown
superwaih Jul 23, 2026
c0d430d
feat: fix feature dropdown on mobile
superwaih Jul 23, 2026
5a393ce
feat: repositioned use this image button
superwaih Jul 23, 2026
23031ac
feat: repositioned use this image button
superwaih Jul 23, 2026
88aefbf
feat: added share project modal
superwaih Jul 23, 2026
ac90420
feat: added share project modal
superwaih Jul 23, 2026
e256e9c
Remove 'Open in JOSM' option from dropdown
jeafreezy Jul 24, 2026
be5c4a3
Merge pull request #34 from Spatialnode/fix/remove-open-in-josm
superwaih Jul 24, 2026
408ac6e
chore: changed model type to enum
superwaih Jul 24, 2026
b9b5f1f
chore: changed model type to enum
superwaih Jul 24, 2026
464b23e
feat: resolved pending issues
superwaih Jul 27, 2026
67e8f60
feat: resolved pending issues
superwaih Jul 27, 2026
bb7cf03
refactor: remove redirect to fair prod
superwaih Jul 28, 2026
5530e62
refactor: remove redirect to fair prod
superwaih Jul 28, 2026
9dfe530
refactor: remove redirect to fair prod
superwaih Jul 28, 2026
1d8d9cf
chore: setup large area endpoint
superwaih Jul 29, 2026
e9d0af6
chore: setup large area endpoint
superwaih Jul 29, 2026
57900be
feat: disabled inactive navigation routes
jeafreezy Jul 29, 2026
1395b94
chore: fix typos in env variables
jeafreezy Jul 29, 2026
199c289
chore: added feature to map endpoint
superwaih Jul 29, 2026
9919de2
chore: added feature to map endpoint
superwaih Jul 29, 2026
4ce2ad6
chore: updated banner to match api changes
jeafreezy Jul 29, 2026
ed325ba
chore: merge with fair v3
superwaih Jul 29, 2026
f4628dd
chore: merge with fair v3
superwaih Jul 29, 2026
472763a
Merge branch 'feat/fair-v3' of https://github.com/Spatialnode/fAIr in…
superwaih Jul 29, 2026
fa3e505
chore: removed auth from try fair temporarily
superwaih Jul 29, 2026
36685d7
chore: removed auth from try fair temporarily
superwaih Jul 29, 2026
9e93836
chore: move env file to index.ts
superwaih Jul 29, 2026
b1052f1
chore: move env file to index.ts
superwaih Jul 29, 2026
cba00fe
chore: added error toast for map
superwaih Jul 29, 2026
7731987
chore: added error toast for map
superwaih Jul 29, 2026
39fe3ca
chore: added error toast for map
superwaih Jul 29, 2026
90a8d8c
chore: added error toast for map
superwaih Jul 29, 2026
2380080
chore: clean up and fix pending issues
superwaih Jul 30, 2026
d00c4e4
chore: clean up and fix pending issues
superwaih Jul 30, 2026
48ba137
chore: implement new api endpoints for base and local
superwaih Jul 30, 2026
3eec2bc
chore: implement new api endpoints for base and local
superwaih Jul 30, 2026
70e2d8f
chore: resolved issues
superwaih Jul 31, 2026
adcf4ab
Merge pull request #37 from Spatialnode/35-list-of-final-fixes
superwaih Aug 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions frontend/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ VITE_BASE_API_URL = "http://localhost:8000/api/v1/"

# Authentication: "legacy" or "hanko"
VITE_AUTH_PROVIDER = "legacy"
# VITE_HANKO_URL = "https://dev.login.hotosm.org"


# The Hanko authentication URL for user authentication.
# Data type: String (e.g., "https://dev.login.hotosm.org").
# Default value: "https://dev.login.hotosm.org".
VITE_HANKO_URL = "https://dev.login.hotosm.org"

# The matomo application ID.
# Data type: Positive Integer (e.g., 0).
Expand Down Expand Up @@ -225,35 +230,35 @@ VITE_MAXIMUM_ORTHO_SKEW_TOLEARANCE_AND_MAX_ANGLE_CHANGE_IN_DEGREES = 45
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g red, green, #fff.
# Default value: "#D73434".
PREDICTIONS_RESULTS_POINT_FILL_COLOR = "#34D77C"
VITE_PREDICTIONS_RESULTS_POINT_FILL_COLOR = "#34D77C"

# The outline color for the prediction requests points.
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g red, green, #fff.
# Default value: "#D73434".
PREDICTIONS_RESULTS_POINT_OUTLINE_COLOR = "#34D77C"
VITE_PREDICTIONS_RESULTS_POINT_OUTLINE_COLOR = "#34D77C"


#The URL to fetch the latest fair updates.
# Data type: String
# Default value: "https://raw.githubusercontent.com/hotosm/fAIr/develop/docs/assets/fair-updates.json".
FAIR_VIDEO_UPDATES_URL = "https://raw.githubusercontent.com/hotosm/fAIr/develop/docs/assets/fair-updates.json";
VITE_FAIR_VIDEO_UPDATES_URL = "https://raw.githubusercontent.com/hotosm/fAIr/develop/docs/assets/fair-updates.json";

#FAIR Youtube Backup Video URL to use when invalid youtube url is returned.
# Data type: String
# Default value: "https://www.youtube.com/embed/N2_9Bvm05_0?si=to_2aoeRCW3APmmZ".
FAIR_VIDEO_BACKUP_URL = "https://www.youtube.com/embed/N2_9Bvm05_0?si=to_2aoeRCW3APmmZ"
VITE_FAIR_VIDEO_BACKUP_URL = "https://www.youtube.com/embed/N2_9Bvm05_0?si=to_2aoeRCW3APmmZ"


# The number of required MapSwipe validations for a prediction to be considered valid.
# Data type: Positive Integer (e.g., 4).
# Default value: 4.
MAPSWIPE_VERIFICATION_NUMBER = 4
VITE_MAPSWIPE_VERIFICATION_NUMBER = 4

# The group size for MapSwipe projects.
# Data type: Positive Integer (e.g., 25).
# Default value: 25.
MAPSWIPE_GROUP_SIZE = 25
VITE_MAPSWIPE_GROUP_SIZE = 25


# The Hanko authentication token for user authentication. ####### ONLY NEEDED IN DEVELOPMENT ENVIRONMENT. ########
Expand All @@ -277,3 +282,9 @@ VITE_TRY_FAIR_GRID_SIZE = 5
# Data type: String
# Default value: "https://fair.hotosm.org/".
VITE_FAIR_PROD_URL = "https://fair.hotosm.org/"

# When set to "true", bypasses authentication checks on the Try fAIr page,
# allowing access to imagery/location flows without signing in.
# Data type: Boolean string ("true" / "false")
# Default value: "false".
VITE_DISABLE_AUTH_ON_TRY_FAIR = "true"
3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"prepare": "cd .. && husky frontend/.husky"
},
"dependencies": {
"@hookform/resolvers": "^5.4.0",
"@hotosm/hanko-auth": "^0.5.2",
"@hotosm/tool-menu": "0.2.7",
"@reactour/tour": "^3.7.0",
Expand All @@ -41,6 +42,7 @@
"react-dom": "19.1.0",
"react-dropzone": "^14.2.10",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.82.0",
"react-markdown": "^10.1.0",
"react-medium-image-zoom": "^5.2.11",
"react-router-dom": "^6.26.2",
Expand All @@ -50,6 +52,7 @@
"terra-draw-maplibre-gl-adapter": "^1.0.1",
"vaul": "^1.1.2",
"xmlbuilder2": "^3.1.1",
"zod": "^4.4.3",
"zustand": "^5.0.3"
},
"devDependencies": {
Expand Down
39 changes: 39 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions frontend/src/app/providers/auth-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { authService } from "@/services";
import {
AUTH_PROVIDER,
BASE_API_URL,
DISABLE_AUTH_ON_TRY_FAIR,
HOT_FAIR_LOCAL_STORAGE_ACCESS_TOKEN_KEY,
HOT_FAIR_LOGIN_SUCCESSFUL_SESSION_KEY,
HOT_FAIR_SESSION_REDIRECT_KEY,
Expand Down Expand Up @@ -165,6 +166,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
};

useEffect(() => {
if (DISABLE_AUTH_ON_TRY_FAIR) return;
if (AUTH_PROVIDER === "hanko") {
fetchUserProfile();
} else if (token) {
Expand Down Expand Up @@ -234,6 +236,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {

useEffect(() => {
if (AUTH_PROVIDER !== "hanko") return;
if (DISABLE_AUTH_ON_TRY_FAIR) return;

const handleLogin = (e: Event) => {
const user = (e as CustomEvent).detail?.user;
Expand Down Expand Up @@ -261,6 +264,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
* This is majorly to keep the user profile information up to date, especially when the user is logged in.
*/
useEffect(() => {
if (DISABLE_AUTH_ON_TRY_FAIR) return;
const intervalId = setInterval(() => {
if (AUTH_PROVIDER === "hanko" && !IS_DEV) {
fetch(`${BASE_API_URL}auth/me/`, { credentials: "include" })
Expand Down
24 changes: 23 additions & 1 deletion frontend/src/app/router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { APPLICATION_ROUTES } from "@/constants";
import { isNavigationRouteEnabled } from "@/constants/general";
import { MainErrorFallback } from "@/components/errors";
import {
ModelFormsLayout,
Expand All @@ -10,13 +11,34 @@ import {
Navigate,
RouterProvider,
createBrowserRouter,
useLocation,
} from "react-router-dom";
import { ModelsProvider } from "@/app/providers/models-provider";
import { NuqsAdapter } from "nuqs/adapters/react-router/v6";

const RouteAvailabilityGuard = ({ children }: React.PropsWithChildren) => {
const location = useLocation();

if (!isNavigationRouteEnabled(location.pathname)) {
return (
<Navigate
to={APPLICATION_ROUTES.NOTFOUND}
replace
state={{ from: location.pathname }}
/>
);
}

return children;
};

const router = createBrowserRouter([
{
element: <RootLayout />,
element: (
<RouteAvailabilityGuard>
<RootLayout />
</RouteAvailabilityGuard>
),
children: [
/**
* Landing page route starts
Expand Down
Loading
Loading