|
1 | | -# 天氣回報平台 |
| 1 | +# Pmap: the map for Precipitation 🌦️ |
2 | 2 |
|
3 | | -## 小組作業目錄 |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +1. 透過「民眾回報」和「氣象局資料」計算雨況,提供更精準的雨況資訊 |
| 8 | +2. 提供「定期」「定點」的雨況訂閱與通知 |
| 9 | + |
| 10 | + |
| 11 | +## Table of contents |
| 12 | +- [Pmap: the map for Precipitation 🌦️](#pmap-the-map-for-precipitation-️) |
| 13 | + - [Table of contents](#table-of-contents) |
| 14 | + - [Main Features](#main-features) |
| 15 | + - [Demo \& Screenshots](#demo--screenshots) |
| 16 | + - [System Architecture](#system-architecture) |
| 17 | + - [Built with](#built-with) |
| 18 | + - [CI/CD](#cicd) |
| 19 | + - [Getting Started](#getting-started) |
| 20 | + - [Documentation](#documentation) |
| 21 | + - [小組作業目錄](#小組作業目錄) |
| 22 | + |
| 23 | + |
| 24 | +## Main Features |
| 25 | + |
| 26 | +- 即時雨況地圖 |
| 27 | + - 包含氣象局資料與民眾回報 |
| 28 | +- 回報即時雨況資訊與照片 |
| 29 | +- 提供地區雨況訂閱功能,發送站內通知與 email |
| 30 | + - 支援某地區的**新回報**通知 |
| 31 | + - 支援某地區的**定時**雨況通知 |
| 32 | + - 支援設定**雨量條件**與**關注地區範圍** |
| 33 | +- Dark mode |
| 34 | + |
| 35 | +## Demo & Screenshots |
| 36 | + |
| 37 | +- Report and map |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +- Map |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +- Subscription |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +- Notifications |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## System Architecture |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +**Code structure:** |
| 59 | +- Frontend: [frontend](./frontend) |
| 60 | +- Backend: [backend](./backend) |
| 61 | +- Notification: [notificationServer](./notificationServer/) |
| 62 | +- Lambda related: [cloud](./cloud/) |
| 63 | + |
| 64 | +## Built with |
| 65 | + |
| 66 | +Primary Language: **TypeScript** |
| 67 | + |
| 68 | +**Frontend** |
| 69 | +- Next.js |
| 70 | +- Leaflet |
| 71 | +- NextAuth.js |
| 72 | +- Tailwind |
| 73 | + |
| 74 | +**Backend server and notification** |
| 75 | +- Express |
| 76 | +- Redis |
| 77 | +- MySQL |
| 78 | +- MQTT |
| 79 | +- AWS s3 |
| 80 | +- Socket.IO |
| 81 | + |
| 82 | +**Cloud Services** |
| 83 | +- AWS CDK |
| 84 | +- AWS Lambda |
| 85 | +- AWS SNS |
| 86 | +- AWS EventBridge |
| 87 | + |
| 88 | +**CI/CD** |
| 89 | +- Docker |
| 90 | +- Github action |
| 91 | +- Portainer |
| 92 | + |
| 93 | +## CI/CD |
| 94 | + |
| 95 | +**CI pipeline** |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +**CD pipeline** |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## Getting Started |
| 106 | + |
| 107 | +1. **Check Environment Variables** |
| 108 | + Make sure each `.env.dev` file in the folders is correctly set up as per `.env.dev.example`. |
| 109 | + |
| 110 | +2. **Install Dependencies** |
| 111 | + If dependencies are not installed yet, run the following commands: |
| 112 | + ```shell |
| 113 | + cd backend |
| 114 | + npm install |
| 115 | + cd ../frontend |
| 116 | + npm install |
| 117 | + ``` |
| 118 | + |
| 119 | +3. **Start backend and frontend** |
| 120 | + Run the following command to start: |
| 121 | + ```shell |
| 122 | + cd backend |
| 123 | + npm run dev |
| 124 | + ``` |
| 125 | + |
| 126 | +4. **(Optional) Start Cloud Services Locally** |
| 127 | + To run services like weather computing and open weather data processing locally, use: |
| 128 | + ```shell |
| 129 | + cd cloud |
| 130 | + npm run local |
| 131 | + ``` |
| 132 | + |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## Documentation |
| 137 | + |
| 138 | +| Docs | Description | |
| 139 | +| --------------------------------------------- | -------------------------------------------------------------- | |
| 140 | +| [Backend Structure](docs/backend_structure.md) | Overview of the backend architecture and development workflow | |
| 141 | +| [Frontend Structure](docs/frontend_struture.md) | Overview of the frontend architecture and development workflow | |
| 142 | +| [CI/CD with Portainer](docs/cicd.md) | CI/CD pipline and overview of Portainer and how to use it | |
| 143 | +| [AWS CDK and Lambda workflow](docs/api_doc.md) | Overview of the CDK and Lambda deployment workflow | |
| 144 | +| [API Documentation](docs/api_doc.md) | Brief overview of the project's API documentation | |
| 145 | +
|
| 146 | +
|
| 147 | +### 小組作業目錄 |
4 | 148 |
|
5 | 149 | | No | Folder | |
6 | 150 | | ---------- | ----------------------------------------- | |
|
0 commit comments