Skip to content
sans-scriptPublic

About

A goal tracker for the week: you set goals with a target frequency, mark them as done during the week and see a summary of your progress.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

in.orbit

A goal tracker for the week: you set goals with a target frequency, mark them as done during the week and see a summary of your progress.

I built it following the Rocketseat NLW Pocket: JavaScript event, then used it to practice a typed full-stack setup (Fastify and Drizzle on the server, React and TanStack Query on the client).

Features

  • Create a goal with a desired weekly frequency (1 to 7 times).
  • List the goals still pending this week.
  • Register a completion; a goal stops being pending once it reaches its weekly frequency.
  • Weekly summary: completed against total, with completions grouped by day.

Stack

Part Technology
Server Node.js, TypeScript, Fastify, Zod, Drizzle ORM, PostgreSQL (Docker)
Web React, TypeScript, Vite, Tailwind CSS, Radix UI, TanStack Query
Tooling Biome

API

Method and path Body What it does
POST /goals { "title", "desiredWeeklyFrequency" } Create a goal
GET /pending-goals Goals not yet completed enough times this week
POST /completions { "goalId" } Register a completion
GET /summary Summary of the week

Ready-to-run requests are in server/requests.http.

Running it locally

# Server
cd server
cp .env.example .env        # set DATABASE_URL, e.g. the one matching docker-compose.yaml
docker compose -f docker-compose.yaml up -d
npm install
npx drizzle-kit migrate     # applies .migrations/
npm run seed                # optional sample data
npm run dev                 # http://localhost:3333

# Web, from the repository root in another terminal
npm install
npm run dev

The web app calls the API at http://localhost:3333.

About

A goal tracker for the week: you set goals with a target frequency, mark them as done during the week and see a summary of your progress.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages