Hệ thống quản lý sổ tiết kiệm cho nhân viên ngân hàng với tích hợp Google OAuth authentication và PostgreSQL database.
# Frontend
npm install
# Backend
cd backend
npm install
cd ..Backend (backend/.env):
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
DATABASE_URL=postgresql://postgres:password@db.project.supabase.co:5432/postgres
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:3000Frontend (.env):
VITE_BACKEND_API_URL=http://localhost:3001/api- Mở Supabase Dashboard → SQL Editor
- Chạy SQL script từ
backend/db/schema.sql
Cách 1: Sử dụng VS Code Tasks (Khuyên dùng)
- Mở VS Code
Ctrl+Shift+P→ "Tasks: Run Task" → Start All (Frontend + Backend)
Cách 2: Chạy thủ công
Terminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
npm run devTruy cập: http://localhost:3000
- QUICK_START.md - Hướng dẫn nhanh 5 bước
- HUONG_DAN_CHAY_PROJECT.md - Hướng dẫn chi tiết chạy project trong VS Code
- SUPABASE_SETUP.md - Hướng dẫn setup Supabase và Google OAuth
- BACKEND_SETUP_GUIDE.md - Hướng dẫn backend và database
- backend/README.md - Backend API documentation
banking/
├── backend/ # Backend API (Node.js/Express)
│ ├── db/ # Database schema
│ ├── routes/ # API routes
│ └── index.js # Main server
├── src/ # Frontend (React + Vite)
│ ├── components/ # React components
│ ├── lib/ # Utilities & API clients
│ └── App.tsx # Main app
└── .vscode/ # VS Code configurations
- ✅ Google OAuth Authentication
- ✅ PostgreSQL Database (Supabase)
- ✅ User Profile Management
- ✅ Savings Account Management
- ✅ Customer Management
- ✅ Withdrawal Management
- ✅ Reports & Statistics
- Node.js v18+
- npm hoặc yarn
- Supabase account (free tier OK)
- Google Cloud account (cho OAuth)
- Lần đầu đăng nhập: User đăng nhập Google → Form đăng ký → Hoàn thành profile → Vào app
- Lần sau: User đăng nhập Google → Tự động đăng nhập → Vào app
Frontend:
- React 18
- Vite
- TypeScript
- Tailwind CSS
- Supabase Client
Backend:
- Node.js
- Express
- PostgreSQL (Supabase)
- Supabase Admin API
npm run dev- Start development servernpm run build- Build for production
npm run dev- Start development server (with watch)npm start- Start production server
Xem HUONG_DAN_CHAY_PROJECT.md để biết cách xử lý các lỗi thường gặp.
Private project