No description
- TypeScript 84.2%
- CSS 10.5%
- JavaScript 2.5%
- Nix 1.3%
- HTML 0.6%
- Other 0.9%
| api | ||
| client | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Tracker
A full-stack application built using Hono JS, React, Drizzle ORM, and PostgreSQL, gracefully containerized with Docker Compose.
🚀 Tech Stack
- Frontend: React, Vite, Custom Premium CSS
- Backend: Node.js, Hono JS
- Database: PostgreSQL
- ORM: Drizzle ORM
- Deployment & Dev: Docker Compose, NixOS Flakes
📂 Project Structure
/api- The Hono backend, configured with Drizzle schemas and a database migration entry script./client- The Vite React frontend.docker-compose.yml- The default Docker Compose configuration structured cleanly without volume overrides for production deployments.docker-compose.dev.yml- The override configuration containing volume mounts to enable seamless hot reloading for local development.flake.nix&.envrc- The NixOS declarative shell configuration supplying Node.js 24 anddocker-compose.
🛠️ Getting Started
1. Environment Setup (NixOS / Direnv)
If you are using Nix, automatically load development tools on your host by allowing the .envrc:
direnv allow
# Or if not using direnv, manually enter via: nix develop
2. Running in Development (Hot Reload Enabled)
To boot the application with development settings and host-syncing volume mounts:
# Ensure .env.dev exists or copy from example: cp .env.example .env.dev
docker-compose --env-file .env.dev -f docker-compose.yml -f docker-compose.dev.yml up -d --build
3. Running in Production
By default, the isolated build will use values from your .env file:
# Ensure .env exists or copy from example: cp .env.example .env
docker-compose up -d --build
4. Database Migrations
By default, the api container executes ./start.sh on boot, which robustly waits for PostgreSQL to initialize and then triggers drizzle-kit push automatically prior to spinning up tsx watch.
This guarantees your fresh container boots with its schema fully synchronized!
🌐 Ports & Services
- Frontend App: http://localhost:5173 (Routes to the Vite instance)
- API Server: Exposed on
http://localhost:3000locally, accessed in Docker via the hostnamehttp://api:3000 - Postgres Database: Hosted inside the container on
5432, but mapped to5433on your host to avoid conflicts (postgresql://postgres:password@localhost:5433/life_tracker)