No description
  • TypeScript 84.2%
  • CSS 10.5%
  • JavaScript 2.5%
  • Nix 1.3%
  • HTML 0.6%
  • Other 0.9%
Find a file
2026-04-18 22:45:55 -05:00
api Remove hardcoded secrets 2026-04-18 22:12:59 -05:00
client add optional timestamps 2026-04-18 22:45:55 -05:00
.env.example Remove hardcoded secrets 2026-04-18 22:12:59 -05:00
.gitignore Remove hardcoded secrets 2026-04-18 22:12:59 -05:00
docker-compose.dev.yml Remove hardcoded secrets 2026-04-18 22:12:59 -05:00
docker-compose.yml Remove hardcoded secrets 2026-04-18 22:12:59 -05:00
flake.lock initial commit 2026-04-15 22:34:12 -05:00
flake.nix initial commit 2026-04-15 22:34:12 -05:00
README.md Remove hardcoded secrets 2026-04-18 22:12:59 -05:00

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 and docker-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:3000 locally, accessed in Docker via the hostname http://api:3000
  • Postgres Database: Hosted inside the container on 5432, but mapped to 5433 on your host to avoid conflicts (postgresql://postgres:password@localhost:5433/life_tracker)