|
1 |
| -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# AirQo AI Platform |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +AirQo AI is an advanced air quality monitoring and forecasting platform designed to efficiently collect, analyze, and forecast air quality data across Africa. Our mission is to provide accurate insights and raise awareness about air pollution in African cities. |
| 6 | + |
| 7 | +AirQo AI Platform [https://ai.airqo.net/](https://ai.airqo.net/). |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +- **Interactive Map**: Real-time visualization of air quality data across various locations. |
| 12 | +- **Site Locator**: AI-powered tool to suggest optimal locations for new air quality sensors. |
| 13 | +- **Site Categorization**: Automatically categorize sites based on their characteristics and surrounding environment. |
| 14 | +- **Air Quality Reports**: Generate comprehensive reports with historical data and trends. |
| 15 | +- **About Page**: Information about AirQo's mission and impact. |
2 | 16 |
|
3 | 17 | ## Getting Started
|
4 | 18 |
|
5 |
| -First, run the development server: |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +- Node.js (v14 or later) |
| 22 | +- npm or yarn |
| 23 | + |
| 24 | +### Installation |
| 25 | + |
| 26 | +1. Clone the repository: |
| 27 | + ``` |
| 28 | + git clone https://github.com/your-username/airqo-ai-platform.git |
| 29 | + cd airqo-ai-platform |
| 30 | + ``` |
| 31 | + |
| 32 | +2. Install dependencies: |
| 33 | + ``` |
| 34 | + npm install |
| 35 | + # or |
| 36 | + yarn install |
| 37 | + ``` |
| 38 | + |
| 39 | +3. Set up environment variables: |
| 40 | + Create a `.env.local` file in the root directory and add the following variables: |
| 41 | + ``` |
| 42 | + NEXT_PUBLIC_API_TOKEN=your_api_token_here |
| 43 | + NEXT_PUBLIC_API_URL=https://analytics.airqo.net/api/v2/ |
| 44 | + ``` |
| 45 | + |
| 46 | +4. Run the development server: |
| 47 | + ``` |
| 48 | + npm run dev |
| 49 | + # or |
| 50 | + yarn dev |
| 51 | + ``` |
| 52 | + |
| 53 | +5. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application. |
| 54 | + |
| 55 | +### Code Quality and Build |
| 56 | + |
| 57 | +Before committing or deploying changes, ensure code quality and build readiness by running: |
| 58 | + ``` |
| 59 | + npm run lint # Lint the codebase |
| 60 | + npm run build # Create an optimized production build |
| 61 | + ``` |
| 62 | + |
| 63 | +## Usage |
| 64 | + |
| 65 | +### Home Page |
| 66 | +The home page displays an interactive map with real-time air quality data. Users can: |
| 67 | +- Search for specific locations |
| 68 | +- View air quality information for different sites |
| 69 | +- Toggle between street and satellite map views |
| 70 | + |
| 71 | +### Locate Page |
| 72 | +Use the Site Locator tool to find optimal locations for new air quality sensors: |
| 73 | +1. Draw a polygon on the map to define the area of interest |
| 74 | +2. Set parameters such as the number of sensors and minimum distance between them |
| 75 | +3. Add must-have locations if needed |
| 76 | +4. Submit the request to receive AI-generated suggestions for sensor placements |
| 77 | + |
| 78 | +### Categorize Page |
| 79 | +Categorize sites based on their characteristics: |
| 80 | +1. Click on the map or upload a CSV file with site coordinates |
| 81 | +2. View the AI-generated category for each site |
| 82 | +3. Export the results as a CSV file |
| 83 | + |
| 84 | +### Reports Page |
| 85 | +Generate comprehensive air quality reports: |
| 86 | +1. Select a grid and date range |
| 87 | +2. View visualizations of air quality trends |
| 88 | +3. Access AI-generated insights and recommendations |
| 89 | + |
| 90 | +### About Page |
| 91 | +Learn more about AirQo's mission, core values, and impact in air quality monitoring across Africa. |
| 92 | + |
| 93 | +## Deployment |
| 94 | + |
| 95 | +The easiest way to deploy your AirQo AI Platform is to use the [Vercel Platform](https://vercel.com) from the creators of Next.js. |
| 96 | + |
| 97 | +### Deploying on Vercel |
| 98 | + |
| 99 | +1. Sign up for a Vercel account if you haven't already: [https://vercel.com/signup](https://vercel.com/signup) |
| 100 | + |
| 101 | +2. Install the Vercel CLI: |
| 102 | + ``` |
| 103 | + npm i -g vercel |
| 104 | + ``` |
| 105 | + |
| 106 | +3. Run the following command from your project's root directory: |
| 107 | + ``` |
| 108 | + vercel |
| 109 | + ``` |
| 110 | + |
| 111 | +4. Follow the prompts to link your project to Vercel and configure your deployment settings. |
| 112 | + |
| 113 | +5. Once deployed, Vercel will provide you with a URL for your live application. |
| 114 | + |
| 115 | +### Continuous Deployment |
| 116 | + |
| 117 | +Vercel supports continuous deployment with GitHub, GitLab, and Bitbucket. When you push changes to your repository, Vercel will automatically deploy the updates. |
| 118 | + |
| 119 | +To set up continuous deployment: |
| 120 | + |
| 121 | +1. Connect your Git repository to your Vercel project. |
| 122 | +2. Configure your project settings on the Vercel dashboard. |
| 123 | +3. Push changes to your repository, and Vercel will automatically build and deploy your updates. |
| 124 | + |
| 125 | +For more detailed information about deploying Next.js applications on Vercel, check out the [Next.js deployment documentation](https://nextjs.org/docs/deployment). |
6 | 126 |
|
7 |
| -```bash |
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
11 |
| -# or |
12 |
| -pnpm dev |
13 |
| -# or |
14 |
| -bun dev |
15 |
| -``` |
| 127 | +## Technologies Used |
16 | 128 |
|
17 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 129 | +- Next.js |
| 130 | +- React |
| 131 | +- TypeScript |
| 132 | +- Tailwind CSS |
| 133 | +- Leaflet (for maps) |
| 134 | +- Shadcn UI components |
| 135 | +- Lucide React icons |
18 | 136 |
|
19 |
| -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 137 | +## Contributing |
20 | 138 |
|
21 |
| -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 139 | +We welcome contributions to the AirQo AI Platform! Please follow these steps to contribute: |
22 | 140 |
|
23 |
| -## Learn More |
| 141 | +1. Fork the repository |
| 142 | +2. Create a new branch (`git checkout -b feature/your-feature-name`) |
| 143 | +3. Make your changes |
| 144 | +4. Commit your changes (`git commit -am 'Add some feature'`) |
| 145 | +5. Push to the branch (`git push origin feature/your-feature-name`) |
| 146 | +6. Create a new Pull Request |
24 | 147 |
|
25 |
| -To learn more about Next.js, take a look at the following resources: |
| 148 | +Please ensure your code follows the project's coding standards and includes appropriate tests. |
26 | 149 |
|
27 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 150 | +## License |
29 | 151 |
|
30 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 152 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
31 | 153 |
|
32 |
| -## Deploy on Vercel |
| 154 | +## Contact |
33 | 155 |
|
34 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 156 | +For any questions or support, please contact us at [email protected] or visit our website [https://www.airqo.net](https://www.airqo.net). |
35 | 157 |
|
36 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
|
0 commit comments