├── .gitignore ├── README.md ├── components ├── KandidatVaksin.js └── Phase.js ├── package-lock.json ├── package.json ├── pages ├── _app.js ├── _document.js ├── api │ ├── cekdiri.js │ ├── fetch.js │ ├── image.js │ ├── index.js │ ├── kandidat.js │ └── penelitian.js ├── image.js └── index.js ├── postcss.config.js ├── public ├── favicon.ico ├── robots.txt └── vercel.svg ├── styles └── globals.css └── tailwind.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | next.config.js 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | # vercel 35 | .vercel 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Indonesia Menuju Herd Immunity 2 | 3 | ![today](https://menujuherdimmunity.id/api/image) 4 | [menujuherdimmunity.id](https://menujuherdimmunity.id/) 5 | 6 | ## Pengkalkulasian 7 | 8 | Pengkalkulasian kasar ini diambil dari (Total orang yang sembuh + Jumlah orang yang sudah divaksinasi) / Target vaksinasi) X 100% 9 | 10 | ## Pengambilan data 11 | 12 | - Data kasus & sembuh perhari dari [Mathdroid covid-19 API](https://github.com/mathdroid/covid-19-api) 13 | - Data orang yang telah divaksinasi di*scrape* dari [Website resmi Kemenkes](https://www.kemkes.go.id/) 14 | - Penelitian vaksin dunia dikumpulkan dari [Bing.com/covid](https://www.bing.com/covid/local/indonesia?vert=vaccineTracker) 15 | - Data ketersediaan vaksin dikumpulkan dan dikurasi manual dari berbagai sumber 16 | 17 | ### Teknologi yang digunakan 18 | 19 | - Next.js 20 | - Tailwindcss 21 | - Cheerio (scraping) 22 | - DATO CMS 23 | 24 | [Dukung di karyakarsa](https://karyakarsa.com/kikiding) 25 | 26 | [Reach me on twitter](https://twitter.com/kikiding) 27 | -------------------------------------------------------------------------------- /components/KandidatVaksin.js: -------------------------------------------------------------------------------- 1 | function KandidatVaksin(props) { 2 | const data = props.data; 3 | function color(status) { 4 | if (status === 1) { 5 | return '#898989'; 6 | } 7 | if (status === 2) { 8 | return '#FF6B00'; 9 | } 10 | if (status === 3) { 11 | return '#E1D800'; 12 | } 13 | if (status === 4) { 14 | return '#0076CB'; 15 | } 16 | if (status === 5) { 17 | return '#9900CF'; 18 | } 19 | if (status === 6) { 20 | return '#45EE41'; 21 | } 22 | } 23 | 24 | return ( 25 | 26 | 27 |
28 |
34 | {data.fase} 35 |
36 | 37 | 38 | {data.dibuatOleh} 39 | 40 | 41 | {data.tipeVaksin} 42 | 43 | 44 | ); 45 | } 46 | 47 | export default KandidatVaksin; 48 | -------------------------------------------------------------------------------- /components/Phase.js: -------------------------------------------------------------------------------- 1 | function Phase(props) { 2 | return ( 3 |
4 |

5 | {props.phase} 6 |

7 |

8 | {props.desc} 9 |

10 | 11 |
15 |

19 | {props.number} 20 |

21 |
22 | ); 23 | } 24 | 25 | export default Phase; 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "menuju-hi-next", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "dependencies": { 11 | "autoprefixer": "^10.2.3", 12 | "axios": "^0.21.1", 13 | "cheerio": "^1.0.0-rc.5", 14 | "chrome-aws-lambda": "^5.5.0", 15 | "cors": "^2.8.5", 16 | "express": "^4.17.1", 17 | "lodash": "^4.17.20", 18 | "moment": "^2.29.1", 19 | "next": "10.0.5", 20 | "next-absolute-url": "^1.2.2", 21 | "postcss": "^8.2.4", 22 | "puppeteer": "^5.5.0", 23 | "react": "17.0.1", 24 | "react-anchor-link-smooth-scroll": "^1.0.12", 25 | "react-dom": "17.0.1", 26 | "request": "^2.88.2", 27 | "tailwindcss": "^2.0.2" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- 1 | import '../styles/globals.css' 2 | 3 | function MyApp({ Component, pageProps }) { 4 | return 5 | } 6 | 7 | export default MyApp 8 | -------------------------------------------------------------------------------- /pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from 'next/document'; 2 | 3 | export default class MyDocument extends Document { 4 | render() { 5 | return ( 6 | 7 | 8 | 12 |