Skip to content
S

STEMNOVA

Igniting skills. Guiding futures.

Created on 24th January 2026

•

S

STEMNOVA

Igniting skills. Guiding futures.

The problem STEMNOVA solves

Core Problem: Citizens Miss Critical Legal Deadlines

Every year, thousands of citizens suffer serious legal and financial consequences because they miss time-bound legal obligations they were unaware of or unable to track effectively.

Common examples include:

Court hearing dates buried inside lengthy legal documents

Missed license, permit, or registration renewals

Forgotten tax filing or compliance deadlines

Failure to respond to government notices within mandatory time limits

Once missed, these deadlines often lead to irreversible outcomes such as fines, penalties, loss of legal rights, halted business operations, or weakened legal standing.

The issue is not carelessness — it is the absence of clarity, visibility, and proactive reminders.

Why This Problem Matters

Legal documents are complex and written in technical language

Critical dates are scattered across pages without prioritization

Citizens don’t understand the severity or consequences of missing deadlines

There is no unified system to track all legal obligations in one place

As a result, people lose rights silently, without alerts or second chances.

What RightGuard Does

RightGuard is a personal legal obligation tracker that transforms complex legal paperwork into a simple, clear, and prioritized action system.

Key Features

Upload legal documents such as notices, contracts, or court summons

Automatically extract and track important dates

Visual countdowns for approaching deadlines

Risk-based prioritization (Critical, High, Medium, Low)

Clear explanation of consequences if a deadline is missed

Centralized dashboard showing overall legal status

Real-World Use Cases
Scenario Without RightGuard With RightGuard
Court hearing Date missed, legal penalty Highlighted as critical
Property tax notice Deadline forgotten, fine added Tracked and paid on time
License renewal Expired, business halted Early reminder, renewed
Insurance claim Missed claim window Deadline visible, claim filed
Who Benefits

Individual citizens managing personal legal matters

Small business owners handling compliance deadlines

Senior citizens needing simplified reminders

First-time homebuyers navigating documentation

Anyone receiving legal or government notices

Value Proposition

Your personal legal deadline guardian — because missing a date shouldn’t cost you your rights.

RightGuard ensures that no legal obligation goes unnoticed by making deadlines visible, understandable, and actionable, helping citizens protect their rights through timely action.

Challenges we ran into

Challenges I Ran Into

  1. CORS (Cross-Origin Resource Sharing) Nightmare

The Problem: Frontend (localhost:3000) couldn't communicate with Backend (localhost:8080). Every API call was blocked with:

Access to fetch at 'http://localhost:8080/api/v1/...' from origin 'http://localhost:3000'
has been blocked by CORS policy

The Solution: Added comprehensive CORS middleware in FastAPI with wildcard origins and explicit method/header allowances:
python
app.add_middleware(
CORSMiddleware,
allow_origins=[""],
allow_credentials=True,
allow_methods=["
"],
allow_headers=["*"],
)

  1. Supabase JWT Token Validation Failures

The Problem: Supabase Auth tokens kept failing validation with "Invalid audience" errors. The tokens were valid but our backend couldn't verify them.

The Solution: Initially tried disabling audience/issuer validation, but ultimately simplified the architecture by removing JWT entirely and using direct database authentication with user ID headers. This made the system more straightforward and eliminated token-related issues.

  1. Database Connection String Format

The Problem: Supabase PostgreSQL connection kept failing. The connection string format changed between direct connection and connection pooling:

  • Direct: postgresql://postgres:[password]@db.xxx.supabase.co:5432/postgres
  • Pooler: postgresql://postgres.xxx:[password]@aws-1-region.pooler.supabase.com:5432/postgres

The Solution: Used the Supabase pooler URL format which is more reliable for serverless deployments and doesn't have connection limit issues.

  1. Python 3.13 + bcrypt Compatibility

The Problem:bcrypt library had compatibility issues with Python 3.13, causing password hashing to fail:

AttributeError: module 'bcrypt' has no attribute 'about'

The Solution: Replaced bcrypt with Python's built-in hashlib using SHA-256 for password hashing:
python
def hash_password(password: str) -> str:
return hashlib.sha256(password.encode()).hexdigest()

  1. SQLAlchemy Model Type Mismatches

The Problem: Pylance/type checkers complained about SQLAlchemy column types not matching Python types. Fields like Column(String) weren't recognized as str.

The Solution: Added explicit type annotations to model fields:
python
email: str = Column(String(255), unique=True, index=True, nullable=False)

These are cosmetic warnings that don't affect runtime, but cleaning them up improved code quality.

  1. Frontend-Backend Data Format Mismatch

The Problem:Flutter/Web frontend expected camelCase (dueDate, riskLevel) but Python backend returned snake_case (due_date, risk_level).

The Solution: Created Pydantic schemas with alias generators to automatically convert between formats:
python
class Config:
alias_generator = to_camel
populate_by_name = True

  1. Render Deployment - "No Open Ports Detected"

The Problem: Render couldn't detect the running server and kept restarting the deployment.

The Solution: Ensured the start command used the $PORT environment variable that Render provides:
bash
uvicorn app.main:app --host 0.0.0.0 --port $PORT

  1. User Authentication Flow Simplification

The Problem: Original design used Supabase Auth + JWT tokens + Python backend verification - too many moving parts causing failures at each step.

The Solution:Simplified to direct database authentication:

  1. Frontend sends email/password to backend

  2. Backend verifies against users table in Supabase PostgreSQL

  3. User ID stored in localStorage and sent via X-User-Id header

  4. No tokens, no refresh logic, no external auth dependencies

  5. Document Storage on Serverless

The Problem: Uploaded documents were lost on every Render deployment because the free tier doesn't persist filesystem storage.

The Solution: Integrated Supabase Storage for document persistence:

  • Files uploaded to Supabase Storage bucket
  • Only metadata (URL, filename) stored in database
  • Documents accessible via public URLs
  1. NoneType Errors in Protected Routes
    The Problem:Routes failed with AttributeError: 'NoneType' object has no attribute 'id' when user wasn't authenticated.

The Solution: Added proper null checks and HTTP 401 responses in the dependency injection:

def get_current_user(...):
    if not user_id:
        raise HTTPException(status_code=401, detail="Not authenticated")
    user = db.query(User).filter(User.id == user_id).first()
    if not user:
        raise HTTPException(status_code=401, detail="User not found")
    return user
  1. Start simple- Complex auth systems create more failure points
  2. Test locally first - CORS and connection issues are easier to debug locally
  3. Read error messages carefully - Most solutions were in the error details
  4. Use environment variables -riables - Never hardcode credentials
  5. Check documentation - Supabase connection strings have specific formats for different use cases

Discussion

Builders also viewed

See more projects on Devfolio