Skip to main content

Tech Stack Overview

Arre is built with modern web technologies focused on developer experience, performance, and maintainability.

Frontend Stack

Core Framework

Version: 19.2.4 (package.json:30)React powers Arre’s UI with modern features:
  • Concurrent Rendering: Improved responsiveness for better UX
  • Automatic Batching: Optimized re-renders
  • Hooks: All components use functional components with hooks
  • Strict Mode: Enabled in development for detecting potential issues
// src/main.tsx:5-9
ReactDOM.createRoot(document.getElementById('app')!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)
Why React 19? Latest features like improved hydration, better async handling, and performance optimizations.

Routing

React Router ^7.13.0 (package.json:33) Handles client-side routing with nested routes and protected routes:
// src/App.tsx:22-40
<BrowserRouter>
  <Routes>
    <Route path="/login" element={<Login />} />
    
    <Route element={<ProtectedRoute><MainLayout /></ProtectedRoute>}>
      <Route path="/" element={<Dashboard />} />
      <Route path="/inbox" element={<Inbox />} />
      <Route path="/upcoming" element={<Upcoming />} />
      <Route path="/anytime" element={<Anytime />} />
      <Route path="/someday" element={<Someday />} />
      <Route path="/logbook" element={<Logbook />} />
      <Route path="/briefing" element={<AIBriefing />} />
      <Route path="/settings" element={<Settings />} />
    </Route>
  </Routes>
</BrowserRouter>

Styling & UI

Component-scoped styling without runtime overhead:
// src/pages/Dashboard.tsx (example pattern)
import styles from './Dashboard.module.css';

<div className={styles.container}>
  <h1 className={styles.title}>Dashboard</h1>
</div>
Why CSS Modules?
  • Scoped styles prevent conflicts
  • TypeScript integration via declarations
  • Zero runtime cost
  • Simple mental model
Global theme system using CSS variables:
/* src/styles/variables.css - Theme System */
:root {
  --color-bg: #ffffff;
  --color-text: #171717;
  --accent-emerald: #10b981;
  --radius-sm: 4px;
  --spacing-md: 16px;
}

[data-theme="dark"] {
  --color-bg: #0a0a0a;
  --color-text: #fafafa;
}
Theme switching is handled by ThemeProvider which toggles the data-theme attribute.
Version: ^0.564.0 (package.json:29)Beautiful, consistent icon library:
import { Calendar, CheckCircle, Inbox } from 'lucide-react';

<Calendar size={20} />
<CheckCircle className={styles.icon} />
Why Lucide?
  • Tree-shakeable (only import icons you use)
  • Consistent design language
  • Customizable size, color, stroke
Version: ^3.7.0 (package.json:34)Data visualization for the velocity chart on Dashboard:
// src/features/dashboard/VelocityChart.tsx (example pattern)
<BarChart data={velocityData}>
  <Bar dataKey="completion" fill="var(--accent-emerald)" />
</BarChart>
Version: ^12.34.0 (package.json:28)Smooth animations and transitions:
import { motion } from 'framer-motion';

<motion.div
  initial={{ opacity: 0, y: 20 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 0.3 }}
>
  {content}
</motion.div>

Utilities

clsx ^2.1.1 - Conditional className joining
import clsx from 'clsx';

<div className={clsx(
  styles.task,
  isCompleted && styles.completed,
  isHighPriority && styles.priority
)} />
tailwind-merge ^3.4.0 - Smart Tailwind class merging (utility, not using full Tailwind) react-markdown ^10.1.0 - Render markdown content (used in AI Briefing)

Backend Stack

Firebase Platform

Version: ^12.9.0 (package.json:27) Arre uses Firebase as its complete backend infrastructure:
Module: firebase/auth
// src/lib/firebase.ts:2,21
import { getAuth, connectAuthEmulator } from 'firebase/auth';
export const auth = getAuth(app);
Providers:
  • Google OAuth (GoogleAuthProvider)
  • Anonymous Auth (signInAnonymously)
  • Account Linking (linkWithPopup)
Authentication Flow:
// src/lib/auth/AuthContext.tsx:38-46
const signInWithGoogle = async () => {
  const provider = new GoogleAuthProvider();
  await signInWithPopup(auth, provider);
};

Cloud Functions (Backend)

Runtime: Node.js 22 (functions/package.json:12) Dependencies:
Server-side Firebase SDK for privileged access:
// functions/index.js:4,10
const admin = require("firebase-admin");
admin.initializeApp();
Cloud Functions framework:
// functions/index.js:1
const { onCall, HttpsError } = require("firebase-functions/v2/https");

