How I Built Pathway AI: A Full-Stack SaaS Platform in 1 Month

typescript dev.to

How I Built Pathway AI: A Full-Stack SaaS Platform in 1 Month

I built Pathway AI, a SaaS platform for international students planning their study abroad journey, in roughly one month. Here's how I went from concept to live product using Next.js, Supabase, and TypeScript.

The Problem

International students face overwhelming challenges when planning to study abroad: fragmented information, biased agents, unclear visa requirements, and no clear way to compare destinations. I wanted to build something that solved this.

The Stack

  • Frontend: Next.js (App Router) + TypeScript + Tailwind CSS
  • Backend: Supabase (PostgreSQL) + Edge Functions
  • AI: Gemini API
  • Deployment: Vercel
  • Monitoring: Sentry for error tracking
  • Rate Limiting: Upstash Redis

Architecture Overview

1. User Authentication

Used Supabase Auth with Google and GitHub OAuth. This approach prevents spam and ensures data quality:

  • No password management — Students don't have to remember another password
  • Validates real emails only — Blocks temporary/trash email services (10minutemail, temp mail, etc.)
  • Prevents fake accounts — Reduces spam signups and ensures only genuine users access the platform
  • Better data quality — No throwaway accounts cluttering your user database
// lib/supabase.ts
import { createClient } from '@supabase/supabase-js';

export const supabase = createClient(
  process.env.NEXT_PUBLIC_SUPABASE_URL!,
  process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!
);
Enter fullscreen mode Exit fullscreen mode

2. Database Schema

Built around student profiles and their journey:

profiles → stores all student data (destination, budget, course, goals)
visa_checklists → tracks document completion
sops → stores Statement of Purpose drafts
resumes → resume builder data
countries / cities / courses → reference data for exploration

Row-Level Security (RLS) ensures students only see their own data.

3. Core Features

SOP Builder

Students fill their profile → system generates a Statement of Purpose draft using structured templates.

// lib/sop-generator.ts
export function generateSOP(profile: Profile): string {
  return `
Dear Admissions Committee,

I am applying to ${profile.course_name} at ${profile.preferred_university} 
in ${profile.target_destination} because...
  `;
}
Enter fullscreen mode Exit fullscreen mode

Resume Builder

Similar approach — profile data → formatted resume sections → PDF export.

Career Advisor

Core system provides personalized guidance using rule-based logic tailored to student profile + target destination.

Production: Always uses reliable rule-based engine — fast, cost-free, predictable responses.

Self-hosted / Development: Optional Gemini API integration available. If you run this locally and add a Gemini API key, the Advisor can enrich responses with real AI personalization. This is gated behind a NODE_ENV=development flag — production deployments never call AI APIs.

Visa Checklist

Students track required documents for their target country. Sections stored as JSON, items marked complete as they prepare.

Country/City Explorer

Browse destinations side-by-side, compare costs, safety scores, job prospects, PR pathways.

4. Key Technical Decisions

Why Supabase over Firebase?

  • PostgreSQL for complex queries (joins across countries/cities/courses)
  • RLS for built-in data isolation
  • Better for structured reference data

Why Vercel?

  • Seamless Next.js deployment
  • Serverless functions for contact forms
  • Auto-scaling, zero ops overhead

Why TypeScript everywhere?

  • Caught ~30% of bugs before runtime
  • Server/client type safety
  • Easier refactoring at scale

5. Deployment & Monitoring

Vercel: Automatic deployments on git push. Environment variables stored securely.

Sentry: Catches errors in production. Configured at build time.

Upstash Redis: Rate limits API calls (contact form, future exports).

Challenges & Lessons

Challenge 1: Handling complex JSONB data
Storing skills, experiences, languages as JSON meant flexible schema but harder migrations. Solved by keeping schema versions in mind from day one.

Challenge 2: Ensuring data consistency
With RLS policies, had to test extensively to prevent data leaks. Built a checklist: test as authenticated user, test as different user, test with no auth.

What I'd Do Differently

  1. Use migrations from day one — Supabase migrations would've saved rollback headaches
  2. Mock Gemini responses earlier — Would've validated UX before API costs
  3. Build analytics sooner — Knowing which features students use most helps prioritize
  4. Deploy to staging earlier — Caught mobile issues much later than ideal

Live Demo

Check it out: pathway-ai-olive.vercel.app

GitHub: github.com/krishna-builds-dev/pathway-ai

Key Takeaways

  • Supabase + Next.js is a powerful combo for rapid SaaS development
  • Rule-based logic over AI when it's reliable enough — simpler, cheaper, predictable
  • Type safety saves time — TypeScript caught real bugs

What's Next?

  • Mobile app (React Native)
  • Integration with university APIs
  • Community features (peer advice)

Have you built a SaaS from scratch? Drop your stack and lessons in the comments below!

I'm a full-stack developer focused on Next.js + Supabase. Open for freelance work. Follow on GitHub or LinkedIn

Source: dev.to

arrow_back Back to Tutorials