by tarunkorat

Chain package: frontend (Smart Habit Tracker with AI Nudges — frontend) + backend (Smart Habit Tracker with AI Nudges — backend)
Smart Habit Tracker with AI Nudges is a full-stack TypeScript application that helps users build and maintain habits through daily check-ins, AI-generated motivational nudges, and weekly insights. The system tracks habit completion, momentum, and provides personalized recommendations powered by OpenAI.
Frontend:
Backend:
# Install dependencies
npm install
# Set environment variables
export OPENAI_API_KEY="your-openai-api-key"
export PORT=9048
export DATABASE_URL="./habits.db"
# Build and start
npm run build
npm start
# Or run in development mode with hot-reload
npm run dev
The backend server listens on port 9048 by default.
# Install dependencies
npm install
# Development server with hot-reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Type checking
npm run typecheck
# Linting
npm run lint
npm run lint:fix
Configure the API base URL via the environment variable (defaults to ).
Spin up an isolated sandbox and run it server-side — no local setup.
Push this product straight into your AI IDE, web builder or cloud IDE.
Connect Tetrees to a compatible AI IDE, list products you own, and request the verified ZIP without exposing seller upload controls.
No reviews yet.
Sign in to join the discussion
Loading discussion…
VITE_API_BASE_URLhttp://localhost:9048All responses follow the envelope format: { "data": ... } on success, or { "error": "<message>" } on error.
Base URL: http://localhost:9048/api
GET /health — Returns server status and timestampPOST /habits — Create a new habit
{ name, category, target_days?, peak_hour? }GET /habits — List all habits for the userPUT /habits/:id — Update a habitDELETE /habits/:id — Delete a habitPOST /checkins — Log one or more check-ins
{ habit_id, completed, mood?, energy?, note? } or { checkins: [...] }GET /checkins/:habitId — Fetch all check-ins for a habitGET /stats — Get summary stats for all habitsGET /stats/:habitId — Get detailed stats for a specific habitGET /nudges — Fetch pending nudge notificationsPOST /nudges/generate — Trigger AI nudge generationGET /insights/weekly — Fetch the weekly AI-generated insight summary| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY | ✅ | — | OpenAI API key for nudge and insight generation |
PORT | No | 9048 | Backend server port |
DATABASE_URL | No | ./habits.db | SQLite database path |
VITE_API_BASE_URL | No | http://localhost:9048 | Frontend API base URL |
Tetrees License
The sandbox audition completed and the detected runnable path passed.
This Express backend / api completed archive review with strong static results. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately. Final verified scores after isolated runtime evidence: overall 8.8 and security 9.
Deterministic AVCP artifact review
Pipeline avcp-2026-08-04.1 · SHA-256 15a53c579c71922b…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
Reviewed Aug 7, 2026
The full install guide and integration prompts unlock after purchase.
$7