exports.processMagicImport = onCall({ 
  secrets: [geminiApiKey],
  memory: "512MiB",
  timeoutSeconds: 60
}, async (request) => {
  // Function logic
});
Gemini 2.5 Flash integration for AI features:
// functions/index.js:18-21
const getGeminiModel = (apiKey) => {
  const genAI = new GoogleGenerativeAI(apiKey);
  return genAI.getGenerativeModel({ model: "gemini-2.5-flash" });
};
Used for:
  • Magic Import: Extract tasks from documents
  • Daily Briefing: Generate personalized summaries
Parse PDF files for Magic Import:
// functions/index.js:29-32
if (mimeType === 'application/pdf') {
  const data = await pdf(buffer);
  return data.text;
}
Parse CSV files:
// functions/index.js:34-40
if (mimeType === 'text/csv') {
  const records = parse(buffer.toString('utf-8'), {
    columns: true,
    skip_empty_lines: true
  });
  return JSON.stringify(records, null, 2);
}
Google Tasks API integration:
// functions/index.js:200
return google.tasks({ version: 'v1', auth: oauth2Client });

AI Integration

Gemini 2.5 Flash

Model: gemini-2.5-flash (functions/index.js:20) Google’s fast, efficient multimodal AI model: Capabilities:
  • Text generation
  • Document understanding
  • Structured JSON output
  • Large context window (30,000 chars used)
Implementation:
// functions/index.js:86-95
const model = getGeminiModel(geminiApiKey.value());
const result = await model.generateContent([
  systemPrompt,
  { text: `Document Content:\n${extractedText.substring(0, 30000)}` }
]);

const response = result.response;
const text = response.text();
const tasks = JSON.parse(text);
API keys are stored in Google Cloud Secret Manager and accessed via defineSecret() for security.

OAuth & Integrations

Google OAuth

Package: @react-oauth/google ^0.13.4 (package.json:25) Enhanced Google sign-in with additional scopes:
// src/lib/auth/AuthContext.tsx:68-73
const provider = new GoogleAuthProvider();
provider.addScope('https://www.googleapis.com/auth/tasks');
provider.setCustomParameters({
  prompt: 'consent',
  access_type: 'offline'
});
Why offline access? To obtain refresh tokens for server-side API calls to Google Tasks.

Google Tasks API

Integration allows:
  • Fetching task lists
  • Reading tasks
  • Syncing task status
Implemented entirely in Cloud Functions for security (OAuth tokens never exposed to client).

Testing

Playwright

Version: ^1.58.2 (package.json:15) End-to-end testing framework:
// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  use: {
    baseURL: 'http://localhost:5173',
  },
});
Scripts:
  • npm test - Run tests headless
  • npm run test:ui - Run tests with UI mode
E2E tests should run against Firebase emulators, not production.

Development Tools

Firebase Tools

Version: ^15.6.0 (package.json:20) CLI for Firebase development:
# Start emulators
npm run emulators

# Deploy functions
firebase deploy --only functions

# Deploy hosting
firebase deploy --only hosting
Emulator Configuration (firebase.json:16-32):
{
  "emulators": {
    "auth": { "port": 9099 },
    "functions": { "port": 5001 },
    "firestore": { "port": 8080 },
    "storage": { "port": 9199 },
    "ui": { "enabled": true }
  }
}

Build Tools

@vitejs/plugin-react ^4.7.0 - Official Vite plugin for React with Fast Refresh TypeScript Compiler - Type checking before build:
// package.json:8
"build": "tsc && vite build"

Version Summary

Frontend

PackageVersionPurpose
react19.2.4UI framework
react-dom19.2.4DOM rendering
react-router-dom7.13.0Client routing
typescript5.9.3Type safety
vite7.3.1Build tool
firebase12.9.0Backend SDK
framer-motion12.34.0Animations
lucide-react0.564.0Icons
recharts3.7.0Charts
@react-oauth/google0.13.4Google OAuth
react-markdown10.1.0Markdown rendering
clsx2.1.1Classname utility

Backend (Cloud Functions)

PackageVersionPurpose
firebase-admin13.6.1Server SDK
firebase-functions7.0.0Functions framework
@google/generative-ai0.24.1Gemini AI
googleapis171.4.0Google APIs
pdf-parse2.4.5PDF parsing
csv-parse6.1.0CSV parsing
google-auth-library10.5.0OAuth

Development

PackageVersionPurpose
@playwright/test1.58.2E2E testing
firebase-tools15.6.0Firebase CLI
@types/react19.2.14React types
@vitejs/plugin-react4.7.0Vite React plugin

Next Steps

Architecture Overview

Understand how these technologies work together

Project Structure

See how code is organized in the repository

Build docs developers (and LLMs) love