English | 日本語
A user management app with a React + Redux Toolkit (TypeScript) frontend and an Express + PostgreSQL REST API. Users can register, log in with a JWT, browse the user list, and edit or delete their profile.
| Stack | |
|---|---|
frontend (user-management-system/) |
React 18 / Redux Toolkit / React Router 6 / TypeScript / MUI / Swiper / react-select / axios |
backend (ums-backend/) |
Node.js / Express 4 / TypeScript / PostgreSQL (pg) / bcrypt / jsonwebtoken |
| Method | Path | Description |
|---|---|---|
| POST | /api/users/register |
Register (the password is hashed with bcrypt) |
| POST | /api/users/login |
Log in and get a JWT (valid for 1 hour) |
| GET | /api/users |
List users |
| GET | /api/users/:id |
Get a user |
| PUT | /api/users/:id |
Update a profile |
| DELETE | /api/users/:id |
Delete a profile |
| Path | Content |
|---|---|
/ |
User list |
/register / /login |
Register and log in |
/dashboard |
Dashboard |
/profile/:userId |
Profile |
/settings |
Settings (font size) |
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL
);Copy ums-backend/.env.example to ums-backend/.env and set the database connection and JWT_SECRET.
cd ums-backend
npm install
PORT=5000 npm start # http://localhost:5000cd user-management-system
npm install
REACT_APP_API_BASE_URL=http://localhost:5000/api npm start # http://localhost:3000