first commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# 4TECH Login + User Management
|
||||
|
||||
Modern internal web app built with Next.js App Router, Tailwind CSS, Prisma, PostgreSQL, JWT httpOnly cookies, bcrypt password hashing, and role-based access control.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
npm install
|
||||
cp .env.example .env
|
||||
npx prisma migrate dev
|
||||
npx prisma db seed
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open `http://localhost:3000`.
|
||||
|
||||
## Development Login
|
||||
|
||||
- Email: `admin@4tech.co.th`
|
||||
- Password: `Admin@123456`
|
||||
- Role: `SUPER_ADMIN`
|
||||
|
||||
## Features
|
||||
|
||||
- `/login` glassmorphism login screen with remember-me and password visibility toggle
|
||||
- `/home` protected dashboard with user summary cards
|
||||
- `/profile` profile details, edit form, and password change
|
||||
- `/users` admin-only user management with search, role/status filters, create/edit modal, soft disable, pagination, and mobile card layout
|
||||
- Server-side RBAC for `SUPER_ADMIN`, `ADMIN`, and `USER`
|
||||
- Prisma schema and seed script ready for PostgreSQL
|
||||
|
||||
## Environment
|
||||
|
||||
```env
|
||||
DATABASE_URL="postgresql://postgres:password@localhost:5432/4tech_app?schema=public"
|
||||
AUTH_SECRET="replace-with-a-long-random-secret"
|
||||
NEXT_PUBLIC_APP_NAME="4TECH"
|
||||
```
|
||||
Reference in New Issue
Block a user