# GeoDykeMonitor
### Project details:
**Applicant:** Ching-Yu Chao
**Faculty:** Civil Engineering and Geosciences, Delft University of Technology
**DCC Members:** Jose Carlos Urra, Selin Kubilay
**Support Period:** June 2024 - August 2024
**Repository/Archive:** [GitHub Repository](https://github.com/TUDelft-GeoDykes/geodykes-fastapi)
---
**Research Background:**
The GeoDykes Monitoring System addresses the need for real-time monitoring of dykes' health and behavior under varying weather and environmental conditions. This system aims to support flood protection and water management by helping researchers and stakeholders maintain dyke stability and safety proactively. It integrates sensor data to track dyke conditions over time, providing valuable insights for maintenance and disaster prevention.
**Project Description:**
The research team faced challenges related to handling data from multiple sensor types, managing real-time data streams, and implementing a scalable, user-friendly dashboard for visualization. They requested DCC support to develop a robust backend using FastAPI, manage data storage and handling with PostgreSQL, and create an interactive frontend dashboard with Dash. The DCC also provided guidance on data lifecycle management and integration best practices.
**Project Goals:**
- Provide the research group with a sustainable solution in terms of software architecture, setup and stack.
**Achieved Goals:**
- New data model for better data management, accessibility and speed.
- Decoupled architecture of backend and frontend.
- Developed a fully functional backend with FastAPI and PostgreSQL.
- Created a scalable architecture with a repository pattern for easy future modifications.
- Trasnfered good practices of software development to the researcher.
**Next Goals:**
- Expand the dashboard with additional data analytics features.
- Consider automating the deployment process for easier maintenance and scaling.
---
## Project Results
- **Technical Solutions Provided:**
Built a RESTful API backend with FastAPI for real-time data handling, integrated PostgreSQL for data storage, and implemented an interactive frontend using Dash for data visualization.
**Links to Output:**
- [Project Repository](https://github.com/TUDelft-GeoDykes/geodykes-fastapi)
### Feedback from Researchers
The research team found the DCC support invaluable for establishing robust practices in data management and backend development. They appreciated the guidance on environment management, which greatly improved the project's reproducibility and maintainability.
### Lessons Learned
- Collaborative data modeling with researchers significantly improved the accuracy and representation of field measurements. Using FastAPI ensured high performance in handling real-time requests, while the repository pattern provided flexibility for future database substitutions.
- It was very useful to have a prototype proof of concept developed by the researcher as a reference, this was also useful and was a good codevelopment strategy.
- It was important that the researcher went through the documentation to reproduce the system and be able to develop and add new features (this was not trivial).
- Early decisions on modular architecture scalability and flexibility.
- Engaging the research team in data modeling is important.
- Dedicate a timeslot every week for the researcher to join development hours prooved to be useful.
## Recommendations
The project started as a consultation with no promises on hands on support at the begginning and it ended up being supported through out the whole call period. Stay open to these kind of situations.
Take the time to study something new or at least get familiar with methodologies for certain projects. For example in this project we had to learn how to do data modeling and relational DB design.
The project has achieved the goals agreed upon. However the main developer postdoc is leaving soon to a new position, and according to the PI and supervisor, he is one of its kind. So they don't have someone in the foreseeable future to fill this gap.
Ideas that could work make the project sustainable based on our previous experience at the DCC:
- Stay in touch with the DCC support to incorporate and implement the following advice.
- Get funding to hire external developers. Depending on the funding the project will have more possibilities to be sustainable.
- Consider offering internships to MSc Delft students of Computer Science with specialization in software engineering.
- Consider offering TA positions for MSc students.
- Consider applying to the eScience center call, as they provide more support.
- These MSc could potentially be hired as external developers as well.
- Keep in mind that many young students have incentives to contribute to open source. This open source aspect of the project can help you recruit such an audience, as they will have work to show. It is a great opportunity to gain experience.
- If the project gets funded as an open source project there are platforms and schemes to pay to developers that contribute to projects, for example:https://opencollective.com/ and https://en.liberapay.com/.