Skip to main content

Overview

upLegal is built with modern web technologies focused on developer experience, performance, and scalability.

Frontend Stack

Core Framework

React 18.3

Component-based UI library with hooks, concurrent features, and automatic batching.

TypeScript 5.9

Type-safe JavaScript with static type checking and enhanced IDE support.

Vite 5.4

Next-generation frontend build tool with instant HMR and optimized production builds.

React Router 6.26

Declarative routing for single-page applications with nested routes.

UI & Styling

PackageVersionPurpose
Tailwind CSS3.4.11Utility-first CSS framework
Radix UIVariousAccessible, unstyled UI primitives
shadcn/uiLatestPre-built components using Radix + Tailwind
Framer Motion12.23Animation library for React
Lucide React0.462Beautiful icon set (2000+ icons)
class-variance-authority0.7Component variant utilities
tailwind-merge2.5Merge Tailwind classes without conflicts
tailwindcss-animate1.0Animation utilities for Tailwind

Radix UI Components

upLegal uses 20+ Radix UI primitives for accessible, unstyled components:
  • @radix-ui/react-dialog - Modals and dialogs
  • @radix-ui/react-alert-dialog - Confirmation dialogs
  • @radix-ui/react-popover - Floating content
  • @radix-ui/react-hover-card - Hover tooltips
  • @radix-ui/react-tooltip - Accessible tooltips
  • @radix-ui/react-context-menu - Right-click menus
  • @radix-ui/react-dropdown-menu - Dropdown menus
  • @radix-ui/react-menubar - Menu bars
  • @radix-ui/react-checkbox - Checkbox inputs
  • @radix-ui/react-radio-group - Radio button groups
  • @radix-ui/react-select - Select dropdowns
  • @radix-ui/react-slider - Range sliders
  • @radix-ui/react-switch - Toggle switches
  • @radix-ui/react-label - Form labels
  • @radix-ui/react-accordion - Collapsible sections
  • @radix-ui/react-collapsible - Show/hide content
  • @radix-ui/react-tabs - Tabbed interfaces
  • @radix-ui/react-scroll-area - Custom scrollbars
  • @radix-ui/react-separator - Visual dividers
  • @radix-ui/react-navigation-menu - Navigation menus
  • @radix-ui/react-toast - Toast notifications
  • @radix-ui/react-progress - Progress bars
  • @radix-ui/react-avatar - User avatars
  • @radix-ui/react-aspect-ratio - Aspect ratio containers

State Management

PackageVersionPurpose
@tanstack/react-query5.56Server state management & caching
React Context APIBuilt-inAuth, messages, notifications
React Hook Form7.53Performant form state management
Zod3.25TypeScript-first schema validation
@hookform/resolvers3.9Validation resolver for React Hook Form

Data & Charts

  • Recharts 2.12 - Composable charting library (earnings, analytics)
  • @tanstack/react-virtual 3.13 - Virtual scrolling for large lists
  • react-window 2.2 - Efficient rendering of large datasets
  • react-virtualized-auto-sizer 1.0 - Auto-sizing for virtualized components

Date & Time

  • date-fns 4.1 - Modern date utility library
  • date-fns-tz 3.2 - Time zone support for date-fns
  • react-day-picker 9.11 - Date picker component

Additional UI Libraries

  • Swiper 12.1 - Modern touch slider
  • embla-carousel-react 8.3 - Lightweight carousel
  • react-dropzone 14.3 - Drag-and-drop file uploads
  • react-resizable-panels 2.1 - Resizable panel layouts
  • input-otp 1.2 - OTP input component
  • cmdk 1.0 - Command menu component
  • Sonner 1.5 - Toast notification library
  • Vaul 0.9 - Drawer component

Developer Tools

  • react-intersection-observer 9.16 - Detect element visibility
  • react-helmet-async 2.0 - Document head management
  • react-ga4 2.1 - Google Analytics 4 integration

Backend Stack

Server Framework

Express 5.1

Fast, unopinionated web framework for Node.js with routing and middleware.

Node.js 18+

JavaScript runtime for server-side execution.

Server Dependencies

PackageVersionPurpose
dotenv17.2Environment variable loading
cors2.8Cross-origin resource sharing
cookie-parser1.4Parse HTTP cookies
axios1.12HTTP client for API requests
axios-cookiejar-support6.0Cookie jar for axios
tough-cookie6.0HTTP cookie parsing
node-fetch3.3Fetch API for Node.js
cheerio1.1HTML parsing (PJUD scraping)
node-cron4.2Scheduled task execution

Database & Backend Services

Supabase Stack

@supabase/supabase-js

Official JavaScript client for Supabase (PostgreSQL, Auth, Storage, Real-time).

PostgreSQL

Open-source relational database with JSON support and advanced features.
Supabase Features Used:
  • Authentication: Email/password, magic links, JWT sessions
  • Database: PostgreSQL with Row Level Security (RLS)
  • Storage: S3-compatible object storage
  • Real-time: WebSocket subscriptions
  • Edge Functions: Serverless functions (planned)

Third-Party Integrations

Payment Processing

  • mercadopago 2.10 - MercadoPago SDK for payments and OAuth
  • @types/mercadopago 1.5 - TypeScript types

Email Service

  • resend 6.0 - Modern email API for transactional emails

Analytics

  • react-ga4 2.1 - Google Analytics 4 tracking

Calendar & Video

  • Google Meet (API integration)
  • Google Calendar (integration planned)

Lawyer Verification

  • PJUD (Poder Judicial de Chile) - RUT verification via web scraping

Build Tools & Development

Build & Bundling

ToolVersionPurpose
Vite5.4Build tool & dev server
@vitejs/plugin-react-swc3.5Fast React refresh with SWC
TypeScript5.9Type checking & compilation
PostCSS8.4CSS transformations
Autoprefixer10.4Add vendor prefixes to CSS
Terser5.44JavaScript minification

Code Quality

  • ESLint 9.9 - JavaScript/TypeScript linting
  • typescript-eslint 8.0 - TypeScript ESLint rules
  • eslint-plugin-react-hooks 5.1 - React hooks linting
  • eslint-plugin-react-refresh 0.4 - React Fast Refresh validation

Type Definitions

  • @types/node - Node.js type definitions
  • @types/react - React type definitions
  • @types/react-dom - React DOM type definitions
  • @types/cheerio - Cheerio type definitions
  • @types/lodash - Lodash type definitions
  • @types/uuid - UUID type definitions
  • @types/tough-cookie - Cookie type definitions

Deployment Stack

Netlify

Frontend hosting with CDN, automatic deployments, and serverless functions.

Render

Backend hosting for Express server with auto-scaling and health checks.

Supabase Cloud

Managed PostgreSQL database with global edge network.

Development Utilities

  • concurrently - Run multiple npm scripts simultaneously
  • ts-node 10.9 - TypeScript execution for Node.js
  • micro 10.0 - Async HTTP microservices

Package Manager

upLegal supports multiple package managers:
npm install
The project includes both package-lock.json and bun.lockb, indicating support for npm and Bun package managers.

Version Requirements

  • Node.js: 18.0.0 or higher (recommended: 20.x LTS)
  • npm: 8.0.0 or higher
  • TypeScript: 5.9+

Next Steps

Architecture Overview

Understand how all these technologies work together

Local Setup

Install dependencies and run upLegal locally

Database Schema

Explore the PostgreSQL database structure

Environment Variables

Configure required environment variables

Build docs developers (and LLMs) love