Before running the project, make sure you have installed:
- Java 17+
- Node.js
- npm
- Docker
- Git
Create a file:
client/.envUse this content:
REACT_APP_API_URL=http://localhost:8080/apiYou can also check:
client/.env.exampleFor local development, the backend connects to PostgreSQL on port 5433.
Example values are available in:
server/.env.exampleThe project can be started with Docker Compose.
It starts:
- PostgreSQL database
- Spring Boot backend
- React frontend served by Nginx
From the project root folder:
docker compose up --build -dAfter startup, the services will be available at:
Frontend: http://localhost:3000
Backend: http://localhost:8080
Database: localhost:5433Check running containers:
docker psExpected containers:
task-manager-frontend
task-manager-backend
task-manager-postgresStop all containers:
docker compose downStop containers and delete PostgreSQL data volume:
docker compose down -vWarning: docker compose down -v removes database data.
task-manager/
├── docker-compose.yml
├── client/
│ ├── Dockerfile
│ ├── .dockerignore
│ └── nginx.conf
└── server/
├── Dockerfile
└── .dockerignoreYou can also run services manually.
From the project root:
docker compose up postgres -dPostgreSQL will be available at:
localhost:5433Database credentials:
Database: task_manager
User: task_user
Password: task_passwordFrom the server folder:
cd server
./mvnw spring-boot:runOn Windows PowerShell:
cd server
.\mvnw.cmd spring-boot:runBackend runs at:
http://localhost:8080From the client folder:
cd client
npm install
npm startFrontend runs at:
http://localhost:3000POST /api/auth/register
POST /api/auth/loginAll task endpoints require JWT token:
Authorization: Bearer <token>GET /api/tasks
GET /api/tasks/{id}
POST /api/tasks
PUT /api/tasks/{id}
DELETE /api/tasks/{id}The task list supports pagination, search, sorting, and status filtering.
Example:
GET /api/tasks?page=0&size=5&sort=createdAt,descSearch by title:
GET /api/tasks?q=jwtFilter active tasks:
GET /api/tasks?done=falseFilter completed tasks:
GET /api/tasks?done=truePOST /api/auth/register
Content-Type: application/json{
"username": "test",
"email": "test@test.com",
"password": "123456"
}POST /api/auth/login
Content-Type: application/json{
"email": "test@test.com",
"password": "123456"
}POST /api/tasks
Authorization: Bearer <token>
Content-Type: application/json{
"title": "Learn JWT",
"description": "Build protected task endpoints"
}This project is built as a learning full-stack application.
For local development:
- PostgreSQL runs in Docker
- Backend runs locally on port
8080 - Frontend runs locally on port
3000 - JWT token is stored in browser
localStorage