Skip to content

Heatmap Implementation #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

For any questions or support, please contact us at [email protected] or visit our website [https://www.airqo.net](https://www.airqo.net).

# frontend
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Revise or remove redundant README header.
Appending # frontend at the end duplicates the top-level heading and doesn’t add contextual information about this directory. Consider replacing it with a brief overview of the frontend folder or removing it entirely.

🤖 Prompt for AI Agents
In frontend/README.md at line 158, the header "# frontend" is redundant as it
duplicates the top-level heading. Remove this line or replace it with a concise
summary describing the purpose or contents of the frontend directory to provide
meaningful context.

14 changes: 14 additions & 0 deletions frontend/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ import type { NextConfig } from "next"

const nextConfig: NextConfig = {
reactStrictMode: false,
webpack: (config, { isServer }) => {
if (!isServer) {
// Don't attempt to import these modules on the client-side
config.resolve.fallback = {
net: false,
tls: false,
fs: false,
dns: false,
child_process: false,
http2: false,
}
}
return config
},
}

export default nextConfig
207 changes: 199 additions & 8 deletions frontend/package-lock.json

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

4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"leaflet": "^1.9.4",
"leaflet-draw": "^1.0.4",
"leaflet-geosearch": "^4.2.0",
"leaflet.heat": "^0.2.0",
"lucide-react": "^0.475.0",
"mongodb": "5.9.2",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: mongodb on frontend bundle.
Including the official mongodb driver in client-side code can drastically increase bundle size and expose backend logic. If it’s only used in Next.js API routes, move it to a server-only dependency or mark it as external.

🤖 Prompt for AI Agents
In frontend/package.json at line 33, the `mongodb` package is included in the
frontend dependencies, which unnecessarily increases bundle size and risks
exposing backend logic. To fix this, move `mongodb` from the frontend
dependencies to a server-only area such as Next.js API routes or backend
dependencies, or configure it as an external dependency so it is not bundled
into the client-side code.

"next": "^15.1.7",
"papaparse": "^5.5.2",
"react": "^18.3.1",
Expand All @@ -40,7 +42,7 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/leaflet": "^1.9.14",
"@types/leaflet": "^1.9.17",
"@types/lodash.debounce": "^4.0.9",
"@types/node": "^20",
"@types/papaparse": "^5.3.15",
Expand Down
Loading