|
1 |
| -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
| 1 | +# covidrescue.co.in |
2 | 2 |
|
3 |
| -## Getting Started |
| 3 | +#### ⚡️ Get `real-time`, `verified` leads on Oxygen, Remdesivir, ICU, Beds, Food and more based on your location. Get notifications on Vaccine at your mail whenever it is available. |
4 | 4 |
|
5 |
| -First, run the development server: |
| 5 | +## 🏠 **Home Page** |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## 💉 **Vaccine Availability Notifier Page** |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## 🐥 Features |
| 14 | + |
| 15 | +- ⚡️ Get real-time verified leads on resources. |
| 16 | +- 🔥 Fast, real-time, built with `Next.js`, `Twitter-api`, `CoWIN API` and `AWS` |
| 17 | +- 🚀 Get Covid-19 State based on States, Areas, Cities and Overall India. |
| 18 | +- 🇮🇳 Map wise distribution of Active cases, Total Recovered, Total till now etc. |
| 19 | +- 🤙🏻 Real-time slots list available on the website itself. |
| 20 | +- 📍 Location-based filtering for tweets. (All the Indian cities are included) |
| 21 | + |
| 22 | +## 🔩 Installation |
| 23 | + |
| 24 | +Installation is simple. To run the project locally, follow the below steps: |
| 25 | + |
| 26 | +**Clone the repository** |
| 27 | + |
| 28 | +- `git clone https://github.com/PlaceholderTech/covidrescue.co.in.git` |
| 29 | + |
| 30 | +**Install the packages** |
| 31 | + |
| 32 | +- `npm install` or `yarn` |
| 33 | + |
| 34 | +Create a `.env.local` file to setup your environment variables. Example of .env file is provided in the repository as `.env.example` |
6 | 35 |
|
7 | 36 | ```bash
|
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
| 37 | +TWITTER_API_KEY = '' |
| 38 | +TWITTER_API_SECRET = '' |
| 39 | +TWITTER_BEARER_TOKEN = '' |
| 40 | +TWITTER_ACCESS_TOKEN = '' |
| 41 | +TWITTER_ACCESS_TOKEN_SECRET = '' |
| 42 | +GOVT_DATA_API = '' |
| 43 | +EMAIL='' |
| 44 | +APPLICATION_PASSWORD='' |
| 45 | + |
| 46 | +MYSQL_HOST='' |
| 47 | +MYSQL_DATABASE='' |
| 48 | +MYSQL_USERNAME='' |
| 49 | +MYSQL_PASSWORD='' |
| 50 | +MYSQL_PORT='' |
11 | 51 | ```
|
12 | 52 |
|
13 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 53 | +#### 🕊 Setting up Twitter API for fetching tweets |
14 | 54 |
|
15 |
| -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. |
| 55 | +For the Twitter posts to work, you need to create a Twitter Standard V2 Account. You can do it [here](https://developer.twitter.com/en/docs/getting-started). |
16 | 56 |
|
17 |
| -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. |
| 57 | +Approving of the Developer portal may take 1 day or more. |
| 58 | +Once you have the Twitter API credentials, populate the `.env.example` file and you're good to go. |
| 59 | + |
| 60 | +#### 💻 Setting up MySQL for storing users |
| 61 | + |
| 62 | +Note: Users are deleted when the notification is sent to the user. |
| 63 | + |
| 64 | +Setup a MySQL server on your system. Create a user and get the following credentials: |
| 65 | + |
| 66 | +```bash |
| 67 | +MYSQL_HOST |
| 68 | +MYSQL_DATABASE |
| 69 | +MYSQL_USERNAME |
| 70 | +MYSQL_PASSWORD |
| 71 | +MYSQL_PORT |
| 72 | +``` |
| 73 | + |
| 74 | +#### ✉️ Sending Emails |
| 75 | + |
| 76 | +- Make your Gmail application `less secure`. Visit [This Link](https://myaccount.google.com/lesssecureapps) for more information. |
| 77 | +- Once you're done, Feed your Email and Password in `.env.local` file. |
| 78 | + |
| 79 | +```bash |
| 80 | +EMAIL='' |
| 81 | +APPLICATION_PASSWORD='' |
| 82 | +``` |
| 83 | + |
| 84 | +For sending the automated emails, We've written a **Cron Job** that pings the `CoWIN API` every 1 minute. You can find the script under `/scripts` folder. |
| 85 | + |
| 86 | +You can run that script on your local node-express server for running the corn job. |
| 87 | + |
| 88 | +## 🦾 Usage |
| 89 | + |
| 90 | +To run the application locally: |
| 91 | + |
| 92 | +```bash |
| 93 | +npm run dev |
| 94 | +``` |
| 95 | + |
| 96 | +or |
| 97 | + |
| 98 | +```bash |
| 99 | +yarn dev |
| 100 | +``` |
18 | 101 |
|
19 |
| -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
| 102 | +## Built with |
20 | 103 |
|
21 |
| -## Learn More |
| 104 | +- [Next.js](https://nextjs.org/) |
| 105 | +- [AWS EC2](https://aws.amazon.com) |
| 106 | +- [Tailwind CSS](https://tailwindcss.com) |
| 107 | +- [Tailwind-kit](https://tailwind-kit.com) |
| 108 | +- [MySQL](https://www.mysql.com/) |
| 109 | +- [Firebase](https://console.firebase.com) |
| 110 | +- [Heroicons](https://heroicons.com) |
| 111 | +- [Twitter API](https://developer.twitter.com) |
| 112 | +- [CoWIN API](https://apisetu.gov.in/public/marketplace/api/cowin) |
| 113 | +- [Node Cron](https://www.npmjs.com/package/node-cron) |
22 | 114 |
|
23 |
| -To learn more about Next.js, take a look at the following resources: |
| 115 | +## Contributing |
24 | 116 |
|
25 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
26 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 117 | +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. |
27 | 118 |
|
28 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 119 | +Please make sure to update tests as appropriate. |
29 | 120 |
|
30 |
| -## Deploy on Vercel |
| 121 | +## License |
31 | 122 |
|
32 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 123 | +[MIT](https://choosealicense.com/licenses/mit/) |
33 | 124 |
|
34 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 125 | +Developed by [Manu Arora](https://manuarora.in), [Kishore Raghavendra Gunnam](https://github.com/kishore-gunnam) and [Abhinav Sharma](https://abhinav.sh) |
0 commit comments