Skip to content

AlgoArtist06/leaveledger

Repository files navigation

LeaveLedger

PTO requests, approvals, balances, and team coverage for small teams.

LeaveLedger product

CI License: MIT

Live demo

Features

  • Submit policy-aware full-day or half-day leave requests.
  • Reject overlaps, holidays, weekends, and insufficient balances before write.
  • Route decisions to managers with concurrency-safe balance updates.
  • Enforce owner, admin, member, and viewer permissions server-side.
  • Search, filter, sort, paginate, bulk-decide, and export request records.
  • Track immutable request, balance, and audit activity.
  • Review team coverage, balances, calendars, and workspace analytics.
  • Operate every core flow by keyboard and from 320px mobile widths.

Tech stack

Next.js App Router · strict TypeScript · React · Tailwind CSS · shadcn/ui patterns · PostgreSQL on Neon · Prisma · Auth.js · Zod · Vitest · Playwright · GitHub Actions · Vercel

Quick start

git clone https://github.com/AlgoArtist06/leaveledger.git
cd leaveledger
cp .env.example .env
pnpm install
pnpm db:migrate
pnpm db:seed
pnpm dev

Open http://localhost:3000.

Demo credentials

Role Email Password
Owner owner@demo.com demo1234demo
Admin admin@demo.com demo1234demo
Member member@demo.com demo1234demo
Viewer viewer@demo.com demo1234demo

Environment variables

Variable Required Purpose
DATABASE_URL Yes Neon PostgreSQL connection string
AUTH_SECRET Yes Auth.js signing secret, at least 32 characters
NEXT_PUBLIC_APP_URL Yes Absolute canonical application URL
AUTH_GOOGLE_ID No Google OAuth client ID
AUTH_GOOGLE_SECRET No Google OAuth client secret
EMAIL_FROM Signup/reset Verified sender identity
EMAIL_API_URL Signup/reset Transactional email HTTP endpoint
EMAIL_API_KEY Signup/reset Server-only transactional email key

Architecture

LeaveLedger is a modular Next.js monolith. Feature services own business rules and Prisma transactions; thin server actions parse shared Zod contracts and revalidate routes. Every query and mutation is organization-scoped, with role and row authorization enforced on the server. See architecture and API/data contracts.

Testing

pnpm lint
pnpm typecheck
pnpm test
pnpm test:e2e
pnpm build

Screenshots

Landing Authentication Mobile
Landing page Sign-in page Mobile landing

Demo video

Watch the 74-second Loom product walkthrough. A local WebM copy is also included.

Documentation

Roadmap

  • Calendar-provider synchronization
  • Multi-stage approval policies
  • Regional policy templates

License

MIT - see LICENSE.

Built for the Digital Heroes Full Stack Developer Trial.

About

PTO requests, approvals, balances, and team coverage for small teams.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors