A comprehensive, free web application for tracking and managing household utilities. Monitor meter readings, manage tariffs, track payments, and gain insights into your utility costs across multiple properties.
- Add and manage multiple households or properties
- Organize utilities by location
- Track different utility types per property
- Electricity
- Gas
- Water
- Heating
- Maintenance fees
- And more
- Record meter readings with timestamps
- Automatic consumption calculations
- Historical data tracking
- Counter-based tariffs
- Fixed-rate tariffs
- Area-based tariffs
- Custom tariff configurations
- Record all utility payments
- Payment history and analytics
- Cost tracking over time
- Interactive charts and graphs
- Cost trends and insights
- Usage patterns analysis
- User data protection
- Transparent data practices
- GDPR-compliant
- English
- Ukrainian
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, shadcn/ui components
- API: Hono framework with OpenAPI
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth
- State Management: Zustand, TanStack Query
- Internationalization: next-intl
- Charts: Recharts
- Node.js 18+
- PostgreSQL database
- pnpm package manager
- Clone the repository:
git clone <repository-url>
cd utilities-tracker- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .env.localEdit .env.local with your configuration:
BETTER_AUTH_SECRET=your-secret-key
BETTER_AUTH_URL=http://localhost:3000
DATABASE_URL=postgresql://username:password@localhost:5432/utilities_tracker
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
LOG_LEVEL=info
NODE_ENV=development- Set up the database:
# Generate and run migrations
pnpm drizzle-kit generate
pnpm drizzle-kit migrate- Start the development server:
pnpm devOpen http://localhost:3000 in your browser.
pnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm lint:fix- Auto-fix ESLint issuespnpm format- Format code with Prettier
src/
βββ api/ # API routes and handlers
β βββ handlers/ # Route handlers
β βββ mappers/ # Data mappers
β βββ middlewares/ # API middlewares
β βββ routes/ # Route definitions
βββ app/ # Next.js app router pages
β βββ (auth)/ # Authentication pages
β βββ (public)/ # Public pages (landing, about, etc.)
β βββ api/ # API route handlers
βββ components/ # React components
β βββ blocks/ # Page-specific component blocks
β βββ forms/ # Form components
β βββ ui/ # Reusable UI components
β βββ ...
βββ db/ # Database schemas and migrations
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries
βββ services/ # Business logic services
βββ stores/ # Zustand state stores
βββ types/ # TypeScript type definitions
βββ ...
The API is built with Hono and includes OpenAPI documentation. Available endpoints:
- Households:
/api/households- Manage properties - Providers:
/api/providers- Utility service providers - Tariffs:
/api/tariffs- Tariff configurations - Payments:
/api/payments- Payment records - Stats:
/api/stats- Analytics and statistics
Uses Better Auth for secure authentication with support for:
- Email/password registration
- GitHub OAuth
- Session management
The application uses PostgreSQL with the following main entities:
- Users (via Better Auth)
- Households/Properties
- Providers
- Tariffs
- Payments
- Meter Readings
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and run tests
- Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Open a pull request
- Linting: ESLint with Next.js and React rules
- Formatting: Prettier with import sorting
- TypeScript: Strict mode enabled
- Code Style: 120 character width, 2-space indentation
The application can be deployed to any platform supporting Next.js:
- Build the application:
pnpm build - Set up production environment variables
- Deploy to your preferred platform (Vercel, Netlify, etc.)
This project is open source and available under the MIT License.
For questions or support, please open an issue on GitHub.
Utilities Tracker - Track your utilities, save on costs, stay organized. 100% Free, forever.