🌱 Touch Grass API: AI-Powered Missions to Get You Outside
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass What if AI could help you spend less time looking at a screen and more time enjoying the world outside? That question inspired Touch Grass API , a Java project that uses locally running AI to generate outdoor missions and encourage people to take a break from their screens. Instead of using AI to keep people…
Touch Grass API is a Java-based project that uses AI to inspire users to spend more time outdoors and disconnect from screens. The application generates outdoor missions with details such as a title, motivational message, suggested activity, estimated duration, and difficulty level. Users can generate, view, and mark missions as completed through a web interface powered by a REST API. The main goal of the project is to encourage users to take breaks from their screens and engage in real-world experiences.
The application was developed using Java 17 and Spring Boot, with a focus on backend development, clean separation of responsibilities, and integration with AI. The main technologies used include Java 17, Spring Boot, Spring Data JPA, H2 Database, Thymeleaf for the web interface, Ollama for local AI inference, and Maven for dependency management and builds.
The project follows hexagonal architecture, separating the domain, application use cases, and infrastructure adapters. A custom adapter communicates with Ollama’s local API to generate outdoor missions. This allows for local control, flexibility in experimenting with different models, accessibility for experimentation without paid APIs, and a deeper understanding of AI integration in an application.
While local inference offers advantages, such as performance and the freedom to experiment, it also has trade-offs, such as potential hardware limitations and the initial requirement to download model files. Despite these limitations, the project emphasizes the importance of using AI to promote healthier habits by encouraging users to spend more time outdoors and less time online.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.