Expiry App — Complete Overview

Last Updated: January 2026

What is Expiry?

Expiry is a modern contract management dashboard that helps teams track, manage, and automate notifications for contract renewals and expirations. It eliminates surprises by providing visibility into all contract deadlines and automatically alerting stakeholders before contracts expire.

This is a production-ready Next.js 14 application with built-in AI scanning, smart notifications, cost analytics, and a fully automated cron-based email system.


Core Problem Solved

The Problem

The Solution

Key Features

Highlights based on the official product page:

1. AI Contract Scanning

2. Smart Alert System

3. Cost Dashboard

4. Calendar View

5. Export & Share

5. Contract Status Tracking

6. Authentication & Security

7. Automated Email Notifications

Architecture Overview

Tech Stack

Frontend:  Next.js 14, React 18, TypeScript, Tailwind CSS
Backend:   Next.js API Routes, Node.js
Database:  Supabase (PostgreSQL)
Storage:   Supabase Storage
Auth:      Supabase Auth
Email:     Resend API
AI:        OpenAI API
Hosting:   Vercel

High-Level Flow

Upload Contract → AI Scanning → Save to Supabase → Daily Cron → Send Email → Dashboard Visibility

Database Schema (Core)

contracts
- id (UUID)
- user_id (FK)
- vendor_name (text)
- cost (decimal)
- currency (text)
- start_date (date)
- end_date (date)
- notice_date (date)
- status (enum: active, expired, upcoming)
- file_url (text)
- created_at, updated_at

profiles
- id (UUID)
- email (text)
- company_name (text)
- created_at

notifications
- id (UUID)
- contract_id (FK)
- user_id (FK)
- email_id (text)
- sent_at (timestamp)
- status (enum: sent, failed)

How It Works

  1. User uploads a contract → stored in Supabase Storage
  2. AI parses vendor, costs, dates, and notice period
  3. Data saved; notice_date calculated from end_date - notice
  4. Notifications trigger before expiry; email templates available
  5. Dashboard shows color-coded statuses and calendar

Project Structure (High-Level)

src/app
- dashboard, profile, pricing, login
- api/cron/check-expiries (⭐)
- api/parse-contract (AI extraction)
- emails/ExpiryNotification (⭐)

lib
- supabaseClient, stripe, email utils

Getting Started

  1. Install dependencies (Node 18+)
  2. Configure .env with Supabase, OpenAI, Resend, Stripe
  3. Create storage bucket `contract-files`
  4. Run migrations and start dev server

Security Considerations

Future Enhancements

← Back to Projects