habits
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
index.ts
https://tfsops--02346aaa3f9c11f099fa76b3cceeab13.web.val.run
A simple habit tracking application that allows users to:
- Create and manage daily habits
- Track habit completion daily
- Provide reasons when unable to complete habits
- View habit streaks and completion history
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema setup
β β βββ queries.ts # Database query functions
β βββ routes/
β β βββ habits.ts # Habit-related API routes
β βββ index.ts # Main Hono server entry point
βββ frontend/
β βββ components/
β β βββ App.tsx # Main React application
β β βββ HabitForm.tsx # Form for creating habits
β β βββ HabitList.tsx # List of habits with tracking
β β βββ HabitCard.tsx # Individual habit card component
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend React entry point
β βββ style.css # Custom styles
βββ shared/
β βββ types.ts # Shared TypeScript types
βββ README.md
- Habit Management: Create, edit, and delete habits
- Daily Tracking: Mark habits as completed or missed with optional reasons
- Streak Tracking: View current and longest streaks for each habit
- Responsive Design: Works on desktop and mobile devices
- Backend: Hono (TypeScript API framework)
- Database: SQLite
- Frontend: React with TypeScript
- Styling: TailwindCSS
- Storage: Val Town SQLite and Blob storage