Skip to content

zeezo679/InvoiceBuilder_Web

Repository files navigation

InvoiceBuilder Web Auth Frontend

Frontend auth module for InvoiceBuilder built with React, TypeScript, Vite, Tailwind, shadcn/ui, Axios, and React Router v6.

Quick Start

  1. Install dependencies:
npm install
  1. Create your environment file from .env.example:
cp .env.example .env
  1. Update .env with your API URL:
VITE_API_URL=http://localhost:5043
  1. Start the app:
npm run dev

Scripts

  • npm run dev - Start development server
  • npm run build - Type-check and build production bundle
  • npm run lint - Run ESLint
  • npm run preview - Preview production build locally

Auth Routes

  • /register
  • /login
  • /verify-email
  • /forgot-password
  • /reset-password?email=...&token=...
  • /dashboard (protected)

Security Notes

  • Access and refresh tokens are stored in memory only (not in localStorage/sessionStorage).
  • Axios request interceptor attaches Authorization: Bearer <accessToken>.
  • Axios response interceptor handles 401 with one silent refresh attempt.
  • If refresh fails, auth state is cleared and user is redirected to /login.

API Base URL

The app requires VITE_API_URL. If it is missing, startup will fail intentionally to avoid hitting an undefined API host.

About

This repository is the Frontend for the InvoiceBuilder API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages