A web app for F-1 international students to track OPT and STEM OPT deadlines, unemployment days, and stay on top of their immigration status.
π Live Demo: opt-timeline-app.vercel.app
- Dashboard β Real-time OPT status, days remaining, and smart alerts
- Timeline β Visual timeline of your OPT and STEM extension dates
- Unemployment Tracker β Log periods and get warned before hitting the 90/150-day limit
- STEM Extension β Track your STEM OPT application and dates
- Analytics β Detailed breakdown of days used, remaining, and progress
- AI Assistant β Ask immigration questions powered by OpenAI
- Email Notifications β Daily reminders for upcoming deadlines via Resend
- Google OAuth β Sign in with your Google account
| Layer | Tech |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 + Radix UI |
| Database | PostgreSQL (Neon) |
| ORM | Prisma v7 |
| Auth | NextAuth v5 (Google OAuth) |
| AI | OpenAI API |
| Resend | |
| Deployment | Vercel |
git clone https://github.com/YOUR_USERNAME/opt-timeline.git
cd opt-timelinenpm installcp .env.example .envFill in your .env file β see Environment Variables below.
npx prisma migrate devnpm run dev| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (e.g. from Neon) |
AUTH_SECRET |
Random secret β generate with openssl rand -hex 32 |
AUTH_URL |
Your app URL (e.g. http://localhost:3000) |
AUTH_GOOGLE_ID |
Google OAuth client ID |
AUTH_GOOGLE_SECRET |
Google OAuth client secret |
RESEND_API_KEY |
API key from Resend |
RESEND_FROM_EMAIL |
Sender email address |
OPENAI_API_KEY |
API key from OpenAI |
NEXT_PUBLIC_APP_URL |
Your public app URL |
CRON_SECRET |
Secret to protect cron endpoint β generate with openssl rand -hex 32 |
- Go to Google Cloud Console β APIs & Services β Credentials
- Create an OAuth 2.0 Client ID (Web application)
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy the client ID and secret to your
.env
npm i -g vercel
vercel --prodAdd all environment variables in Vercel Dashboard β Settings β Environment Variables.
Add your production URL to Google OAuth authorized redirect URIs:
https://your-app.vercel.app/api/auth/callback/google
app/
βββ (app)/ # Protected app routes
β βββ dashboard/ # Main dashboard
β βββ timeline/ # Visual timeline
β βββ unemployment/ # Unemployment log
β βββ stem/ # STEM extension
β βββ analytics/ # Analytics page
β βββ ai-assistant/ # AI chat
β βββ notifications/ # Notification settings
βββ api/
β βββ auth/ # NextAuth handlers
β βββ ai-chat/ # OpenAI endpoint
β βββ cron/ # Daily notification job
β βββ onboarding/ # Save OPT dates
β βββ stem/ # STEM extension API
β βββ unemployment/ # Unemployment log API
βββ sign-in/ # Sign in page
βββ onboarding/ # First-time setup
lib/
βββ opt-engine.ts # Core timeline calculation logic
βββ prisma.ts # Prisma client
βββ notifications.ts # Email notification logic
prisma/
βββ schema.prisma # Database schema
MIT