Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Before running the project, make sure you have installed:

  • Java 17+
  • Node.js
  • npm
  • Docker
  • Git

Environment Variables

Frontend

Create a file:

client/.env

Use this content:

REACT_APP_API_URL=http://localhost:8080/api

You can also check:

client/.env.example

Backend

For local development, the backend connects to PostgreSQL on port 5433.

Example values are available in:

server/.env.example

Run Full Project with Docker

The 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 -d

After startup, the services will be available at:

Frontend: http://localhost:3000
Backend:  http://localhost:8080
Database: localhost:5433

Check running containers:

docker ps

Expected containers:

task-manager-frontend
task-manager-backend
task-manager-postgres

Stop all containers:

docker compose down

Stop containers and delete PostgreSQL data volume:

docker compose down -v

Warning: docker compose down -v removes database data.

Docker Files

task-manager/
├── docker-compose.yml
├── client/
│   ├── Dockerfile
│   ├── .dockerignore
│   └── nginx.conf
└── server/
    ├── Dockerfile
    └── .dockerignore

Local Development Without Docker

You can also run services manually.

Run PostgreSQL only

From the project root:

docker compose up postgres -d

PostgreSQL will be available at:

localhost:5433

Database credentials:

Database: task_manager
User: task_user
Password: task_password

Run Backend locally

From the server folder:

cd server
./mvnw spring-boot:run

On Windows PowerShell:

cd server
.\mvnw.cmd spring-boot:run

Backend runs at:

http://localhost:8080

Run Frontend locally

From the client folder:

cd client
npm install
npm start

Frontend runs at:

http://localhost:3000

API Endpoints

Auth

POST /api/auth/register
POST /api/auth/login

Tasks

All 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}

Task Query Parameters

The task list supports pagination, search, sorting, and status filtering.

Example:

GET /api/tasks?page=0&size=5&sort=createdAt,desc

Search by title:

GET /api/tasks?q=jwt

Filter active tasks:

GET /api/tasks?done=false

Filter completed tasks:

GET /api/tasks?done=true

Example Auth Request

Register

POST /api/auth/register
Content-Type: application/json
{
  "username": "test",
  "email": "test@test.com",
  "password": "123456"
}

Login

POST /api/auth/login
Content-Type: application/json
{
  "email": "test@test.com",
  "password": "123456"
}

Example Task Request

POST /api/tasks
Authorization: Bearer <token>
Content-Type: application/json
{
  "title": "Learn JWT",
  "description": "Build protected task endpoints"
}

Development Notes

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

About

Full-stack Task Manager (Spring Boot + React)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages