Take-home assignment

Mini Attendance App

Build a small attendance application: a user logs how they spent each working day of a month. The goal is to evaluate how you design something small but real end-to-end — data model, API, frontend, auth, and deployability.

You don't need to match my codebase. Pick what you're comfortable with. I care about a working, reasoned solution.

Deadline: end of the current month One-command setup TypeScript preferred — not required

01 — Domain

Three core entities

Pseudocode, not a contract — rename, restructure, retype as your stack dictates. What matters is the shape of the relationships and the rules below.

User

The actor. Add auth-specific fields as needed (e.g. passwordHash, providerId).

id email (unique) name

Assignment

The thing a time entry is logged against — a work category.

id name code type (WORK | VACATION | HOLIDAY)
  • Seeded globally; users do not create assignments.

Attendance

One record per user per month — the container for time entries.

id userId year month
  • Unique on (userId, year, month).
  • Created lazily the first time a user opens a month.

TimeEntry

A single line: "on this day, I spent X minutes on this assignment".

id attendanceId assignmentId date workedMinutes
  • Multiple entries per day are allowed (e.g. 6h WORK + 2h VACATION).

Rules

  • A user may only read or modify their own attendance and time entries.
  • A TimeEntry's date must fall within its Attendance.year / month.
  • A user cannot log time for future dates.
  • Total workedMinutes for any single date must not exceed 24 hours (1440 minutes).

02 — Functional requirements

What the app must do

Authentication

  • Pick any scheme that gives a real, persistent session — email + password, magic link (Resend / Postmark / etc.), or OAuth (Google, GitHub, …). Justify the choice briefly in the README.
  • Logout.
  • Routes must be gated: only authenticated users see the app.

Whatever you pick, the seeded users below must be able to log in out of the box. For magic-link or OAuth, that means a local mail catcher (Mailpit, MailHog) or pre-authorized provider accounts — document it.

Core flow

  • Land on the current month's attendance after login.
  • A month view (calendar grid or table — your call) showing each day with the time entries logged for it.
  • Add / edit / delete a time entry on a day: pick assignment, enter duration (minutes or HH:MM).
  • Switch between months (at minimum: previous month).

Data validation

Both server- and client-side validation are expected. Server-side is non-negotiable; client-side is for UX. State your validation rules clearly in the README.

03 — Non-functional

How it should run

Multiple seeded users

The app must come up empty-but-usable after a single command. Provide a seed that creates at least:

  • 3 users — credentials documented in the README
  • 5–10 assignments covering all three types
  • For 1–2 of the users, a fully filled-in prior month

Seed credentials may be hard-coded — call it out in the README as a dev artifact.

Running it — one command, your call how

I should be able to spin it up from a fresh clone in one step. Pick whichever fits your stack:

  • docker compose up — recommended; this is how I run my own stuff. Includes the DB, server, web, and seed step.
  • A serverless deploy I can just open — Vercel, Cloudflare Pages/Workers, Netlify, Fly.io, Render, anything. Share the URL.
  • A documented start script — pnpm dev, make up, ./scripts/start.sh — fine if it actually works on a clean machine with the documented prerequisites.

Whichever path you pick, the README must list:

  • The exact command(s) to start it
  • The URL(s) to open (local or deployed)
  • How seeded users log in
  • How to reset the database / start fresh

Monorepo or polyrepo — your call. A monorepo pairs nicely with Docker Compose, but plenty of shapes work.

Repository

  • Public GitHub or GitLab repository — submit a link. No zips.
  • A README.md with: setup steps, seeded credentials, your tech-stack choices and the why, a list of what you skipped or would add with more time.
  • No real secrets in committed .env. A .env.example is expected.

04 — Tech stack

Pick what you can ship in

Recommended

What I use
TypeScript Hono tRPC Prisma PostgreSQL better-auth TanStack Start React Tailwind v4 shadcn/ui Biome pnpm Vitest

Required

Minimum
  • A relational database — PostgreSQL preferred; MySQL/SQLite acceptable
  • A web frontend — React, Vue, Svelte, HTMX, or plain HTML
  • A backend HTTP API — Node/TS, Go, Python, Rust, etc.

A clean, working Go/Python/Ruby solution is more interesting than a half-finished TS one. I'll evaluate the result, not whether you matched my stack.

05 — Stretch goals

Optional — only if the core is solid

06 — Review

What I look at, in order

  1. 01

    Does it work?

    Can I run it from a fresh clone with one command (or open a deployed URL), and exercise the full flow end-to-end on the first try?

  2. 02

    Data model

    Are constraints (uniqueness, FKs) enforced at the DB level where they should be?

  3. 03

    Authorization

    Can user A read or modify user B's data by guessing IDs? If yes, you fail this section.

  4. 04

    Validation

    What happens if I submit workedMinutes: -60? 99999? A date outside the month? An empty assignment?

  5. 05

    Error handling

    DB down, malformed payloads, dependency timeouts — are errors caught at the right layer, surfaced clearly to the client, and not silently swallowed? Crashing is fine; lying isn't.

  6. 06

    Type safety

    If your language has a type system, is it doing work? No `any` / `interface{}` escape hatches at API boundaries, narrow types at the surface, invariants encoded in types where they fit.

  7. 07

    Code organization

    Can someone find their way around in 10 minutes? File structure, naming, separation of concerns.

  8. 08

    README quality

    Setup that works, documented trade-offs, an honest "what I'd do next" section.

07 — Deadline & timing

Deadline: end of the current month

In your submission, include rough timings for the major parts of the work — for example:

DB + schema
2h
API + auth
4h
Frontend
6h
Docker / packaging
1h
README
30m

I'm not grading by speed. I want the data to calibrate future assignments and to understand where you spent your effort.

08 — Submission

Send a link

Drop your repo URL below and I'll get a ping. Email is fine too — the address you received this from. Either way, include with your submission:

Good luck.