A full-stack task management application built with React (Frontend) and Spring Boot (Backend), using PostgreSQL as the database.
- Frontend: React 19 + TypeScript + Vite
- Backend: Spring Boot 3.5.3 + Java 17
- Database: PostgreSQL 16
- Containerization: Docker & Docker Compose
- Docker (version 20.10+)
- Docker Compose (version 2.0+)
- Node.js (version 18+)
- Java JDK (version 17+)
- Maven (version 3.6+)
- PostgreSQL (version 12+)
git clone https://github.com/ansh-procore/full-stack-app.git
cd task-App# Build and start all services
docker-compose up --build
# Or run in detached mode
docker-compose up --build -d- Frontend: http://localhost:5173
- Backend API: http://localhost:8080
- API Documentation (Swagger): http://localhost:8080/swagger-ui.html
- Database: localhost:5432 (if needed for direct access)
# Stop all services
docker-compose down
# Stop and remove volumes (clears database data)
docker-compose down -v- Install and start PostgreSQL
- Create a database:
CREATE DATABASE taskDB;
CREATE USER postgres WITH PASSWORD 'postgres';
GRANT ALL PRIVILEGES ON DATABASE taskDB TO postgres;# Navigate to backend directory
cd TaskTool
# Build the project
mvn clean package -DskipTests
**Backend will be available at**: http://localhost:8080
### Frontend Setup
```bash
# Navigate to frontend directory
cd task-ui
# Install dependencies
npm install
# Start development server
npm run dev
# Alternative commands
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintFrontend will be available at: http://localhost:5173
When running locally, you can set these environment variables or modify application.properties:
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/taskDB
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=postgresThese are automatically configured in docker-compose.yml:
SPRING_DATASOURCE_URL: jdbc:postgresql://database:5432/taskDBSPRING_DATASOURCE_USERNAME: postgresSPRING_DATASOURCE_PASSWORD: postgres
The application uses PostgreSQL with the following configuration:
- Database Name: taskDB
- Username: postgres
- Password: postgres
- Port: 5432
The application automatically:
- Creates database schema from
schema.sql - Populates initial data from
data.sql - Updates schema using Hibernate DDL auto-update
The backend provides Swagger/OpenAPI documentation:
- Swagger UI: http://localhost:8080/swagger-ui.html
- API Docs JSON: http://localhost:8080/v3/api-docs
task-App/
βββ docker-compose.yml # Docker orchestration
βββ task-ui/ # React Frontend
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ hooks/ # Custom React hooks
β βββ package.json
β βββ Dockerfile
βββ TaskTool/ # Spring Boot Backend
β βββ src/main/java/ # Java source code
β β βββ com/example/TaskTool/
β β βββ controller/ # REST controllers
β β βββ model/ # Entity models
β β βββ repository/ # Data repositories
β β βββ service/ # Business logic
β βββ src/main/resources/ # Application resources
β βββ pom.xml # Maven dependencies
β βββ Dockerfile
βββ README.md
# View running containers
docker ps
# View logs
docker-compose logs -f
# Rebuild a specific service
docker-compose build backend
docker-compose build frontend
# Remove all containers and volumes
docker-compose down -v
# Access container shell
docker exec -it task-backend bash
docker exec -it task-frontend sh# Backend - Generate JAR file
cd TaskTool && ./mvnw clean package
# Frontend - Build for production
cd task-ui && npm run build
# Check application health
curl http://localhost:8080/actuator/health # Backend health
curl http://localhost:5173 # Frontend-
Port already in use
# Check what's using the port lsof -i :8080 # Backend lsof -i :5173 # Frontend lsof -i :5432 # Database
-
Database connection issues
- Ensure PostgreSQL is running
- Check connection string and credentials
- For Docker: ensure containers can communicate
-
Docker build issues
# Clean Docker cache docker system prune -a # Rebuild without cache docker-compose build --no-cache
-
Frontend not loading
- Check if Node.js version is 18+
- Clear npm cache:
npm cache clean --force - Delete node_modules and reinstall:
rm -rf node_modules && npm install
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
This project is licensed under the MIT License.