An AI whose success is measured by how quickly you stop using it.
TouchGrass was built for the Hacktoberfest '26 Week 1: Touch Grass challenge.
The idea is to use AI for something that gets people away from their screens. TouchGrass generates outdoor missions based on your preferences. You can complete a mission, return to write a reflection, and optionally attach a photo of your experience.
- App: https://touchgrass-delta-six.vercel.app/
- Demo video: https://youtu.be/9seersnxmN4
- Source code: https://github.com/HarshAggarwal1/touchgrass
- Generate outdoor missions based on activity, duration, difficulty, and setting.
- Enter Go Outside Mode to focus on the activity instead of the screen.
- Write reflections after completing a mission.
- Optionally attach photo evidence.
- View previous missions and reflections in My Submissions.
- Keep submissions saved across page refreshes using browser storage.
- Fall back to predefined missions when AI generation fails.
- Frontend: React, Vite, CSS
- Backend: Node.js, Express
- AI inference: Hugging Face Inference Providers
- Model: Configured through
HF_MODEL - Storage: Browser
localStorage - Deployment: Vercel (frontend), Render (backend)
- Choose your preferences for an outdoor activity.
- The frontend sends them to the Express backend.
- The backend requests a mission from the configured AI model.
- The mission is validated and returned to the frontend.
- If AI generation fails, the backend can return a predefined mission.
- Complete the activity away from the screen.
- Return to write a reflection and optionally attach a photo.
- Find your saved submission in My Submissions.
- Node.js 18 or newer
- npm
- A Hugging Face account and an API token with Inference Providers permission
git clone https://github.com/HarshAggarwal1/touchgrass.git
cd touchgrassnpm installConfigure the backend using the environment variables expected by server/index.js. For the current hosted inference setup, these include:
PORT=8787
FRONTEND_URL=http://localhost:5173
HF_TOKEN=your_hugging_face_token
HF_MODEL=your_supported_model_idFor the frontend, configure the backend URL:
VITE_API_URL=http://localhost:8787Use the model ID supported by your enabled inference provider. Refer to .env.example if it is present in the repository.
Keep your API token private. Do not commit it to GitHub or expose it through a VITE_ environment variable.
npm run devThe frontend normally runs at http://localhost:5173 and the backend at http://localhost:8787.
On Windows, if PowerShell has trouble running npm scripts, try:
npm.cmd install
npm.cmd run devThe frontend and backend are deployed separately.
Set the following environment variable in your Vercel project:
VITE_API_URL=https://your-render-backend-urlReplace the example with your actual Render backend URL, then redeploy the frontend.
Configure the backend's build command as npm install and its start command as npm start, assuming package.json is at the repository root.
Set these backend environment variables in Render:
FRONTEND_URL=https://touchgrass-delta-six.vercel.app
HF_TOKEN=your_hugging_face_token
HF_MODEL=your_supported_model_idUse your actual model ID and never commit the token to the repository.
Open the backend health endpoint:
http://localhost:8787/api/health
For the deployed application, use the equivalent URL for your Render service.
To inspect mission generation:
- Open the app and press
F12. - Select Network β Fetch/XHR.
- Generate a mission.
- Open the
POST /api/missionresponse.
Check the source field:
hosted-model: The hosted model generated the mission.built-in-fallback: The backend returned a predefined mission instead.
A successful HTTP response alone does not guarantee that AI inference succeeded.
TouchGrass stores submissions, reflections, and photo evidence in browser localStorage. The data stays associated with that browser and device and is not automatically synchronized across devices.
Mission generation sends the selected preferences to the backend. When hosted inference is used, the backend sends the required prompt and input to the configured inference provider.
Avoid including sensitive personal information in mission requests.
- Hosted inference depends on model availability, provider access, rate limits, and available credits.
- Failed or invalid AI responses can result in predefined fallback missions.
- Submissions are stored locally rather than in a cloud database.
- Clearing browser data may remove saved submissions.
TouchGrass was built for the Hacktoberfest Week 1: Touch Grass challenge.
The project uses Gemma for AI-generated outdoor missions, Vercel to host the frontend, and Render to run the backend.
The goal is to use AI to encourage people to spend less time on screens and more time outside. The model creates the mission; the user completes it in the real world.
Technologies showcased: Gemma, Vercel and Render.
MIT License. See LICENSE for details.