PulseSG is a real-time public health intelligence platform designed for policymakers. It unifies critical data streams like disease outbreaks and air quality into a single, actionable dashboard to enable rapid, data-driven policy decisions during public health crises.
- Unified Overview: A high-level summary of the most critical public health concerns (Dengue & PSI) on a single landing page.
- Dedicated Dashboards: Drill-down into detailed pages for both Dengue and PSI, each with unique data visualizations.
- Live Data Integration: Fetches and processes real-time data from Singapore's official data.gov.sg APIs.
- Interactive Geospatial Mapping:
- Dengue Map: Renders GeoJSON polygons of active clusters, color-coded by the official Red/Yellow alert system.
- PSI Map: Displays regional air quality using dynamic markers and tooltips based on real-time data.
- Targeted SMS Notifications: Enables policymakers to dispatch critical SMS alerts to citizens in specific regions—ensuring that even the underserved, without reliable internet access, are promptly informed.
- Responsive Design: A clean, professional, light-mode UI that is accessible and easy to navigate.
- Framework: Next.js 14+ (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Data Visualization: React Leaflet
- Data Fetching: Axios (on the backend)
- Backend Environment: Next.js API Routes (Serverless Functions)
- SMS Notifications: Twilio SMS API & Twilio SDK
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
You will need to have the following software installed on your machine:
- Node.js (v18.x or later recommended)
- npm (comes with Node.js)
- A Twilio account with a trial phone number, Account SID, and Auth Token.
-
Clone the repository: Open your terminal and clone the project to your local machine.
git clone https://github.com/zzzyans/PulseSG.git
-
Navigate to the project directory:
cd PulseSG -
Install dependencies: This command will install all the necessary packages listed in
package.json.npm install
-
Configure Environment Variables: This project requires API keys from Twilio to send SMS messages. You may get your own free trial credentials from Twilio.com.Create a file named
.env.localin the root of the project and add your secret keys. This file is ignored by Git and will not be committed.# .env.local # Twilio Credentials for SMS Notifications TWILIO_ACCOUNT_SID="YOUR_TWILIO_ACCOUNT_SID" TWILIO_AUTH_TOKEN="YOUR_TWILIO_AUTH_TOKEN" TWILIO_PHONE_NUMBER="YOUR_TWILIO_PHONE_NUMBER" NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Start the development server: This command starts the Next.js development server, which includes both the frontend and the backend API routes.
npm run dev
-
Open the application: Open your web browser and navigate to the following URL: http://localhost:3000
You should now see the "Health Overview" page of the PulseSG application running locally. You can use the "SMS Alert Test Panel" in the bottom-right corner to register a phone number for testing the dispatch feature.