This project contains a React (Vite + Tailwind) frontend and an Express backend for authentication (signup, login, password reset). It is the foundation for a small business inventory tracker.
Requirements:
- Node.js 18+
npm run install-allAlternatively, install each app:
cd server && npm i
cd ../client && npm iCreate server/.env (optional but recommended):
PORT=5000
JWT_SECRET=change_me_to_a_long_random_string
npm run devThis starts:
- Backend at
http://localhost:5000 - Frontend at
http://localhost:5173(proxying/apito the backend)
POST /api/auth/signup{ companyName, email, password }POST /api/auth/login{ email, password }POST /api/auth/request-password-reset{ email }POST /api/auth/reset-password{ email, token, newPassword }
Notes:
- Password reset emails are sent automatically. In development, emails are logged to console. For production, configure email credentials (see
server/EMAIL_SETUP.md). - SQLite database file is created at
server/data/auth.db.
/login– Sign in/signup– Create account/request-reset– Request password reset token/reset-password– Submit token and new password