Skip to content

ncminh/vibejs

Repository files navigation

VibeJS — Rate Calculator

A rate calculator application built with React + TypeScript (Vite) for the frontend and Express + TypeScript (better-sqlite3) for the backend.

Project Structure

index.html              # Vite HTML entry point
vite.config.ts          # Vite configuration (dev proxy → Express)
tsconfig.json           # TypeScript project references
src/
  main.tsx              # React entry point
  App.tsx               # Root component (auth state)
  App.css               # Global styles
  api/auth.ts           # Fetch helpers (login, register, calculate, logs)
  components/
    LoginForm.tsx
    RegisterForm.tsx
    Calculator.tsx
    LogsHistory.tsx
  types/index.ts        # Shared TypeScript types
  utils/
    calculateWithRates.ts  # Pure calculation logic
server/
  index.ts              # Express server (auth, API, SQLite)
tests/
  calculateWithRates.test.ts  # Vitest unit tests

Getting Started

npm install

Frontend (dev)

npm run dev          # Vite dev server on :5173, proxies /api → :3000

Backend

npm run server       # Express API server on :3000

Tests

npm test             # Run Vitest once
npm run test:watch   # Watch mode

Production Build

npm run build        # TypeScript check + Vite build → dist/
npm run preview      # Preview production build
  1. Clone the repository:

    git clone <repository-url>
    cd appscript
  2. Install dependencies:

    npm install
  3. Run the project:

    npm start

    Or open index.html directly in your browser for a static demo.

Project Structure

Notes

License

This project is for demonstration purposes only.

About

Vibecoding JS for POC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages