export interface RetryOptions {
retries: number;
baseMs: number;
maxMs: number;
signal?: AbortSignal;
onRetry?: (attempt: number, delay: number, err: unknown) => void;
import axios, { AxiosError } from 'axios'
import { v4 as uuidv4 } from 'uuid'
const api = axios.create({
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:3000/api/v1',
timeout: 15000,
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
interface FilterState {
search: string
category: string | null
import React from "react";
type FallbackProps = {
error: Error;
reset: () => void;
};
import { Navigate, useLocation } from 'react-router-dom'
import { useAuth } from '@/contexts/AuthContext'
interface ProtectedRouteProps {
children: React.ReactNode
}
import axios from 'axios';
export type NormalizedErrors = {
fields: Record<string, string>;
formLevel: string | null;
};
type AsyncTask = () => Promise<void>;
export interface GuardOptions {
name: string;
logger?: Pick<Console, "info" | "warn" | "error">;
}
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { fileURLToPath, URL } from 'node:url';
const resolvePath = (relative: string): string =>
fileURLToPath(new URL(relative, import.meta.url));
import { useEffect, useRef, useState } from "react";
export type AsyncState<T> =
| { status: "loading" }
| { status: "error"; error: Error }
| { status: "success"; data: T };
import { defaultSchema, type Schema } from 'hast-util-sanitize';
export const markdownSchema: Schema = {
...defaultSchema,
attributes: {
...defaultSchema.attributes,
import { useForm } from 'react-hook-form'
import { PostFormData } from '@/types'
interface PostFormProps {
initialData?: Partial<PostFormData>
onSubmit: (data: PostFormData) => Promise<void>
import express from 'express';
import cookieParser from 'cookie-parser';
import { issueCsrfToken, csrfProtection } from './csrf';
import { transfersRouter } from './routes/transfers';
const app = express();