This repository contains a full-stack login application built with:
- Frontend: React + TypeScript, React Hook Form, Zod, React Query
- Backend: Node.js + Express + TypeScript, Prisma ORM, PostgreSQL
- Node.js (v18 or higher)
- npm (v8 or higher)
- Git
- postgres
- Navigate to the backend folder
cd server - Install dependencies
npm install
- Configure environment
Create a .env file in backend/ with:
Or point to your PostgreSQL/MySQL database:
DATABASE_URL="file:./dev.db"DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DB_NAME" - Run Prisma migrations & generate client
Create a .env file in backend/ with:
npx prisma migrate dev --name init npx prisma generate
- Start the development server
Create a .env file in backend/ with:
The backend will be available at: http://localhost:5000
npm run dev
-
Navigate to the frontend folder
cd frontend -
Install dependencies
npm install
-
Start the development server
npm run dev
The frontend will be available at: http://localhost:5173
Use the following credentials to test the login flow:
Email: test@example.com
Password: 123456