A Progressive Web App (PWA) dashboard for health officials to monitor district-level health indicators, specifically focused on antibiotic usage and health data.
- Antibiotic Usage Prevalence - Share of medicine users taking antibiotics
- Self-Medication Rate - Antibiotic users without doctor consultation
- Restart Without Consultation - People restarting antibiotics without medical advice
- Antibiotic Misuse Awareness - Knowledge about antibiotic misuse risks
- Long-term Illness Prevalence - Burden of chronic illnesses
- Health Information Sources - Common sources of health information
- ✅ Cross-platform compatibility (iOS, Android, Web)
- ✅ Offline capability - Works without internet connection
- ✅ App-like experience - Installable on mobile devices
- ✅ Responsive design - Optimized for all screen sizes
- ✅ Fast loading - Optimized performance
- Line charts for monthly trends
- Bar charts for taluk-wise comparisons
- Pie charts for health information sources
- Interactive metric cards with trend indicators
- Frontend: Next.js 14, React 18
- Styling: Tailwind CSS
- Charts: Recharts
- Icons: Lucide React
- PWA: next-pwa
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd dashboard
-
Install dependencies
npm install
-
Create configuration files
tailwind.config.js:
/** @type {import('tailwindcss').Config} */ module.exports = { content: [ './pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}', ], theme: { extend: {}, }, plugins: [], }
postcss.config.js:
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
next.config.js:
const withPWA = require('next-pwa')({ dest: 'public', register: true, skipWaiting: true, disable: process.env.NODE_ENV === 'development' }) /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { appDir: true, }, images: { domains: ['localhost'], }, } module.exports = withPWA(nextConfig)
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Open the dashboard in Safari (iOS) or Chrome (Android)
- Tap the "Share" button
- Select "Add to Home Screen" or "Install App"
- The app will now appear on your home screen
- Open the dashboard in Chrome/Edge
- Click the install icon in the address bar
- Click "Install" to add to desktop
- Full PWA support
- Offline functionality
- Home screen installation
- App-like experience
- Full PWA support
- Offline functionality
- Home screen installation
- Push notifications (if configured)
- Chrome, Edge, Firefox support
- Desktop installation
- Full functionality
The dashboard uses sample data located in data/districtData.js. In production, you can:
- Replace with real API calls in the components
- Connect to your database (MySQL, PostgreSQL, MongoDB)
- Use real-time data with WebSocket connections
- Add data to
data/districtData.js - Create new MetricCard components
- Update the dashboard layout
- Modify
styles/globals.cssfor global styles - Update Tailwind classes in components
- Customize colors in the theme
- Update
public/manifest.jsonfor app details - Modify PWA settings in
next.config.js - Add custom service worker if needed
npm run build
vercel --prod- Netlify
- AWS Amplify
- Google Cloud Platform
- Any static hosting service
- Chrome 67+
- Firefox 67+
- Safari 11.1+
- Edge 79+
This project is licensed under the MIT License.
For technical support or questions, please contact the development team.